} // 1.0.001 public TdhEditBox(TDHEditBox.EditComplete delegate_OnEditComplete) // 1.0.001 { // 1.0.001 /// // 1.0.001 /// Required for Windows.Forms Class Composition Designer support // 1.0.001 /// // 1.0.001 InitializeComponent(); // 1.0.001 // // 1.0.001 // TODO: Add any constructor code after InitializeComponent call // 1.0.001 // // 1.0.001 if (delegate_OnEditComplete != null) // 1.0.001 { // 1.0.001 //this.OnEditComplete -= this.OnEditComplete; ////this.OnEditComplete = null; this.OnEditComplete = delegate_OnEditComplete; // 1.0.001 } // 1.0.001 } // 1.0.001
internal event TDHEditBox.EditComplete OnEditComplete; // 1.0.001 #endregion #region (Form) frmEditBox class constructor (and Dispose), etc // internal frmEditBox() // : this(null, new System.Drawing.Point(0, 0), 20, 100, "") // internal frmEditBox(TDHEditBox.EditComplete delegate_OnEditComplete) // : this(delegate_OnEditComplete, null, new System.Drawing.Point(0, 0), 20, 100, "") // internal frmEditBox( // TDHEditBox.EditComplete delegate_OnEditComplete, // System.Drawing.Point ptShow, int height, int width, string editText // ) // // protected override void Dispose( bool disposing ) // // protected override void OnActivated(System.EventArgs e) // //internal frmEditBox() // 1.0.001 // : this(null, new System.Drawing.Point(0, 0), 20, 100, "") // 1.0.001 //{ // 1.0.001 //} // 1.0.001 internal frmEditBox(TDHEditBox.EditComplete delegate_OnEditComplete) // 1.0.001 : this(delegate_OnEditComplete, new System.Drawing.Point(0, 0), 20, 100, "") // 1.0.001 { // 1.0.001 } // 1.0.001
} // 1.0.001 internal frmEditBox( // 1.0.001 TDHEditBox.EditComplete delegate_OnEditComplete, // 1.0.001 System.Drawing.Point ptShow, int height, int width, string editText // 1.0.001 ) // 1.0.001 { // 1.0.001 // // 1.0.001 // Required for Windows Form Designer support // 1.0.001 // // 1.0.001 InitializeComponent(); // 1.0.001 // // 1.0.001 // TODO: Add any constructor code after InitializeComponent call // 1.0.001 // // 1.0.001 this.DialogResult = System.Windows.Forms.DialogResult.None; // 1.0.001 this._editAccepted = false; // 1.0.001 this._editTextChanged = false; // 1.0.001 if (delegate_OnEditComplete != null) // 1.0.001 { // 1.0.001 //this.OnEditComplete -= delegate_OnEditComplete; // 1.0.001 //this.OnEditComplete += delegate_OnEditComplete; // 1.0.001 this.OnEditComplete = delegate_OnEditComplete; // 1.0.001 } // 1.0.001 //this.Location = this.PointToScreen(ptShow); // 1.0.001 this.Location = ptShow; // 1.0.001 this.Height = height; // 1.0.001 this.Width = width; // 1.0.001 this.EditText = editText; // 1.0.001 } // 1.0.001
} // 1.0.001 #endregion #region Component-Internal EventHandler -- [private void EditComplete(...)] // private void EditComplete(object sender, TDHEditBox.EditEventArgs editArgs) // private void EditComplete(object sender, TDHEditBox.EditEventArgs editArgs) // 1.0.001 { // 1.0.001 this._dialogResult = editArgs.DialogResult; // 1.0.001 this._editAccepted = editArgs.EditAccepted; // 1.0.001 this._editText = editArgs.EditText; // 1.0.001 this._editTextChanged = editArgs.EditTextChanged; // 1.0.001 if (this.OnEditComplete != null) // 1.0.001 { // 1.0.001 this.OnEditComplete(sender, editArgs); // 1.0.001 } // 1.0.001 } // 1.0.001