Example #1
0
 private void btnAddAccount_Click(object sender, EventArgs e)
 {
     try
     {
         SbotControl.Account acc = new SbotControl.Account(string.Empty, true, true, true, true, true, string.Empty, 300);
         AddAccountFrm frm = new AddAccountFrm(acc);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             Program.DM.AddAccount(acc);
             Program.DM.SaveSettings();
         }
         ReloadData();
     }
     catch (Exception ex)
     { Program.dbOperations.SaveToEx(this.GetType().ToString(), ex.Message, ex.StackTrace); }
 }
Example #2
0
 private void repositoryItemButtonEditEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         SbotControl.Account acc = (SbotControl.Account)gridViewMain.GetRow(gridViewMain.FocusedRowHandle);
         AddAccountFrm frm = new AddAccountFrm(acc);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             Program.DM.SaveSettings();
         }
         ReloadData();
     }
     catch (Exception ex)
     { Program.dbOperations.SaveToEx(this.GetType().ToString(), ex.Message, ex.StackTrace); }
 }