Ejemplo n.º 1
0
 private void ButtonClick(object sender, RoutedEventArgs e)
 {
     try
     {
         if (sender.Equals(btn_Exit))
         {
             //this.DialogResult = true;
             //this.DialogResult = System.Windows.Forms.DialogResult.OK;
             string userID   = txt_UserID.Text;
             string password = password_box.Password;
             ExitRequest?.Invoke(this, new ExitRequestEventArgs(userID, password));
         }
         else if (sender.Equals(btn_Cancel))
         {
             CloseFormEvent?.Invoke(this, e);
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception");
     }
 }
 protected virtual void RaiseExitRequest()
 {
     ExitRequest?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 3
0
 public void OnExitRequest(EventArgs e) => ExitRequest?.Invoke(this, e);