Example #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if ((provider != null) && (((IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService))) != null))
            {
                var form = new HotkeysEditorForm(HotkeysMapping.Parse(value as string));

                if (form.ShowDialog() == DialogResult.OK)
                {
                    value = form.GetHotkeys().ToString();
                }
            }
            return(value);
        }
 private void changeHotkeysToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var form = new HotkeysEditorForm(fctb.HotkeysMapping);
     if(form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         fctb.HotkeysMapping = form.GetHotkeys();
 }
Example #3
0
 public void HotKeysDialog()
 {
     var form = new HotkeysEditorForm(TB.HotkeysMapping);
     if (form.ShowDialog() == DialogResult.OK)
         TB.HotkeysMapping = form.GetHotkeys();
 }
Example #4
0
 private void menuItem100_Click(object sender, EventArgs e)
 {
     var fctb = ActiveEditor.Tb;
     var form = new HotkeysEditorForm(fctb.HotkeysMapping);
     if (form.ShowDialog() == DialogResult.OK)
     {
         fctb.HotkeysMapping = form.GetHotkeys();
         File.WriteAllText(GlobalSettings.SettingsDir + "Editor.ynotekeys", form.GetHotkeys().ToString());
     }
 }
Example #5
0
 private void hotKeysToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         var form = new HotkeysEditorForm(ActiveEditor.codebox.HotkeysMapping);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             ActiveEditor.codebox.HotkeysMapping = form.GetHotkeys();
     }
     catch (System.Exception ex) { Console.WriteLine(ex.Message); }
 }