Exemple #1
0
        void InitializeShortcutKeys()
        {
            KeyMap.Default.KeyManChanged += Default_KeyManChanged;
            Default_KeyManChanged(null, EventArgs.Empty);

            ShortcutKeys = new ShortcutKeysTable();
            ShortcutKeys.Register(KeyMap.New, delegate() { NewDocument(); });
            ShortcutKeys.Register(KeyMap.Open, delegate() { OpenDocument(); });
            ShortcutKeys.Register(KeyMap.NextTab, delegate() { taskBar1.SelectNextTab(false); });
            ShortcutKeys.Register(KeyMap.PreviousTab, delegate() { taskBar1.SelectNextTab(true); });
        }
Exemple #2
0
        private void InitializeKeyBoard()
        {
            ShortcutKeys = new ShortcutKeysTable();
            ShortcutKeys.Register(KeyMap.ExpandAll, delegate() { ExpandAll(); });
            ShortcutKeys.Register(KeyMap.CollapseAll, delegate() { CollapseAll(); });

            ShortcutKeys.Register(KeyMap.ZoomIn, delegate() { ZoomIn(); });
            ShortcutKeys.Register(KeyMap.ZoomOut, delegate() { ZoomOut(); });
            ShortcutKeys.Register(KeyMap.ZoomActualSize, delegate() { Zoom = 1.0f; });

            ShortcutKeys.Register(KeyMap.Undo, delegate() { if (CanUndo)
                                                            {
                                                                Undo();
                                                            }
                                  });
            ShortcutKeys.Register(KeyMap.Redo, delegate() { if (CanRedo)
                                                            {
                                                                Redo();
                                                            }
                                  });

            ShortcutKeys.Register(KeyMap.Copy, delegate() { if (CanCopy)
                                                            {
                                                                Copy();
                                                            }
                                  });
            ShortcutKeys.Register(KeyMap.Cut, delegate() { if (CanCut)
                                                           {
                                                               Cut();
                                                           }
                                  });
            ShortcutKeys.Register(KeyMap.Paste, delegate() { if (CanPaste)
                                                             {
                                                                 Paste();
                                                             }
                                  });

            ShortcutKeys.Register(KeyMap.MoveUp, delegate() { CustomSort(-1); });
            ShortcutKeys.Register(KeyMap.MoveDown, delegate() { CustomSort(1); });

            ShortcutKeys.Register(KeyMap.SelectAll, delegate() { SelectAll(); });

            ShortcutKeys.Register(KeyMap.Expand, delegate() { ExpandSelect(true); });
            ShortcutKeys.Register(KeyMap.Collapse, delegate() { CollapseSelect(true); });
            ShortcutKeys.Register(KeyMap.ToggleFolding, delegate() { ToggleFolding(); });

            ShortcutKeys.Register(KeyMap.AddSubTopic, delegate() { if (!ReadOnly)
                                                                   {
                                                                       AddSubTopic();
                                                                   }
                                  });
            ShortcutKeys.Register(KeyMap.AddSubTopic2, delegate() { if (!ReadOnly)
                                                                    {
                                                                        AddSubTopic();
                                                                    }
                                  });
            ShortcutKeys.Register(KeyMap.AddTopic, delegate() { if (!ReadOnly)
                                                                {
                                                                    AddTopic();
                                                                }
                                  });
            ShortcutKeys.Register(KeyMap.AddTopicFront, delegate() { if (!ReadOnly)
                                                                     {
                                                                         AddTopicFront();
                                                                     }
                                  });
            ShortcutKeys.Register(KeyMap.Edit, delegate() { if (!ReadOnly)
                                                            {
                                                                EditObject();
                                                            }
                                  });
            ShortcutKeys.Register(KeyMap.Edit2, delegate() { if (!ReadOnly)
                                                             {
                                                                 EditObject();
                                                             }
                                  });
            ShortcutKeys.Register(KeyMap.Delete, delegate() { if (!ReadOnly)
                                                              {
                                                                  DeleteObject();
                                                              }
                                  });

            ShortcutKeys.Register(KeyMap.Left, delegate() { SelectNextTopic(MoveVector.Left); });
            ShortcutKeys.Register(KeyMap.Up, delegate() { SelectNextTopic(MoveVector.Up); });
            ShortcutKeys.Register(KeyMap.Right, delegate() { SelectNextTopic(MoveVector.Right); });
            ShortcutKeys.Register(KeyMap.Down, delegate() { SelectNextTopic(MoveVector.Down); });
            ShortcutKeys.Register(KeyMap.Cancel, delegate() { if (MouseState == ChartMouseState.Drag)
                                                              {
                                                                  CancelDrag();
                                                              }
                                  });
        }
Exemple #3
0
        //protected override void OnCreateControl()
        //{
        //    base.OnCreateControl();

        //    LayoutControls();
        //}

        //protected override void OnResize(EventArgs e)
        //{
        //    base.OnResize(e);

        //    LayoutControls();
        //}

        private void InitializeKeyBoard()
        {
            ShortcutKeys = new ShortcutKeysTable();
            ShortcutKeys.Register(KeyMap.SelectAll, delegate() { InternalTextBox.SelectAll(); });
        }