Example #1
0
 private void VisualizeLoggedInAccount()
 {
     try {
         VisualHelper.VisualizeLoggedInAccount(DataGrid);
     }
     catch (Exception ex) {
         MessageBox.Show("Error visualizing logged in account: " + ex.Message);
     }
 }
Example #2
0
 private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try {
         ContextHelper.DeleteEvent(DataGrid);
         DataSetHelper.CorrectAccountNumbers((DataSet)DataGrid.DataSource);
         DataSetHelper.NormalizeForSaving((DataSet)DataGrid.DataSource);
         LoadLayout();
         VisualHelper.VisualizeLoggedInAccount(DataGrid);
     }
     catch (Exception ex) {
         MessageBox.Show("Error while deleting account: " + ex.Message);
     }
 }
Example #3
0
        private void DataGrid_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try {
                DataGridHelper.MouseDoubleClickEvent(e, DataGrid);

                if (e.Button == MouseButtons.Left &&
                    e.ColumnIndex == DataGrid.Columns.IndexOf(DataGrid.Columns["Nr"]) ||
                    e.ColumnIndex == DataGrid.Columns.IndexOf(DataGrid.Columns["Login"]) ||
                    e.ColumnIndex == DataGrid.Columns.IndexOf(DataGrid.Columns["Name"]))
                {
                    VisualHelper.VisualizeLoggedInAccount(DataGrid);
                }
            }
            catch (Exception ex) {
                MessageBox.Show("Error changing value while double clicking: " + ex.Message);
            }
        }