예제 #1
0
        void InitHotkeys()
        {
            // register the hotkeys with the form
            HotKeyManager.AddHotKey(this, OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(this, OpenFindDialog, Keys.F, true, false, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.R, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.H, true);
            HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, ZoomDefault, Keys.D0, true);
            HotKeyManager.AddHotKey(this, CloseSearch, Keys.Escape);

            // remove conflicting hotkeys from scintilla
            TextArea.ClearCmdKey(Keys.Control | Keys.F);
            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);

            // Prevent Scinitilla from rendering certain keys
            TextArea.KeyPress += (object sender, KeyPressEventArgs e) =>
            {
                if (e.KeyChar < 32)
                {
                    // Prevent control characters from getting inserted into the text buffer
                    e.Handled = true;
                }
            };
        }
예제 #2
0
 private void InitHotkeys(Form parentForm)
 {
     // register the hotkeys with the form
     HotKeyManager.AddHotKey(parentForm, ZoomIn, Keys.Oemplus, true);
     HotKeyManager.AddHotKey(parentForm, ZoomOut, Keys.OemMinus, true);
     HotKeyManager.AddHotKey(parentForm, ZoomDefault, Keys.D0, true);
 }
예제 #3
0
        private void InitHotkeys()
        {
            // register the hotkeys with the form
            HotKeyManager.AddHotKey(this, OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(this, OpenFindDialog, Keys.F, true, false, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.R, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.H, true);
            HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, ZoomDefault, Keys.D0, true);
            HotKeyManager.AddHotKey(this, CloseSearch, Keys.Escape);

            // remove conflicting hotkeys from scintilla
            TextArea.ClearCmdKey(Keys.Control | Keys.F);
            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);

            TextArea.ClearCmdKey(Keys.F5);
            TextArea.ClearCmdKey(Keys.F6);
            TextArea.ClearCmdKey(Keys.F10);
            TextArea.ClearCmdKey(Keys.F12);

            HotKeyManager.AddHotKey(this, RunDebugger, Keys.F5);
            HotKeyManager.AddHotKey(this, OpenStorage, Keys.F6);
            HotKeyManager.AddHotKey(this, StepDebugger, Keys.F10);
            HotKeyManager.AddHotKey(this, ToggleDebuggerSource, Keys.F12);
        }
예제 #4
0
        private void InitHotkeys()
        {
            // register the hotkeys with the form
            HotKeyManager.AddHotKey(this, OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(this, OpenFindDialog, Keys.F, true, false, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.R, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.H, true);
            HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, ZoomDefault, Keys.D0, true);
            HotKeyManager.AddHotKey(this, CloseSearch, Keys.Escape);
            HotKeyManager.AddHotKey(this, NewFile, Keys.N, true);
            HotKeyManager.AddHotKey(this, OpenFile, Keys.O, true);
            HotKeyManager.AddHotKey(this, SaveFile, Keys.S, true);
            //HotKeyManager.AddHotKey(this, CloseFile, Keys.X, true);

            // remove conflicting hotkeys from scintilla
            TextArea.ClearCmdKey(Keys.Control | Keys.N);
            TextArea.ClearCmdKey(Keys.Control | Keys.O);
            TextArea.ClearCmdKey(Keys.Control | Keys.S);
            //TextArea.ClearCmdKey(Keys.Control | Keys.X);
            TextArea.ClearCmdKey(Keys.Control | Keys.F);

            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);
            //TextArea.ClearCmdKey(Keys.Control | Keys.S);
        }
예제 #5
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     //Add HK
     if (HotKeyManager.AddHotKey(_hotkey))
     {
         DialogResult = DialogResult.OK;
         Close();
     }
     else
     {
         errorProvider1.SetError(txtHotKey, "Hot Key is already registered");
     }
 }
예제 #6
0
        private void KisaYollar(Scintilla TextArea)
        {
            HotKeyManager.AddHotKey(this, TextArea.ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, TextArea.ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, KodUret, Keys.F5);

            TextArea.ClearCmdKey(Keys.Control | Keys.F);
            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);
            TextArea.ClearCmdKey(Keys.Control | Keys.S);

            void KodUret()
            {
                kodUretButon.PerformClick();
            }
        }
예제 #7
0
        private void InitEditorHotkeys()
        {
            HotKeyManager.RemoveHotKeys();

            // register the hotkeys with the form
            HotKeyManager.AddHotKey(noteEditControl.OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(noteEditControl.CloseSearch, Keys.Escape);
            HotKeyManager.AddHotKey(noteEditControl.FormatAsXml, Keys.X, true, true, true);
            HotKeyManager.AddHotKey(noteEditControl.FormatAsJson, Keys.J, true, true, true);

            //HotKeyManager.AddHotKey(this, OpenFindDialog, Keys.F, true, false, true);
            //HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.R, true);
            //HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.H, true);
            //HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            //HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            //HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            //HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            //HotKeyManager.AddHotKey(this, ZoomDefault, Keys.D0, true);
        }
        private void InitHotkeys()
        {
            // register the hotkeys with the form
            HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, ZoomDefault, Keys.O, true);
            HotKeyManager.AddHotKey(this, newFileCommand, Keys.N, true);
            HotKeyManager.AddHotKey(this, saveCommand, Keys.S, true);
            //HotKeyManager.AddHotKey(this, InitHelpForm, Keys.F1, true);
            HotKeyManager.AddHotKey(this, Undo1, Keys.Z, true);
            HotKeyManager.AddHotKey(this, Redo1, Keys.Y, true);

            HotKeyManager.AddHotKey(this, copyCommand, Keys.C, true);
            HotKeyManager.AddHotKey(this, cutCommand, Keys.X, true);
            HotKeyManager.AddHotKey(this, pasteCommand, Keys.V, true);


            // remove conflicting hotkeys from scintilla
            TextArea.ClearCmdKey(Keys.Control | Keys.F);
            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);
            TextArea.ClearCmdKey(Keys.Control | Keys.N);
            TextArea.ClearCmdKey(Keys.Control | Keys.S);
            TextArea.ClearCmdKey(Keys.Control | Keys.F1);

            TextArea.ClearCmdKey(Keys.Control | Keys.C);
            TextArea.ClearCmdKey(Keys.Control | Keys.X);
            TextArea.ClearCmdKey(Keys.Control | Keys.V);


            TextArea.ClearCmdKey(Keys.Control | Keys.Z);
            TextArea.ClearCmdKey(Keys.Control | Keys.Y);
            TextArea.ClearCmdKey(Keys.Control | Keys.O);

            //for open file
            TextArea.ClearCmdKey(Keys.Control | Keys.P);
        }
예제 #9
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (_mode == HotKeyFormMode.Normal && HotKeyManager.DuplicateHotKey(_hotkey))
            {
                return;
            }

            if (_mode == HotKeyFormMode.Edit)
            {
                HotKeyManager.DeleteHotKey(_linkedHotKey);
            }

            //Add HK
            if (HotKeyManager.AddHotKey(_hotkey))
            {
                DialogResult = DialogResult.OK;
                Close();
            }
            else
            {
                errorProvider1.SetError(txtHotKey, "Hot Key is already registered");
            }
        }
예제 #10
0
        private void InitHotkeys()
        {
            HotKeyManager.AddHotKey(this, Kaydet, Keys.S, true, false, false);

            // register the hotkeys with the form
            HotKeyManager.AddHotKey(this, OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(this, OpenFindDialog, Keys.F, true, false, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.R, true);
            HotKeyManager.AddHotKey(this, OpenReplaceDialog, Keys.H, true);
            HotKeyManager.AddHotKey(this, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(this, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(this, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(this, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(this, ZoomDefault, Keys.D0, true);
            HotKeyManager.AddHotKey(this, CloseSearch, Keys.Escape);

            // remove conflicting hotkeys from scintilla
            richTextBox1.ClearCmdKey(Keys.Control | Keys.F);
            richTextBox1.ClearCmdKey(Keys.Control | Keys.R);
            richTextBox1.ClearCmdKey(Keys.Control | Keys.H);
            richTextBox1.ClearCmdKey(Keys.Control | Keys.L);
            richTextBox1.ClearCmdKey(Keys.Control | Keys.U);
        }
예제 #11
0
        private void InitHotkeys()
        {
            // register the hotkeys with the form
            //HotKeyManager.AddHotKey(form, OpenSearch, Keys.F, true);
            HotKeyManager.AddHotKey(Form, OpenFindDialog, Keys.F, true, false, true);
            HotKeyManager.AddHotKey(Form, OpenReplaceDialog, Keys.R, true);
            HotKeyManager.AddHotKey(Form, OpenReplaceDialog, Keys.H, true);
            HotKeyManager.AddHotKey(Form, Uppercase, Keys.U, true);
            HotKeyManager.AddHotKey(Form, SetIndentation, Keys.I, true);
            HotKeyManager.AddHotKey(Form, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(Form, Lowercase, Keys.L, true);
            HotKeyManager.AddHotKey(Form, ZoomIn, Keys.Oemplus, true);
            HotKeyManager.AddHotKey(Form, ZoomOut, Keys.OemMinus, true);
            HotKeyManager.AddHotKey(Form, ZoomDefault, Keys.D0, true);
            //HotKeyManager.AddHotKey(this, CloseSearch, Keys.Escape);

            // remove conflicting hotkeys from scintilla
            TextArea.ClearCmdKey(Keys.Control | Keys.F);
            TextArea.ClearCmdKey(Keys.Control | Keys.R);
            TextArea.ClearCmdKey(Keys.Control | Keys.H);
            TextArea.ClearCmdKey(Keys.Control | Keys.L);
            TextArea.ClearCmdKey(Keys.Control | Keys.U);
        }
예제 #12
0
 private void InitHotKeys()
 {
     HotKeyManager.RemoveHotKeys();
     HotKeyManager.AddHotKey(DeleteSelected, Keys.Delete);
 }