Exemplo n.º 1
0
 /// <summary>
 /// A form was disposed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void FormDisposed(object sender, EventArgs e)
 {
     if (sender == createSessionForm)
     {
         createSessionForm = null;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// We should create a new session.  Display a dialog allowing the user to set
 /// certain options
 /// </summary>
 private void btnCreate_Click(object sender, System.EventArgs e)
 {
     this.DialogResult             = DialogResult.None;
     ((Button)sender).DialogResult = DialogResult.None;
     if (createSessionForm == null)
     {
         createSessionForm           = new CreateSessionForm(peer, deviceAddress, connectionWizard);
         createSessionForm.Disposed += new System.EventHandler(this.FormDisposed);
     }
     if (createSessionForm.ShowDialog(this) != DialogResult.Cancel)
     {
         ((Button)sender).DialogResult = DialogResult.Yes;
         this.DialogResult             = DialogResult.Yes;
     }
 }
 /// <summary>
 /// A form was disposed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void FormDisposed(object sender, EventArgs e)
 {
     if (sender == createSessionForm)
         createSessionForm = null;
 }
 /// <summary>
 /// We should create a new session.  Display a dialog allowing the user to set
 /// certain options
 /// </summary>
 private void btnCreate_Click(object sender, System.EventArgs e)
 {
     this.DialogResult = DialogResult.None;
     ((Button)sender).DialogResult = DialogResult.None;
     if (createSessionForm == null)
     {
         createSessionForm = new CreateSessionForm(peer,deviceAddress,connectionWizard);
         createSessionForm.Disposed += new System.EventHandler(this.FormDisposed);
     }
     if (createSessionForm.ShowDialog(this) != DialogResult.Cancel)
     {
         ((Button)sender).DialogResult = DialogResult.Yes;
         this.DialogResult = DialogResult.Yes;
     }
 }