Alsing.Windows.Forms.SyntaxBoxControl.SyntaxBoxControl C# (CSharp) Method

SyntaxBoxControl() public method

Default constructor for the SyntaxBoxControl
public SyntaxBoxControl ( ) : System
return System
        public SyntaxBoxControl()
        {
            try
            {
                Document = new SyntaxDocument();


                CreateViews();


                InitializeComponent();
                SetStyle(ControlStyles.Selectable, true);

                //assign keys
                KeyboardActions.Add(new KeyboardAction(Keys.Z, false, true, false,
                                                       false, Undo));
                KeyboardActions.Add(new KeyboardAction(Keys.Y, false, true, false,
                                                       false, Redo));

                KeyboardActions.Add(new KeyboardAction(Keys.F3, false, false, false,
                                                       true, FindNext));

                KeyboardActions.Add(new KeyboardAction(Keys.C, false, true, false, true,
                                                       Copy));
                KeyboardActions.Add(new KeyboardAction(Keys.X, false, true, false,
                                                       false, CutClear));
                KeyboardActions.Add(new KeyboardAction(Keys.V, false, true, false,
                                                       false, Paste));

                KeyboardActions.Add(new KeyboardAction(Keys.Insert, false, true, false,
                                                       true, Copy));
                KeyboardActions.Add(new KeyboardAction(Keys.Delete, true, false, false,
                                                       false, Cut));
                KeyboardActions.Add(new KeyboardAction(Keys.Insert, true, false, false,
                                                       false, Paste));

                KeyboardActions.Add(new KeyboardAction(Keys.A, false, true, false, true,
                                                       SelectAll));

                KeyboardActions.Add(new KeyboardAction(Keys.F, false, true, false,
                                                       false, ShowFind));
                KeyboardActions.Add(new KeyboardAction(Keys.H, false, true, false,
                                                       false, ShowReplace));
                KeyboardActions.Add(new KeyboardAction(Keys.G, false, true, false, true,
                                                       ShowGotoLine));
                KeyboardActions.Add(new KeyboardAction(Keys.T, false, true, false,
                                                       false, ShowSettings));

                KeyboardActions.Add(new KeyboardAction(Keys.F2, false, true, false,
                                                       true, ToggleBookmark));
                KeyboardActions.Add(new KeyboardAction(Keys.F2, false, false, false,
                                                       true, GotoNextBookmark));
                KeyboardActions.Add(new KeyboardAction(Keys.F2, true, false, false,
                                                       true, GotoPreviousBookmark)
                    );

                KeyboardActions.Add(new KeyboardAction(Keys.Escape, false, false, false,
                                                       true, ClearSelection));

                KeyboardActions.Add(new KeyboardAction(Keys.Tab, false, false, false,
                                                       false, Selection.Indent));
                KeyboardActions.Add(new KeyboardAction(Keys.Tab, true, false, false,
                                                       false, Selection.Outdent));

                AutoListIcons = _AutoListIcons;
            }
            catch
            {
                //	Console.WriteLine (x.StackTrace);
            }
        }