34 lines
812 B
C#
34 lines
812 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Voile.Patchouli.Reflection
|
|
{
|
|
|
|
[System.AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
|
|
public sealed class VoilePluginCanSaveFileAttribute : Attribute
|
|
{
|
|
public VoilePluginCanSaveFileAttribute(bool enable, string filter, CanSaveFileMode mode = CanSaveFileMode.SaveFile, bool fileMustExist = false)
|
|
{
|
|
Enable = enable;
|
|
Filter = filter;
|
|
Mode = mode;
|
|
FileMustExist = fileMustExist;
|
|
}
|
|
|
|
public bool Enable { get; }
|
|
public string Filter { get; }
|
|
public CanSaveFileMode Mode { get; }
|
|
public bool FileMustExist { get; }
|
|
}
|
|
|
|
public enum CanSaveFileMode
|
|
{
|
|
OpenFile = 0,
|
|
SaveFile = 1,
|
|
Directory = 2
|
|
}
|
|
}
|