Esempio n. 1
0
        private void uiAddToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var classTimeTableDayElem = (ClassTimeTableDayElem)uiMainDataGridView.SelectedCells[0].Value;
            var classTimeTable        = classTimeTableDayElem.ClassTimeTable;

            using (var f = new ClassTimeTableAddForm(classTimeTable))
            {
                f.IsEditMode = true;
                if (f.ShowDialog() == DialogResult.OK)
                {
                    RefreshInfo();
                }
            }
        }
Esempio n. 2
0
 private void uiMainDataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (!Globals.IsRootMode)
     {
         return;
     }
     if (e.Button == MouseButtons.Left && e.RowIndex > -1 &&
         uiMainDataGridView.Columns[e.ColumnIndex].DisplayIndex > 0)
     {
         var classTimeTableDayElem = (ClassTimeTableDayElem)uiMainDataGridView.SelectedCells[0].Value;
         var classTimeTable        = classTimeTableDayElem.ClassTimeTable;
         using (var f = new ClassTimeTableAddForm(classTimeTable))
         {
             f.IsEditMode = true;
             if (f.ShowDialog() == DialogResult.OK)
             {
                 RefreshInfo();
             }
         }
     }
 }