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; }
public Property(string Name, TypeInterface Type) : base(Name, Type, MemberTag.Property) { }
public Method(string Name, TypeInterface Type, TypeInterface[] ArgumentTypes) : base(Name, Type, MemberTag.Method) { }
public Member(string Name, TypeInterface Type, MemberTag Tag) { this.Name = Name; this.Type = Type; this.Tag = Tag; }
/// <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; }