Exemple #1
0
        private void ctx_main_delete_Click(object sender, EventArgs e)
        {
            Eraser er = new Eraser();

            er.FormClosing += new FormClosingEventHandler(this.mainform_FormClosingEvent);
            if (er.start <Shift>(sel_row_id))
            {
                FillTable(tablemode);
                mv.RefreshShifts();
            }
        }
Exemple #2
0
        private void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F7)
            {
                printAccounting();
            }
            else if (e.KeyCode == Keys.Delete)
            {
                Eraser er = new Eraser();
                er.FormClosing += new FormClosingEventHandler(this.mainform_FormClosingEvent);
                if (er.start <Shift>(table_main))
                {
                    FillTable(tablemode);
                    mv.RefreshAll();
                }
            }
            else if (e.KeyData == (Keys.Control | Keys.Alt | Keys.D0))
            {
                try {
                    devtools.Show();
                    devtools.BringToFront();
                } catch {
                    devtools = new DevTools(this);
                    devtools.Show();
                    devtools.BringToFront();
                }
            }

            else if (e.KeyCode == Keys.F3)
            {
                AddShift addshiift = new AddShift();
                addshiift.FormClosing    += new FormClosingEventHandler(this.mainform_FormClosingEvent);
                addshiift.FormBorderStyle = FormBorderStyle.FixedDialog;
                addshiift.ShowDialog();
            }
            else if (e.KeyCode == Keys.F12)
            {
                Statistics statistics = new Statistics();
                statistics.FormBorderStyle = FormBorderStyle.FixedDialog;
                statistics.ShowDialog();
            }
        }