Example #1
0
File: Form2.cs Project: tmamd/Chat
 public Form2(SettingEventHandler handler, string localName, string remoteName, string ip)
 {
     this.handler = handler;
     InitializeComponent();
     this.localTextBox.Text = localName;
     this.remoteTextBox.Text = remoteName;
     this.ipTextBox.Text = ip;
 }
Example #2
0
        /// <summary>
        /// The on setting changed.
        /// </summary>
        /// <param name="e">
        /// The e.
        /// </param>
        protected virtual void OnSettingChanged(SettingChangedEventArgs e)
        {
            SettingEventHandler handler = this.SettingChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="key">Internal name/key of setting</param>
 /// <param name="val">The current value of the setting</param>
 /// <param name="desc">The setting's description</param>
 /// <param name="category">The setting's category</param>
 /// <param name="update">An eventhandler that will be called if CustomPropertyGrid.InstantUpdate is true</param>
 /// <param name="editor">Editor for Property</param>
 public Setting(string key, string desc, string category, object val, SettingEventHandler update,
                UITypeEditor editor)
 {
     this.key      = key;
     this.desc     = desc;
     this.category = category;
     this.val      = val;
     if (update != null)
     {
         ValueChanged += update;
     }
     this.editor = editor;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="val">The current value of the setting</param>
 /// <param name="desc">The setting's description</param>
 /// <param name="category">The setting's category</param>
 /// <param name="update">An eventhandler that will be called if CustomPropertyGrid.InstantUpdate is true</param>
 public Setting(string key, string desc, string category, object val, SettingEventHandler update)
     : this(key, desc, category, val, update, null)
 {
 }