Пример #1
0
        internal NCommandContext CreateContext(string text, int id, ImageList images, int imageIndex, int rangeID, NShortcut sc, bool beginGroup)
        {
            NCommandContext c = new NCommandContext();

            c.RangeID = rangeID;
            if (id != -1)
            {
                c.Properties.ID = id;
                m_iContextID    = id + 1;
            }
            else
            {
                c.Properties.ID = m_iContextID;
            }
            c.Properties.ImageList  = images;
            c.Properties.ImageIndex = imageIndex;
            c.Properties.BeginGroup = beginGroup;

            c.Properties.Text = text;
            if (sc != null)
            {
                c.Properties.Shortcut = sc;
            }

            m_Manager.Contexts.Add(c);
            m_iContextID++;

            return(c);
        }
Пример #2
0
        internal void SetImage(Image img)
        {
            NCommandContext c = m_Manager.Contexts.ContextFromID((int)Contexts.BackgroundImage1);

            foreach (NCommandContext c1 in c.Contexts)
            {
                Nevron.UI.WinForm.Controls.NCommand[] commands = c1.GetCommands();
                foreach (Nevron.UI.WinForm.Controls.NCommand comm in commands)
                {
                    comm.Properties.MenuOptions.BackgroundImageInfo.Image = img;
                }
            }
        }
Пример #3
0
        internal void SetFadeImageAndImageShadow(NCommandContext parent, bool fade, bool shadow)
        {
            NCommandContext context;
            int             count = parent.Contexts.Count;

            for (int i = 0; i < count; i++)
            {
                context = parent.Contexts[i];
                context.Properties.FadeImage   = fade;
                context.Properties.ImageShadow = shadow;

                SetFadeImageAndImageShadow(context, fade, shadow);
            }
        }
Пример #4
0
        internal void CreateViewStyleContext()
        {
            NCommandContext c, c1;

            c                       = new NCommandContext();
            c.RangeID               = 4;
            c.Properties.ID         = (int)Contexts.ViewStyle;
            c.Properties.ImageList  = MainForm.ViewImages;
            c.Properties.Text       = "View Style";
            c.Properties.ImageIndex = 12;
            m_Manager.Contexts.Add(c);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Fit";
            c1.Properties.ID         = (int)Contexts.ViewStyleFit;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 13;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Stretch";
            c1.Properties.ID         = (int)Contexts.ViewStyleStretch;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 14;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Stretch To Width";
            c1.Properties.ID         = (int)Contexts.ViewStyleStretchToWidth;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 15;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Stretch To Height";
            c1.Properties.ID         = (int)Contexts.ViewStyleStretchToHeight;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 16;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);
        }
Пример #5
0
        internal void CreateNewContext()
        {
            NCommandContext c, c1;

            int context = (int)Contexts.NewFile;

            c                      = new NCommandContext();
            c.RangeID              = 0;
            c.Properties.ID        = context;
            c.Properties.ImageList = MainForm.StandardImages;
            c.Properties.Text      = "New";
            c.Properties.MenuOptions.DisplayTooltips = true;
            c.Properties.ImageIndex = 0;
            m_Manager.Contexts.Add(c);

            c1 = new NCommandContext();
            c1.Properties.Text        = "New Document";
            c1.Properties.TooltipText = "Creates a new document.<br/>";
            c1.Properties.ID          = (int)context + 1;
            c1.Properties.Shortcut    = new NShortcut(Keys.N, Keys.Control | Keys.Shift);
            c1.RangeID = 0;
            c1.Properties.ImageIndex = 0;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "New Diagram";
            c1.Properties.ID         = context + 2;
            c1.Properties.Shortcut   = new NShortcut(Keys.D, Keys.Control | Keys.Shift);
            c1.RangeID               = 0;
            c1.Properties.ImageIndex = 0;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "New Flow Chart";
            c1.Properties.ID         = context + 3;
            c1.Properties.Shortcut   = new NShortcut(Keys.F, Keys.Control | Keys.Shift);
            c1.RangeID               = 0;
            c1.Properties.ImageIndex = 0;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);
        }
Пример #6
0
        internal void InitStandardContexts()
        {
            CreateNewContext();
            CreateContext("&Open...", (int)Contexts.Open, MainForm.StandardImages, 1, 0, new NShortcut(Keys.O, Keys.Control), false);
            CreateContext("&Save", (int)Contexts.Save, MainForm.StandardImages, 2, 0, new NShortcut(Keys.S, Keys.Control), false);

            CreateContext("Cu&t", (int)Contexts.Cut, MainForm.StandardImages, 3, 0, new NShortcut(Keys.X, Keys.Control), true);
            CreateContext("&Copy", (int)Contexts.Copy, MainForm.StandardImages, 4, 0, new NShortcut(Keys.C, Keys.Control), false);
            CreateContext("&Paste", (int)Contexts.Paste, MainForm.StandardImages, 5, 0, new NShortcut(Keys.V, Keys.Control), false);
            CreateContext("&Delete", (int)Contexts.Delete, MainForm.StandardImages, 6, 0, new NShortcut(Keys.Delete, Keys.Control), false);

            //create the undo/redo contexts
            NUndoRedoCommandContext c = new NUndoRedoCommandContext();

            c.Properties.ImageIndex = 7;
            c.Properties.ID         = (int)Contexts.Undo;
            c.Properties.Text       = "&Undo";
            c.LabelText             = "Undo";
            c.Properties.ImageList  = MainForm.StandardImages;
            c.Properties.Shortcut   = new NShortcut(Keys.Z, Keys.Control);
            c.Properties.BeginGroup = true;
            c.RangeID       = 0;
            c.Properties.ID = (int)Contexts.Undo;
            m_Manager.Contexts.Add(c);

            c = new NUndoRedoCommandContext();
            c.Properties.ImageIndex = 8;
            c.Properties.Text       = "&Redo";
            c.LabelText             = "Redo";
            c.Properties.ID         = (int)Contexts.Redo;
            c.Properties.ImageList  = MainForm.StandardImages;
            c.Properties.Shortcut   = new NShortcut(Keys.Y, Keys.Control);
            c.RangeID       = 0;
            c.Properties.ID = (int)Contexts.Redo;
            m_Manager.Contexts.Add(c);

            NCommandContext c1 = CreateContext("P&rint", (int)Contexts.Print, MainForm.StandardImages, 9, 0, new NShortcut(Keys.P, Keys.Control), true);

            //c1.Properties.Visible = false;
            CreateContext("Print Pre&view", (int)Contexts.PrintPreview, MainForm.StandardImages, 10, 0, new NShortcut(Keys.P, Keys.Control | Keys.Shift), false);
        }
Пример #7
0
        internal void CreateGridStyleContext()
        {
            NCommandContext c, c1;

            c         = new NCommandContext();
            c.RangeID = 4;
            c.Properties.BeginGroup = true;
            c.Properties.ID         = (int)Contexts.GridStyle;
            c.Properties.ImageList  = MainForm.ViewImages;
            c.Properties.Text       = "Grid Style";
            c.Properties.ImageIndex = 6;
            m_Manager.Contexts.Add(c);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Major Lines";
            c1.Properties.ID         = (int)Contexts.GridStyleMajorLines;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 6;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Major Dots";
            c1.Properties.ID         = (int)Contexts.GridStyleMajorDots;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 7;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Major Minor Lines";
            c1.Properties.ID         = (int)Contexts.GridStyleMajorMinorLines;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 8;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Interlaced";
            c1.Properties.ID         = (int)Contexts.GridStyleInterlaced;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 9;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Interlaced Horizontally";
            c1.Properties.ID         = (int)Contexts.GridStyleInterlacedHorizontally;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 10;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);

            c1 = new NCommandContext();
            c1.Properties.Text       = "Interlaced Vertically";
            c1.Properties.ID         = (int)Contexts.GridStyleInterlacedVertically;
            c1.RangeID               = 4;
            c1.Properties.ImageIndex = 11;
            c.Contexts.Add(c1);
            m_Manager.Contexts.Add(c1);
        }
Пример #8
0
        internal void InitMenuContexts()
        {
            NCommandContext context1, context2, context3;

            //file
            context1 = NCommandContext.CreateContext("&File", -1, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            context2 = NCommandContext.CreateContext("&New", -1, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, false);
            context2.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.NewProject));
            context2.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.NewBlankSolution));

            context1.Contexts.Add(context2);
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddNewItem));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddExistingItem));

            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Open);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Save);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.SaveAll);
            context1.Contexts.Add((NCommandContext)context3.Clone());

            //file->exit context
            context2 = NCommandContext.CreateContext("E&xit", (int)NIDELoadUC.CommandID.Exit, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, true);
            m_CommandBarsManager.Contexts.Add(context2);
            context1.Contexts.Add(context2);

            //edit context
            context1 = NCommandContext.CreateContext("&Edit", -1, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Undo);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Redo);
            context1.Contexts.Add((NCommandContext)context3.Clone());

            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Cut);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Copy);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Paste);
            context1.Contexts.Add((NCommandContext)context3.Clone());

            //edit->selectall context
            context2 = NCommandContext.CreateContext("Select &All", (int)NIDELoadUC.CommandID.SelectAll, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, true);
            m_CommandBarsManager.Contexts.Add(context2);
            context1.Contexts.Add(context2);

            //view context
            context1 = NCommandContext.CreateContext("&View", -1, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.SolutionExplorer);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Properties);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.ObjectBrowser);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context3 = m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Toolbox);
            context1.Contexts.Add((NCommandContext)context3.Clone());
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.ClassView));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.ServerExplorer));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.ResourceView));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.TaskList));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.CommandWindow));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.Output));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.FindSymbolResults));

            //project context
            context1 = NCommandContext.CreateContext("&Project", -1, null, -1, (int)NIDELoadUC.RangeID.MenuBar, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddNewItem));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddExistingItem));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddWindowsForm));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddInheritedForm));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddUsercontrol));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddInheritedControl));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddComponent));
            context1.Contexts.Add(m_CommandBarsManager.Contexts.ContextFromID((int)NIDELoadUC.CommandID.AddClass));
        }
Пример #9
0
        internal void InitStandardContexts()
        {
            NCommandContext context1, context2;

            //new project context
            context1 = NCommandContext.CreateContext("New Project...", -1, NIDELoadUC.StandardImageList, 0, (int)NIDELoadUC.RangeID.Standard, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            context2 = NCommandContext.CreateContext("New Project...", (int)NIDELoadUC.CommandID.NewProject, NIDELoadUC.StandardImageList, 0, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.N, Keys.Control | Keys.Shift), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("New Blank Solution...", (int)NIDELoadUC.CommandID.NewBlankSolution, NIDELoadUC.StandardImageList, 1, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            //add new item context
            context1 = NCommandContext.CreateContext("Add Ne&w Item...", -1, NIDELoadUC.StandardImageList, 2, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.A, Keys.Control | Keys.Shift), false);
            m_CommandBarsManager.Contexts.Add(context1);

            context2 = NCommandContext.CreateContext("Add Ne&w Item...", (int)NIDELoadUC.CommandID.AddNewItem, NIDELoadUC.StandardImageList, 2, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.A, Keys.Control | Keys.Shift), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add Existin&g Item...", (int)NIDELoadUC.CommandID.AddExistingItem, NIDELoadUC.StandardImageList, 3, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.A, Keys.Alt | Keys.Shift), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add Windows &Form", (int)NIDELoadUC.CommandID.AddWindowsForm, NIDELoadUC.StandardImageList, 4, (int)NIDELoadUC.RangeID.Standard, null, true);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add &Inherited Form", (int)NIDELoadUC.CommandID.AddInheritedForm, NIDELoadUC.StandardImageList, 4, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add &User Control", (int)NIDELoadUC.CommandID.AddUsercontrol, NIDELoadUC.StandardImageList, 5, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add Inherited Con&trol", (int)NIDELoadUC.CommandID.AddInheritedControl, NIDELoadUC.StandardImageList, 5, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add Compo&nent", (int)NIDELoadUC.CommandID.AddComponent, NIDELoadUC.StandardImageList, 6, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Add &Class...", (int)NIDELoadUC.CommandID.AddClass, NIDELoadUC.StandardImageList, 7, (int)NIDELoadUC.RangeID.Standard, null, false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            //open context
            context1 = NCommandContext.CreateContext("&Open...", (int)NIDELoadUC.CommandID.Open, NIDELoadUC.StandardImageList, 8, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.O, Keys.Control), true);
            m_CommandBarsManager.Contexts.Add(context1);

            //save context
            context1 = NCommandContext.CreateContext("Sa&ve", (int)NIDELoadUC.CommandID.Save, NIDELoadUC.StandardImageList, 9, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.S, Keys.Control), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //save all context
            context1 = NCommandContext.CreateContext("Save A&ll", (int)NIDELoadUC.CommandID.SaveAll, NIDELoadUC.StandardImageList, 10, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.S, Keys.Control | Keys.Shift), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //cut context
            context1 = NCommandContext.CreateContext("Cu&t", (int)NIDELoadUC.CommandID.Cut, NIDELoadUC.StandardImageList, 11, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.X, Keys.Control), true);
            m_CommandBarsManager.Contexts.Add(context1);

            //copy context
            context1 = NCommandContext.CreateContext("&Copy", (int)NIDELoadUC.CommandID.Copy, NIDELoadUC.StandardImageList, 12, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.C, Keys.Control), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //paste context
            context1 = NCommandContext.CreateContext("&Paste", (int)NIDELoadUC.CommandID.Paste, NIDELoadUC.StandardImageList, 13, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.V, Keys.Control), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //undo context
            context1 = new NUndoRedoCommandContext();
            context1.Properties.ImageIndex = 14;
            context1.Properties.ID         = (int)NIDELoadUC.CommandID.Undo;
            context1.Properties.Text       = "&Undo";
            context1.Properties.ImageList  = NIDELoadUC.StandardImageList;
            context1.Properties.Shortcut   = new NShortcut(Keys.Z, Keys.Control);
            context1.Properties.BeginGroup = true;
            context1.RangeID = (int)NIDELoadUC.RangeID.Standard;
            m_CommandBarsManager.Contexts.Add(context1);

            //redo context
            context1 = new NUndoRedoCommandContext();
            context1.Properties.ImageIndex = 15;
            context1.Properties.Text       = "&Redo";
            context1.Properties.ID         = (int)NIDELoadUC.CommandID.Redo;
            context1.Properties.ImageList  = NIDELoadUC.StandardImageList;
            context1.Properties.Shortcut   = new NShortcut(Keys.Y, Keys.Control);
            context1.RangeID = (int)NIDELoadUC.RangeID.Standard;
            m_CommandBarsManager.Contexts.Add(context1);

            //navigate backward context
            context1 = NCommandContext.CreateContext("N&avigate Backward", (int)NIDELoadUC.CommandID.NavigateBackward, NIDELoadUC.StandardImageList, 16, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.OemMinus, Keys.Control), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //navigate forward context
            context1 = NCommandContext.CreateContext("Navigate &Forward", (int)NIDELoadUC.CommandID.NavigateForward, NIDELoadUC.StandardImageList, 17, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.OemMinus, Keys.Control | Keys.Shift), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //start debug context
            context1 = NCommandContext.CreateContext("Start / Continue", (int)NIDELoadUC.CommandID.StartContinue, NIDELoadUC.StandardImageList, 18, (int)NIDELoadUC.RangeID.Standard, null, true);
            m_CommandBarsManager.Contexts.Add(context1);

            //solution configuration context
            NComboBoxCommandContext context3 = new NComboBoxCommandContext();

            context3.Properties.ID = (int)NIDELoadUC.CommandID.SolutionConfigurations;
            context3.ListProperties.ColumnOnLeft = false;
            context3.ListProperties.ItemHeight   = 15;
            context3.ComboBox.DropDownWidth      = 160;
            context3.Properties.Text             = "Solution Configurations";
            context3.RangeID = (int)NIDELoadUC.RangeID.Standard;

            context3.Items.Add("Debug");
            context3.Items.Add("Release");
            context3.Items.Add("Configuration Manager...");
            context3.ComboBox.SelectedIndex = 0;
            m_CommandBarsManager.Contexts.Add(context3);

            //solution explorer context
            context1 = NCommandContext.CreateContext("Solution &Explorer", (int)NIDELoadUC.CommandID.SolutionExplorer, NIDELoadUC.StandardImageList, 19, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.L, Keys.Control | Keys.Alt), true);
            m_CommandBarsManager.Contexts.Add(context1);

            //properties window context
            context1 = NCommandContext.CreateContext("Properties &Window", (int)NIDELoadUC.CommandID.Properties, NIDELoadUC.StandardImageList, 20, (int)NIDELoadUC.RangeID.Standard, null, false);
            m_CommandBarsManager.Contexts.Add(context1);

            //object browser context
            context1 = NCommandContext.CreateContext("Ob&ject Browser", (int)NIDELoadUC.CommandID.ObjectBrowser, NIDELoadUC.StandardImageList, 21, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.J, Keys.Control | Keys.Alt), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //toolbox context
            context1 = NCommandContext.CreateContext("Toolbo&x", (int)NIDELoadUC.CommandID.Toolbox, NIDELoadUC.StandardImageList, 22, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.X, Keys.Control | Keys.Alt), false);
            m_CommandBarsManager.Contexts.Add(context1);

            //class view context
            context1 = NCommandContext.CreateContext("Cl&ass View", -1, NIDELoadUC.StandardImageList, 23, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.C, Keys.Control | Keys.Shift), false);
            m_CommandBarsManager.Contexts.Add(context1);

            context2 = NCommandContext.CreateContext("Cl&ass View", (int)NIDELoadUC.CommandID.ClassView, NIDELoadUC.StandardImageList, 23, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.C, Keys.Control | Keys.Shift), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Ser&ver Explorer", (int)NIDELoadUC.CommandID.ServerExplorer, NIDELoadUC.StandardImageList, 24, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.S, Keys.Control | Keys.Alt), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("&Resource View", (int)NIDELoadUC.CommandID.ResourceView, NIDELoadUC.StandardImageList, 25, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.E, Keys.Control | Keys.Shift), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("&Task List", (int)NIDELoadUC.CommandID.TaskList, NIDELoadUC.StandardImageList, 26, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.K, Keys.Control | Keys.Alt), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Comma&nd Window", (int)NIDELoadUC.CommandID.CommandWindow, NIDELoadUC.StandardImageList, 27, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.A, Keys.Control | Keys.Alt), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("&Output", (int)NIDELoadUC.CommandID.Output, NIDELoadUC.StandardImageList, 28, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.O, Keys.Control | Keys.Alt), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);

            context2 = NCommandContext.CreateContext("Find S&ymbol Results", (int)NIDELoadUC.CommandID.FindSymbolResults, NIDELoadUC.StandardImageList, 29, (int)NIDELoadUC.RangeID.Standard, new NShortcut(Keys.F12, Keys.Control | Keys.Alt), false);
            context1.Contexts.Add(context2);
            m_CommandBarsManager.Contexts.Add(context2);
        }
        private void CreateColorSchemeContext()
        {
            //create the parent context for all color schemes
            NCommandContext parent = NCommandContext.CreateContext("Color &Scheme", (int)NDiagramExamplesCommandIDs.ColorScheme, null, -1, -1, null, false);

            Contexts.Add(parent);

            //create a context for each color scheme
            NCommandContext scheme;

            scheme = NCommandContext.CreateContext("&Automatic", (int)NDiagramExamplesCommandIDs.ColorScheme_Automatic, null, -1, -1, null, false);
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("&Standard", (int)NDiagramExamplesCommandIDs.ColorScheme_Standard, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Standard;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("&Widows Default", (int)NDiagramExamplesCommandIDs.ColorScheme_WindowsDefault, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.WindowsDefault;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Luna &Blue", (int)NDiagramExamplesCommandIDs.ColorScheme_LunaBlue, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.LunaBlue;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Luna &Olive", (int)NDiagramExamplesCommandIDs.ColorScheme_LunaOlive, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.LunaOlive;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Luna Sil&ver", (int)NDiagramExamplesCommandIDs.ColorScheme_LunaSilver, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.LunaSilver;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("&Longhorn", (int)NDiagramExamplesCommandIDs.ColorScheme_Longhorn, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Longhorn;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("&Energy", (int)NDiagramExamplesCommandIDs.ColorScheme_Energy, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Energy;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Lila&c", (int)NDiagramExamplesCommandIDs.ColorScheme_Lilac, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Lilac;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Bl&ue", (int)NDiagramExamplesCommandIDs.ColorScheme_Blue, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Blue;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("&Gold", (int)NDiagramExamplesCommandIDs.ColorScheme_Gold, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Gold;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);

            scheme = NCommandContext.CreateContext("Custo&m", (int)NDiagramExamplesCommandIDs.ColorScheme_Custom, null, -1, -1, null, false);
            scheme.Properties.Tag = ColorScheme.Custom;
            parent.Contexts.Add(scheme);
            Contexts.Add(scheme);
        }