示例#1
0
        public PropertyForm(TypeInterface Type, Func<object> Default, object Object)
        {
            InitializeComponent();

            this.Type = Type;
            this.Default = Default;
            this.Text = Type.Name;
            this._File = new FileToolStripMenuItem(Type.Name, ".lua");
            this._File.Save += new Action<string>(this._Save);
            this._File.Load += new Action<string>(this._Load);
            this._File.Patch += new Action<string>(this._Patch);
            this._MenuStrip.Items.Add(this._File);
            this._MenuStrip.Items.Add("Reset", null, delegate { this.Object = this.Default(); });

            this._PropertyGrid.SelectedObject = Object;
        }
示例#2
0
 public Property(string Name, TypeInterface Type)
     : base(Name, Type, MemberTag.Property)
 {
 }
示例#3
0
 public Method(string Name, TypeInterface Type, TypeInterface[] ArgumentTypes)
     : base(Name, Type, MemberTag.Method)
 {
 }
示例#4
0
 public Member(string Name, TypeInterface Type, MemberTag Tag)
 {
     this.Name = Name;
     this.Type = Type;
     this.Tag = Tag;
 }
示例#5
0
文件: Auto.cs 项目: dzamkov/Hailstone
 /// <summary>
 /// Gets type interfaces for the given types.
 /// </summary>
 private static TypeInterface[] _Interfaces(ParameterInfo[] Parameters)
 {
     TypeInterface[] interfaces = new TypeInterface[Parameters.Length];
     for(int t = 0; t < interfaces.Length; t++)
     {
         interfaces[t] = TypeInterface.Get(Parameters[t].ParameterType);
     }
     return interfaces;
 }