Esempio n. 1
0
        private void OPCodeGrid_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == Keys.Z)
            {
                UndoOPC();
            }
            if (e.KeyCode == Keys.Delete)
            {
                DeleteOPCSelection();
            }

            if ((e.Control && e.KeyCode == Keys.Insert) || (e.Shift && e.KeyCode == Keys.Insert))
            {
                PasteClipboardOPCodeTable();
            }
            if ((e.Control && e.KeyCode == Keys.V) || (e.Shift && e.KeyCode == Keys.Insert))
            {
                PasteClipboardOPCodeTable();
            }
            if (e.Control && e.KeyCode == Keys.F)
            {
                if (SearchAndReplace != null)
                {
                    if (SearchAndReplace.Visible)
                    {
                        return;
                    }
                }

                SearchAndReplace = new FindAndReplaceForm(OPCodeGrid, ROC, false, this);
                SearchAndReplace.Show();
            }
        }
Esempio n. 2
0
        private void ModbusGridView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == Keys.Z)
            {
                UndoModbus();
            }
            if (e.KeyCode == Keys.Delete)
            {
                DeleteModbusSelection();
            }

            if ((e.Control && e.KeyCode == Keys.Insert) || (e.Shift && e.KeyCode == Keys.Insert))
            {
                PasteClipboardModbusTable();
            }
            if ((e.Control && e.KeyCode == Keys.V) || (e.Shift && e.KeyCode == Keys.Insert))
            {
                PasteClipboardModbusTable();
            }
            if (e.Control && e.KeyCode == Keys.F)
            {
                if (SearchAndReplace != null)
                {
                    if (SearchAndReplace.Visible)
                    {
                        return;
                    }
                }

                SearchAndReplace = new FindAndReplaceForm(ModbusGrid, ROC, true, this);
                SearchAndReplace.Show();
            }
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (SearchAndReplace != null)
            {
                if (SearchAndReplace.Visible)
                {
                    return;
                }
            }
            bool modbusGrid = false;

            if (TabControl.SelectedIndex == 0)
            {
                SearchAndReplace = new FindAndReplaceForm(OPCodeGrid, ROC, false, this);
            }
            else
            {
                SearchAndReplace = new FindAndReplaceForm(ModbusGrid, ROC, true, this);
            }
            SearchAndReplace.Show();
        }