Exemplo n.º 1
0
        private void AddMenuItem(C1CommandMenu cm, string caption)
        {
            C1Command c = new C1Command();

            c.Text = caption;
            chMain.Commands.Add(c);

            cm.CommandLinks.Add(new C1CommandLink(c));
        }
Exemplo n.º 2
0
        private void AddCommandMenuItem(C1CommandMenu menu, string text)
        {
            C1Command c = new C1Command();

            c.Text     = text;
            c.UserData = s_rbnInsertTextTag;
            chMain.Commands.Add(c);
            menu.CommandLinks.Add(new C1CommandLink(c));
        }
Exemplo n.º 3
0
        private C1CommandMenu AddMainLink(C1MainMenu mainMenu, string menuname)
        {
            C1CommandMenu commandMenu = new C1CommandMenu();

            C1.Win.C1Command.C1CommandLink link = new C1.Win.C1Command.C1CommandLink();
            link.Text    = menuname;
            link.Command = commandMenu;
            mainMenu.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] { link });
            commandHolder.Commands.Add(commandMenu);
            return(commandMenu);
        }
Exemplo n.º 4
0
 private void ZoomCommandLinksBounds(ZoomBoundsInfo infos, C1CommandLinks commandLinks)
 {
     foreach (C1CommandLink commandLink in commandLinks)
     {
         if (commandLink.Command is C1CommandMenu)
         {
             C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu;
             ZoomCommandLinksBounds(infos, commandMenu.CommandLinks);
             return;
         }
     }
 }
Exemplo n.º 5
0
 private void _clearSubMenus(RibbonMenu rParent, C1CommandMenu cParent)
 {
     foreach (RibbonMenu rmnu in rParent.Items)
     {
         rmnu.Items.Clear();
     }
     foreach (C1CommandLink cl in cParent.CommandLinks)
     {
         ((C1CommandMenu)cl.Command).CommandLinks.ClearAll();
     }
     _clearMenus(rParent, cParent);
 }
Exemplo n.º 6
0
        private void _addSubMenus(RibbonMenu rParent, C1CommandMenu cParent, string menuName, string[] texts)
        {
            rParent.Enabled = cParent.Enabled = true;
            RibbonMenu rMenu = new RibbonMenu();

            rMenu.Text = menuName;
            C1CommandMenu cMenu = new C1CommandMenu();

            cMenu.Text = menuName;
            chMain.Commands.Add(cMenu);
            _addMenus(rMenu, cMenu, texts);
            rParent.Items.Add(rMenu);
            cParent.CommandLinks.Add(new C1CommandLink(cMenu));
        }
Exemplo n.º 7
0
        private C1CommandMenu AddLink(C1.Win.C1Command.C1CommandMenu cmenu, ND_MENU m)
        {
            C1CommandMenu commandMenu = new C1CommandMenu();

            C1.Win.C1Command.C1CommandLink link = new C1.Win.C1Command.C1CommandLink();
            link.Text    = m.MENUCAPTION;
            link.Command = commandMenu;

            cmenu.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] { link });
            commandMenu.Text     = m.MENUCAPTION;
            commandMenu.UserData = m;
            commandHolder.Commands.Add(commandMenu);
            return(commandMenu);
        }
Exemplo n.º 8
0
 private void ZoomCommandLinksFont(ZoomFontInfo infos, C1CommandLinks commandLinks)
 {
     foreach (C1CommandLink commandLink in commandLinks)
     {
         if (commandLink.Command is C1CommandMenu)
         {
             C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu;
             if (!SystemInformation.MenuFont.Equals(commandMenu.Font))
             {
                 commandMenu.Font = infos.Zoom(commandMenu.Font);
             }
             ZoomCommandLinksFont(infos, commandMenu.CommandLinks);
             continue;
         }
     }
 }
Exemplo n.º 9
0
 private void _addMenus(RibbonMenu rMenu, C1CommandMenu cMenu, string[] texts)
 {
     if (texts == null || texts.Length == 0)
     {
         rMenu.Enabled = rMenu.Items.Count > 0;
         cMenu.Enabled = cMenu.CommandLinks.Count > 0;
     }
     else
     {
         rMenu.Enabled = cMenu.Enabled = true;
         foreach (string text in texts)
         {
             AddRibbonInsertTextButton(rMenu, text);
             AddCommandMenuItem(cMenu, text);
         }
     }
 }
Exemplo n.º 10
0
 private void AddChildren(List <Control> controls, C1CommandLinks commandLinks)
 {
     foreach (C1CommandLink commandLink in commandLinks)
     {
         if (commandLink.Command is C1CommandMenu)
         {
             C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu;
             AddChildren(controls, commandMenu.CommandLinks);
             continue;
         }
         else if (commandLink.Command is C1CommandControl)
         {
             C1CommandControl commandControl = commandLink.Command as C1CommandControl;
             if (commandControl.Control != null && !controls.Contains(commandControl.Control))
             {
                 controls.Add(commandControl.Control);
             }
         }
     }
 }
Exemplo n.º 11
0
        private void FillItems(
            C1CommandMenu cm,
            Type type,
            ClickEventHandler commandClick,
            CommandStateQueryEventHandler commandStateQuery)
        {
            Array values = Enum.GetValues(type);

            string[] names = Enum.GetNames(type);

            cm.CommandLinks.Clear();
            for (int i = 0; i < values.Length; i++)
            {
                C1Command cmd = new C1Command();
                cmd.Text               = names[i];
                cmd.UserData           = values.GetValue(i);
                cmd.CommandStateQuery += commandStateQuery;
                cmd.Click             += commandClick;
                C1CommandLink cl = new C1CommandLink(cmd);
                cm.CommandLinks.Add(cl);
            }
        }
Exemplo n.º 12
0
        private void Form1_Load(object sender, System.EventArgs e)
        {
            C1CommandHolder ch = C1CommandHolder.CreateCommandHolder(this);

            // In this sample, we use a single event handler for all commands,
            // and use a switch statement inside that handler to select the specific
            // action. Alternatively, each command can be assigned its own Click
            // event handler. Or, a mix of the two approaches is possible.
            ch.CommandClick += new CommandClickEventHandler(CommandClickHandler);
            // use the image list for command images
            ch.ImageList = this.imageList1;
            // modern look:
            ch.LookAndFeel = LookAndFeelEnum.Office2003;

            C1MainMenu mm = new C1MainMenu();

            this.Controls.Add(mm);
            // For the main menu, its CommandHolder property should be set
            // (this is not required for builds 1.0.20041.47 or later of C1Command).
            mm.CommandHolder = ch;

            // Main menu - File
            C1CommandMenu mFile = (C1CommandMenu)ch.CreateCommand(typeof(C1CommandMenu));

            mFile.Text = "&File";
            mm.CommandLinks.Add(new C1CommandLink(mFile));

            // create commands for file ops
            C1Command cNew = ch.CreateCommand();

            cNew.Text = "&New";
            // UserData is arbitrary data associated with commands;
            // In this example we use text labels to recognize specific commands
            // in the single command handler. Alternatively, we could have commands
            // as members of our class, and compare objects to recognize commands.
            cNew.UserData   = "file_new";
            cNew.Shortcut   = Shortcut.CtrlN;
            cNew.ImageIndex = 1;
            C1Command cOpen = ch.CreateCommand();

            cOpen.Text       = "&Open";
            cOpen.UserData   = "file_open";
            cOpen.Shortcut   = Shortcut.CtrlO;
            cOpen.ImageIndex = 0;
            C1Command cExit = ch.CreateCommand();

            cExit.Text     = "E&xit";
            cExit.UserData = "exit";
            cExit.Shortcut = Shortcut.CtrlX;

            mFile.CommandLinks.Add(new C1CommandLink(cNew));
            mFile.CommandLinks.Add(new C1CommandLink(cOpen));
            mFile.CommandLinks.Add(new C1CommandLink());
            mFile.CommandLinks[mFile.CommandLinks.Count - 1].Text = "-";
            mFile.CommandLinks.Add(new C1CommandLink(cExit));

            // Main menu - Window
            C1CommandMenu mWindow = (C1CommandMenu)ch.CreateCommand(typeof(C1CommandMenu));

            mWindow.Text = "&Window";
            mm.CommandLinks.Add(new C1CommandLink(mWindow));

            C1Command cNewWindow = ch.CreateCommand();

            cNewWindow.Text       = "New &Window";
            cNewWindow.UserData   = "window_new";
            cNewWindow.Shortcut   = Shortcut.CtrlW;
            cNewWindow.ImageIndex = 2;

            mWindow.CommandLinks.Add(new C1CommandLink(cNewWindow));

            // For toolbars to be dockable/floatable, we must put them
            // in a C1CommandDock:
            C1CommandDock dock = new C1CommandDock();

            this.Controls.Add(dock);
            dock.Dock = DockStyle.Top;
            // Add a toolbar, link it to the (already existing) commands:
            C1ToolBar tb = new C1ToolBar();

            // add file commands and the window menu to the toolbar
            tb.CommandLinks.Add(new C1CommandLink(cNew));
            tb.CommandLinks.Add(new C1CommandLink(cOpen));
            C1CommandLink cl;

            tb.CommandLinks.Add(cl = new C1CommandLink(mWindow));
            // because we did not provide an image for the window menu,
            // make it show as text
            cl.ButtonLook          = ButtonLookFlags.Text;
            tb.CommandLinks.Add(cl = new C1CommandLink(cExit));
            // ditto for the exit command
            cl.ButtonLook = ButtonLookFlags.Text;
            // add the new toolbar to the dock
            dock.Controls.Add(tb);
        }
Exemplo n.º 13
0
        public static Control CreateControl(string zoomPolicy, Font font, Size layoutSize)
        {
            switch (zoomPolicy)
            {
            case "C1ChartZoomPolicy":
                C1ChartSample chart1 = new C1ChartSample();
                chart1.Dock = DockStyle.Fill;
                return(chart1);

            case "C1Chart3DZoomPolicy":
                C1Charts3DSample chart3d1 = new C1Charts3DSample();
                chart3d1.Dock = DockStyle.Fill;
                return(chart3d1);

            case "C1FlexGridZoomPolicy":
                FlexGridSample flexGridSample1 = new FlexGridSample();
                flexGridSample1.c1FlexGrid1.Dock = DockStyle.Fill;
                return(flexGridSample1.c1FlexGrid1);

            case "C1TrueDBGridZoomPolicy":
                C1TrueDBGrid trueDBGrid1 = new C1TrueDBGrid();
                trueDBGrid1.BackColor = Color.AliceBlue;
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ZoomPolicyDemo));
                trueDBGrid1.GroupByCaption = "Drag a column header here to group by that column";
                trueDBGrid1.Name           = "c1TrueDBGrid1";
                trueDBGrid1.Dock           = DockStyle.Fill;
                trueDBGrid1.TabAction      = C1.Win.C1TrueDBGrid.TabActionEnum.GridNavigation;
                trueDBGrid1.TabIndex       = 0;
                trueDBGrid1.Text           = "c1TrueDBGrid1";
                trueDBGrid1.PropBag        = resources.GetString("c1TrueDBGrid_bag");
                trueDBGrid1.AllowFilter    = false;
                trueDBGrid1.VisualStyle    = C1.Win.C1TrueDBGrid.VisualStyle.Office2007Blue;
                return(trueDBGrid1);

            case "C1PrintPreviewControlZoomPolicy":
                C1PrintPreviewControlSample printPreviewSample = new C1PrintPreviewControlSample();
                printPreviewSample.Dock = DockStyle.Fill;
                return(printPreviewSample);

            case "C1RibbonZoomPolicy":
                C1RibbonSample ribbonSample1 = new C1RibbonSample();
                ribbonSample1.Dock = DockStyle.Fill;
                return(ribbonSample1);

            case "C1StatusBarZoomPolicy":
                C1.Win.C1Ribbon.C1StatusBar    c1StatusBar1          = new C1.Win.C1Ribbon.C1StatusBar();
                C1.Win.C1Ribbon.RibbonLabel    DocumentModifiedLabel = new C1.Win.C1Ribbon.RibbonLabel();
                C1.Win.C1Ribbon.RibbonLabel    zoomLabel1            = new C1.Win.C1Ribbon.RibbonLabel();
                C1.Win.C1Ribbon.RibbonTrackBar ZoomTrackBar1         = new C1.Win.C1Ribbon.RibbonTrackBar();
                c1StatusBar1.LeftPaneItems.Add(DocumentModifiedLabel);
                c1StatusBar1.RightPaneItems.Add(ZoomTrackBar1);
                c1StatusBar1.RightPaneItems.Add(zoomLabel1);
                c1StatusBar1.RightPaneWidth = 180;
                c1StatusBar1.Text           = "Ready";
                c1StatusBar1.VisualStyle    = C1.Win.C1Ribbon.VisualStyle.Office2010Blue;
                //
                // DocumentModifiedLabel
                //
                DocumentModifiedLabel.Text = "Edit";
                //
                // ZoomTrackBar1
                //
                ZoomTrackBar1.Maximum = 1000;
                ZoomTrackBar1.Minimum = 10;
                ZoomTrackBar1.Value   = 100;
                //
                // zoomLabel1
                //
                zoomLabel1.FontPadding = C1.Win.C1Ribbon.FontPadding.Yes;
                zoomLabel1.Text        = "100%";
                return(c1StatusBar1);

            case "C1CalendarZoomPolicy":
                C1.Win.C1Schedule.C1Calendar c1Calendar1 = new C1.Win.C1Schedule.C1Calendar();
                ZoomPolicyProviderBase.PutControlInCenter(c1Calendar1, layoutSize);
                return(c1Calendar1);

            case "C1ScheduleZoomPolicy":
                C1.Win.C1Schedule.C1Schedule c1Schedule1 = new C1.Win.C1Schedule.C1Schedule();
                c1Schedule1.Dock = DockStyle.Fill;
                return(c1Schedule1);

            case "C1MainMenuZoomPolicy":
                C1MainMenu    c1MainMenu1  = new C1MainMenu();
                C1CommandLink commandLink1 = new C1CommandLink();
                C1CommandMenu commandMenu1 = new C1CommandMenu();
                commandMenu1.Font    = new Font(c1MainMenu1.Font.FontFamily, 12);
                commandMenu1.Text    = "commandMenu1";
                commandLink1.Command = commandMenu1;
                c1MainMenu1.CommandLinks.Add(commandLink1);
                return(c1MainMenu1);

            case "C1DockingTabZoomPolicy":
                C1DockingTab     dockingTab1     = new C1DockingTab();
                C1DockingTabPage dockintTabPage1 = new C1DockingTabPage();
                C1DockingTabPage dockintTabPage2 = new C1DockingTabPage();
                C1DockingTabPage dockintTabPage3 = new C1DockingTabPage();
                C1DockingTabPage dockintTabPage4 = new C1DockingTabPage();
                dockintTabPage1.Text = "TabPage1";
                dockintTabPage2.Text = "TabPage2";
                dockintTabPage3.Text = "TabPage3";
                dockintTabPage4.Text = "TabPage4";
                dockingTab1.Controls.Add(dockintTabPage1);
                dockingTab1.Controls.Add(dockintTabPage2);
                dockingTab1.Controls.Add(dockintTabPage3);
                dockingTab1.Controls.Add(dockintTabPage4);
                dockingTab1.ItemSize       = new Size(80, 20);
                dockingTab1.SplitterWidth  = 5;
                dockingTab1.TabAreaSpacing = 5;
                dockingTab1.TabsSpacing    = 5;
                return(dockingTab1);

            case "C1NavBarPolicy":
                C1NavBarSample navBarSample1 = new C1NavBarSample();
                navBarSample1.Dock = DockStyle.Fill;
                return(navBarSample1);

            case "C1OutBarZoomPolicy":
                C1OutBarSample outBarSample1 = new C1OutBarSample();
                outBarSample1.Dock = DockStyle.Fill;
                return(outBarSample1);

            default:
                break;
            }
            return(null);
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("A:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode1
     });
     System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("C:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode3
     });
     System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("D:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode5
     });
     System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("E:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode7
     });
     System.Windows.Forms.TreeNode treeNode9  = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("F:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode9
     });
     System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("G:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode11
     });
     System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("U:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode13
     });
     System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("W:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode15
     });
     System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("...");
     System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("X:", 0, 4, new System.Windows.Forms.TreeNode[] {
         treeNode17
     });
     this.c1MainMenu1          = new C1.Win.C1Command.C1MainMenu();
     this.c1CommandHolder1     = new C1.Win.C1Command.C1CommandHolder();
     this.mnuFile              = new C1.Win.C1Command.C1CommandMenu();
     this.c1CommandLink8       = new C1.Win.C1Command.C1CommandLink();
     this.cmdFileNew           = new C1.Win.C1Command.C1Command();
     this.c1CommandLink9       = new C1.Win.C1Command.C1CommandLink();
     this.cmdFileOpen          = new C1.Win.C1Command.C1Command();
     this.c1CommandLink11      = new C1.Win.C1Command.C1CommandLink();
     this.cmdFileSave          = new C1.Win.C1Command.C1Command();
     this.c1CommandLink3       = new C1.Win.C1Command.C1CommandLink();
     this.cmdExit              = new C1.Win.C1Command.C1Command();
     this.mnuEdit              = new C1.Win.C1Command.C1CommandMenu();
     this.c1CommandLink5       = new C1.Win.C1Command.C1CommandLink();
     this.mnuWindow            = new C1.Win.C1Command.C1CommandMenu();
     this.c1CommandLink7       = new C1.Win.C1Command.C1CommandLink();
     this.cmdWindowCloseAll    = new C1.Win.C1Command.C1Command();
     this.c1CommandMenuOptions = new C1.Win.C1Command.C1CommandMenu();
     this.c1CommandLink14      = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandVS2005      = new C1.Win.C1Command.C1Command();
     this.imageList1           = new System.Windows.Forms.ImageList(this.components);
     this.c1CommandLink1       = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandLink4       = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandLink13      = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandLink6       = new C1.Win.C1Command.C1CommandLink();
     this.dockToolbar          = new C1.Win.C1Command.C1CommandDock();
     this.c1ToolBar1           = new C1.Win.C1Command.C1ToolBar();
     this.c1CommandLink2       = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandLink10      = new C1.Win.C1Command.C1CommandLink();
     this.c1CommandLink12      = new C1.Win.C1Command.C1CommandLink();
     this.dockSidebar          = new C1.Win.C1Command.C1CommandDock();
     this.tabSidebar           = new C1.Win.C1Command.C1DockingTab();
     this.c1DockingTabPage2    = new C1.Win.C1Command.C1DockingTabPage();
     this.dirView              = new MdiTabs.DirView();
     this.c1DockingTabPage1    = new C1.Win.C1Command.C1DockingTabPage();
     this.listOpenFiles        = new System.Windows.Forms.ListBox();
     this.dockTray             = new C1.Win.C1Command.C1CommandDock();
     this.tabTray              = new C1.Win.C1Command.C1DockingTab();
     this.c1DockingTabPage3    = new C1.Win.C1Command.C1DockingTabPage();
     this.textLog              = new System.Windows.Forms.TextBox();
     this.tabMain              = new C1.Win.C1Command.C1DockingTab();
     this.openFileDialog1      = new System.Windows.Forms.OpenFileDialog();
     this.saveFileDialog1      = new System.Windows.Forms.SaveFileDialog();
     ((System.ComponentModel.ISupportInitialize)(this.c1CommandHolder1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dockToolbar)).BeginInit();
     this.dockToolbar.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dockSidebar)).BeginInit();
     this.dockSidebar.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.tabSidebar)).BeginInit();
     this.tabSidebar.SuspendLayout();
     this.c1DockingTabPage2.SuspendLayout();
     this.c1DockingTabPage1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dockTray)).BeginInit();
     this.dockTray.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.tabTray)).BeginInit();
     this.tabTray.SuspendLayout();
     this.c1DockingTabPage3.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.tabMain)).BeginInit();
     this.SuspendLayout();
     //
     // c1MainMenu1
     //
     this.c1MainMenu1.AccessibleName = "Menu Bar";
     this.c1MainMenu1.CommandHolder  = this.c1CommandHolder1;
     this.c1MainMenu1.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink1,
         this.c1CommandLink4,
         this.c1CommandLink13,
         this.c1CommandLink6
     });
     this.c1MainMenu1.Dock            = System.Windows.Forms.DockStyle.Top;
     this.c1MainMenu1.Location        = new System.Drawing.Point(0, 0);
     this.c1MainMenu1.Name            = "c1MainMenu1";
     this.c1MainMenu1.Size            = new System.Drawing.Size(760, 21);
     this.c1MainMenu1.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1CommandHolder1
     //
     this.c1CommandHolder1.Commands.Add(this.mnuFile);
     this.c1CommandHolder1.Commands.Add(this.mnuEdit);
     this.c1CommandHolder1.Commands.Add(this.mnuWindow);
     this.c1CommandHolder1.Commands.Add(this.cmdExit);
     this.c1CommandHolder1.Commands.Add(this.cmdFileNew);
     this.c1CommandHolder1.Commands.Add(this.cmdFileOpen);
     this.c1CommandHolder1.Commands.Add(this.cmdFileSave);
     this.c1CommandHolder1.Commands.Add(this.cmdWindowCloseAll);
     this.c1CommandHolder1.Commands.Add(this.c1CommandMenuOptions);
     this.c1CommandHolder1.Commands.Add(this.c1CommandVS2005);
     this.c1CommandHolder1.ImageList             = this.imageList1;
     this.c1CommandHolder1.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.c1CommandHolder1.Owner = this;
     //
     // mnuFile
     //
     this.mnuFile.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink8,
         this.c1CommandLink9,
         this.c1CommandLink11,
         this.c1CommandLink3
     });
     this.mnuFile.Name            = "mnuFile";
     this.mnuFile.Text            = "&File";
     this.mnuFile.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1CommandLink8
     //
     this.c1CommandLink8.Command = this.cmdFileNew;
     //
     // cmdFileNew
     //
     this.cmdFileNew.ImageIndex = 1;
     this.cmdFileNew.Name       = "cmdFileNew";
     this.cmdFileNew.Text       = "&New";
     this.cmdFileNew.Click     += new C1.Win.C1Command.ClickEventHandler(this.cmdFileNew_Click);
     //
     // c1CommandLink9
     //
     this.c1CommandLink9.Command = this.cmdFileOpen;
     //
     // cmdFileOpen
     //
     this.cmdFileOpen.ImageIndex = 0;
     this.cmdFileOpen.Name       = "cmdFileOpen";
     this.cmdFileOpen.Text       = "&Open";
     this.cmdFileOpen.Click     += new C1.Win.C1Command.ClickEventHandler(this.cmdFileOpen_Click);
     //
     // c1CommandLink11
     //
     this.c1CommandLink11.Command = this.cmdFileSave;
     //
     // cmdFileSave
     //
     this.cmdFileSave.ImageIndex         = 2;
     this.cmdFileSave.Name               = "cmdFileSave";
     this.cmdFileSave.Text               = "&Save";
     this.cmdFileSave.CommandStateQuery += new C1.Win.C1Command.CommandStateQueryEventHandler(this.cmdFileSave_CommandStateQuery);
     this.cmdFileSave.Click             += new C1.Win.C1Command.ClickEventHandler(this.cmdFileSave_Click);
     //
     // c1CommandLink3
     //
     this.c1CommandLink3.Command   = this.cmdExit;
     this.c1CommandLink3.Delimiter = true;
     //
     // cmdExit
     //
     this.cmdExit.Name   = "cmdExit";
     this.cmdExit.Text   = "E&xit";
     this.cmdExit.Click += new C1.Win.C1Command.ClickEventHandler(this.cmdExit_Click);
     //
     // mnuEdit
     //
     this.mnuEdit.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink5
     });
     this.mnuEdit.HideNonRecentLinks = false;
     this.mnuEdit.Name            = "mnuEdit";
     this.mnuEdit.Text            = "&Edit";
     this.mnuEdit.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1CommandLink5
     //
     this.c1CommandLink5.Text = "[TBD]";
     //
     // mnuWindow
     //
     this.mnuWindow.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink7
     });
     this.mnuWindow.HideNonRecentLinks = false;
     this.mnuWindow.Name            = "mnuWindow";
     this.mnuWindow.Text            = "&Window";
     this.mnuWindow.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     this.mnuWindow.Popup          += new System.EventHandler(this.mnuWindow_Popup);
     //
     // c1CommandLink7
     //
     this.c1CommandLink7.Command = this.cmdWindowCloseAll;
     //
     // cmdWindowCloseAll
     //
     this.cmdWindowCloseAll.Name = "cmdWindowCloseAll";
     this.cmdWindowCloseAll.Text = "Close &All";
     this.cmdWindowCloseAll.CommandStateQuery += new C1.Win.C1Command.CommandStateQueryEventHandler(this.cmdWindowCloseAll_CommandStateQuery);
     this.cmdWindowCloseAll.Click             += new C1.Win.C1Command.ClickEventHandler(this.cmdWindowCloseAll_Click);
     //
     // c1CommandMenuOptions
     //
     this.c1CommandMenuOptions.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink14
     });
     this.c1CommandMenuOptions.HideNonRecentLinks = false;
     this.c1CommandMenuOptions.Name            = "c1CommandMenuOptions";
     this.c1CommandMenuOptions.Text            = "O&ptions";
     this.c1CommandMenuOptions.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1CommandLink14
     //
     this.c1CommandLink14.Command = this.c1CommandVS2005;
     //
     // c1CommandVS2005
     //
     this.c1CommandVS2005.CheckAutoToggle = true;
     this.c1CommandVS2005.Checked         = true;
     this.c1CommandVS2005.Name            = "c1CommandVS2005";
     this.c1CommandVS2005.Text            = "VS2005 Docking";
     this.c1CommandVS2005.CheckedChanged += new C1.Win.C1Command.CheckedChangedEventHandler(this.c1CommandVS2005_CheckedChanged);
     //
     // imageList1
     //
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Magenta;
     this.imageList1.Images.SetKeyName(0, "");
     this.imageList1.Images.SetKeyName(1, "");
     this.imageList1.Images.SetKeyName(2, "");
     //
     // c1CommandLink1
     //
     this.c1CommandLink1.Command = this.mnuFile;
     //
     // c1CommandLink4
     //
     this.c1CommandLink4.Command   = this.mnuEdit;
     this.c1CommandLink4.SortOrder = 1;
     //
     // c1CommandLink13
     //
     this.c1CommandLink13.Command   = this.c1CommandMenuOptions;
     this.c1CommandLink13.SortOrder = 2;
     //
     // c1CommandLink6
     //
     this.c1CommandLink6.Command   = this.mnuWindow;
     this.c1CommandLink6.SortOrder = 3;
     //
     // dockToolbar
     //
     this.dockToolbar.Controls.Add(this.c1ToolBar1);
     this.dockToolbar.Id       = 1;
     this.dockToolbar.Location = new System.Drawing.Point(0, 21);
     this.dockToolbar.Name     = "dockToolbar";
     this.dockToolbar.Size     = new System.Drawing.Size(760, 24);
     //
     // c1ToolBar1
     //
     this.c1ToolBar1.CommandHolder = this.c1CommandHolder1;
     this.c1ToolBar1.CommandLinks.AddRange(new C1.Win.C1Command.C1CommandLink[] {
         this.c1CommandLink2,
         this.c1CommandLink10,
         this.c1CommandLink12
     });
     this.c1ToolBar1.Location        = new System.Drawing.Point(0, 0);
     this.c1ToolBar1.Name            = "c1ToolBar1";
     this.c1ToolBar1.Size            = new System.Drawing.Size(77, 24);
     this.c1ToolBar1.Text            = "c1ToolBar1";
     this.c1ToolBar1.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1CommandLink2
     //
     this.c1CommandLink2.Command = this.cmdFileNew;
     //
     // c1CommandLink10
     //
     this.c1CommandLink10.Command = this.cmdFileOpen;
     //
     // c1CommandLink12
     //
     this.c1CommandLink12.Command = this.cmdFileSave;
     //
     // dockSidebar
     //
     this.dockSidebar.BackColor = System.Drawing.SystemColors.ControlDark;
     this.dockSidebar.Controls.Add(this.tabSidebar);
     this.dockSidebar.Dock     = System.Windows.Forms.DockStyle.Right;
     this.dockSidebar.Id       = 3;
     this.dockSidebar.Location = new System.Drawing.Point(592, 45);
     this.dockSidebar.Name     = "dockSidebar";
     this.dockSidebar.Size     = new System.Drawing.Size(168, 504);
     //
     // tabSidebar
     //
     this.tabSidebar.Alignment    = System.Windows.Forms.TabAlignment.Bottom;
     this.tabSidebar.BorderStyle  = System.Windows.Forms.BorderStyle.None;
     this.tabSidebar.CanAutoHide  = true;
     this.tabSidebar.CanCloseTabs = true;
     this.tabSidebar.CanMoveTabs  = true;
     this.tabSidebar.Controls.Add(this.c1DockingTabPage2);
     this.tabSidebar.Controls.Add(this.c1DockingTabPage1);
     this.tabSidebar.Location        = new System.Drawing.Point(0, 0);
     this.tabSidebar.Name            = "tabSidebar";
     this.tabSidebar.ShowCaption     = true;
     this.tabSidebar.Size            = new System.Drawing.Size(168, 504);
     this.tabSidebar.TabIndex        = 0;
     this.tabSidebar.TabSizeMode     = C1.Win.C1Command.TabSizeModeEnum.Fit;
     this.tabSidebar.TabsSpacing     = 0;
     this.tabSidebar.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1DockingTabPage2
     //
     this.c1DockingTabPage2.Controls.Add(this.dirView);
     this.c1DockingTabPage2.Location = new System.Drawing.Point(3, 0);
     this.c1DockingTabPage2.Name     = "c1DockingTabPage2";
     this.c1DockingTabPage2.Size     = new System.Drawing.Size(165, 480);
     this.c1DockingTabPage2.TabIndex = 0;
     this.c1DockingTabPage2.Text     = "Directory Listing";
     //
     // dirView
     //
     this.dirView.Dock   = System.Windows.Forms.DockStyle.Fill;
     this.dirView.Filter = new string[] {
         "*.rtf",
         "*.txt"
     };
     this.dirView.ImageIndex       = 0;
     this.dirView.Location         = new System.Drawing.Point(0, 20);
     this.dirView.Name             = "dirView";
     treeNode1.Name                = "";
     treeNode1.Tag                 = ((object)(resources.GetObject("treeNode1.Tag")));
     treeNode1.Text                = "...";
     treeNode2.ImageIndex          = 0;
     treeNode2.Name                = "";
     treeNode2.SelectedImageIndex  = 4;
     treeNode2.Tag                 = ((object)(resources.GetObject("treeNode2.Tag")));
     treeNode2.Text                = "A:";
     treeNode3.Name                = "";
     treeNode3.Tag                 = ((object)(resources.GetObject("treeNode3.Tag")));
     treeNode3.Text                = "...";
     treeNode4.ImageIndex          = 0;
     treeNode4.Name                = "";
     treeNode4.SelectedImageIndex  = 4;
     treeNode4.Tag                 = ((object)(resources.GetObject("treeNode4.Tag")));
     treeNode4.Text                = "C:";
     treeNode5.Name                = "";
     treeNode5.Tag                 = ((object)(resources.GetObject("treeNode5.Tag")));
     treeNode5.Text                = "...";
     treeNode6.ImageIndex          = 0;
     treeNode6.Name                = "";
     treeNode6.SelectedImageIndex  = 4;
     treeNode6.Tag                 = ((object)(resources.GetObject("treeNode6.Tag")));
     treeNode6.Text                = "D:";
     treeNode7.Name                = "";
     treeNode7.Tag                 = ((object)(resources.GetObject("treeNode7.Tag")));
     treeNode7.Text                = "...";
     treeNode8.ImageIndex          = 0;
     treeNode8.Name                = "";
     treeNode8.SelectedImageIndex  = 4;
     treeNode8.Tag                 = ((object)(resources.GetObject("treeNode8.Tag")));
     treeNode8.Text                = "E:";
     treeNode9.Name                = "";
     treeNode9.Tag                 = ((object)(resources.GetObject("treeNode9.Tag")));
     treeNode9.Text                = "...";
     treeNode10.ImageIndex         = 0;
     treeNode10.Name               = "";
     treeNode10.SelectedImageIndex = 4;
     treeNode10.Tag                = ((object)(resources.GetObject("treeNode10.Tag")));
     treeNode10.Text               = "F:";
     treeNode11.Name               = "";
     treeNode11.Tag                = ((object)(resources.GetObject("treeNode11.Tag")));
     treeNode11.Text               = "...";
     treeNode12.ImageIndex         = 0;
     treeNode12.Name               = "";
     treeNode12.SelectedImageIndex = 4;
     treeNode12.Tag                = ((object)(resources.GetObject("treeNode12.Tag")));
     treeNode12.Text               = "G:";
     treeNode13.Name               = "";
     treeNode13.Tag                = ((object)(resources.GetObject("treeNode13.Tag")));
     treeNode13.Text               = "...";
     treeNode14.ImageIndex         = 0;
     treeNode14.Name               = "";
     treeNode14.SelectedImageIndex = 4;
     treeNode14.Tag                = ((object)(resources.GetObject("treeNode14.Tag")));
     treeNode14.Text               = "U:";
     treeNode15.Name               = "";
     treeNode15.Tag                = ((object)(resources.GetObject("treeNode15.Tag")));
     treeNode15.Text               = "...";
     treeNode16.ImageIndex         = 0;
     treeNode16.Name               = "";
     treeNode16.SelectedImageIndex = 4;
     treeNode16.Tag                = ((object)(resources.GetObject("treeNode16.Tag")));
     treeNode16.Text               = "W:";
     treeNode17.Name               = "";
     treeNode17.Tag                = ((object)(resources.GetObject("treeNode17.Tag")));
     treeNode17.Text               = "...";
     treeNode18.ImageIndex         = 0;
     treeNode18.Name               = "";
     treeNode18.SelectedImageIndex = 4;
     treeNode18.Tag                = ((object)(resources.GetObject("treeNode18.Tag")));
     treeNode18.Text               = "X:";
     this.dirView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
         treeNode2,
         treeNode4,
         treeNode6,
         treeNode8,
         treeNode10,
         treeNode12,
         treeNode14,
         treeNode16,
         treeNode18
     });
     this.dirView.SelectedImageIndex = 0;
     this.dirView.Size      = new System.Drawing.Size(165, 460);
     this.dirView.TabIndex  = 0;
     this.dirView.EditFile += new MdiTabs.DirView.EditFileEventHandler(this.dirView_EditFile);
     //
     // c1DockingTabPage1
     //
     this.c1DockingTabPage1.Controls.Add(this.listOpenFiles);
     this.c1DockingTabPage1.Location = new System.Drawing.Point(3, 0);
     this.c1DockingTabPage1.Name     = "c1DockingTabPage1";
     this.c1DockingTabPage1.Size     = new System.Drawing.Size(165, 480);
     this.c1DockingTabPage1.TabIndex = 1;
     this.c1DockingTabPage1.Text     = "Open Files";
     //
     // listOpenFiles
     //
     this.listOpenFiles.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.listOpenFiles.Location     = new System.Drawing.Point(0, 20);
     this.listOpenFiles.Name         = "listOpenFiles";
     this.listOpenFiles.Size         = new System.Drawing.Size(165, 459);
     this.listOpenFiles.TabIndex     = 0;
     this.listOpenFiles.DoubleClick += new System.EventHandler(this.listOpenFiles_DoubleClick);
     //
     // dockTray
     //
     this.dockTray.BackColor = System.Drawing.SystemColors.Window;
     this.dockTray.Controls.Add(this.tabTray);
     this.dockTray.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.dockTray.Id       = 4;
     this.dockTray.Location = new System.Drawing.Point(0, 421);
     this.dockTray.Name     = "dockTray";
     this.dockTray.Size     = new System.Drawing.Size(592, 128);
     //
     // tabTray
     //
     this.tabTray.Alignment    = System.Windows.Forms.TabAlignment.Bottom;
     this.tabTray.BorderStyle  = System.Windows.Forms.BorderStyle.None;
     this.tabTray.CanAutoHide  = true;
     this.tabTray.CanCloseTabs = true;
     this.tabTray.CanMoveTabs  = true;
     this.tabTray.Controls.Add(this.c1DockingTabPage3);
     this.tabTray.Location        = new System.Drawing.Point(0, 0);
     this.tabTray.Name            = "tabTray";
     this.tabTray.ShowCaption     = true;
     this.tabTray.Size            = new System.Drawing.Size(592, 128);
     this.tabTray.TabIndex        = 0;
     this.tabTray.TabSizeMode     = C1.Win.C1Command.TabSizeModeEnum.Fit;
     this.tabTray.TabsSpacing     = 0;
     this.tabTray.VisualStyleBase = C1.Win.C1Command.VisualStyle.OfficeXP;
     //
     // c1DockingTabPage3
     //
     this.c1DockingTabPage3.Controls.Add(this.textLog);
     this.c1DockingTabPage3.Location = new System.Drawing.Point(0, 3);
     this.c1DockingTabPage3.Name     = "c1DockingTabPage3";
     this.c1DockingTabPage3.Size     = new System.Drawing.Size(592, 101);
     this.c1DockingTabPage3.TabIndex = 0;
     this.c1DockingTabPage3.Text     = "Log";
     //
     // textLog
     //
     this.textLog.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.textLog.Location   = new System.Drawing.Point(0, 20);
     this.textLog.Multiline  = true;
     this.textLog.Name       = "textLog";
     this.textLog.ReadOnly   = true;
     this.textLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     this.textLog.Size       = new System.Drawing.Size(592, 81);
     this.textLog.TabIndex   = 0;
     //
     // tabMain
     //
     this.tabMain.BackColor             = System.Drawing.SystemColors.AppWorkspace;
     this.tabMain.BorderStyle           = System.Windows.Forms.BorderStyle.FixedSingle;
     this.tabMain.CanCloseTabs          = true;
     this.tabMain.CanMoveTabs           = true;
     this.tabMain.Dock                  = System.Windows.Forms.DockStyle.Fill;
     this.tabMain.Location              = new System.Drawing.Point(0, 45);
     this.tabMain.Name                  = "tabMain";
     this.tabMain.Size                  = new System.Drawing.Size(592, 376);
     this.tabMain.TabIndex              = 5;
     this.tabMain.TabsSpacing           = 0;
     this.tabMain.VisualStyle           = C1.Win.C1Command.VisualStyle.Custom;
     this.tabMain.VisualStyleBase       = C1.Win.C1Command.VisualStyle.OfficeXP;
     this.tabMain.TabPageClosed        += new C1.Win.C1Command.TabPageEventHandler(this.tabMain_TabPageClosed);
     this.tabMain.SelectedIndexChanged += new System.EventHandler(this.tabMain_SelectedIndexChanged);
     this.tabMain.TabPageClosing       += new C1.Win.C1Command.TabPageCancelEventHandler(this.tabMain_TabPageClosing);
     this.tabMain.DoubleClick          += new System.EventHandler(this.tabMain_DoubleClick);
     //
     // openFileDialog1
     //
     this.openFileDialog1.CheckFileExists = false;
     this.openFileDialog1.Filter          = "Rich text files|*.rtf|Text files|*.txt|All files|*.*";
     //
     // saveFileDialog1
     //
     this.saveFileDialog1.Filter = "Rich text files|*.rtf|Text files|*.txt|All files|*.*";
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(760, 549);
     this.Controls.Add(this.tabMain);
     this.Controls.Add(this.dockTray);
     this.Controls.Add(this.dockSidebar);
     this.Controls.Add(this.dockToolbar);
     this.Controls.Add(this.c1MainMenu1);
     this.Name  = "MainForm";
     this.Text  = "MainForm";
     this.Load += new System.EventHandler(this.MainForm_Load);
     ((System.ComponentModel.ISupportInitialize)(this.c1CommandHolder1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dockToolbar)).EndInit();
     this.dockToolbar.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dockSidebar)).EndInit();
     this.dockSidebar.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.tabSidebar)).EndInit();
     this.tabSidebar.ResumeLayout(false);
     this.c1DockingTabPage2.ResumeLayout(false);
     this.c1DockingTabPage1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dockTray)).EndInit();
     this.dockTray.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.tabTray)).EndInit();
     this.tabTray.ResumeLayout(false);
     this.c1DockingTabPage3.ResumeLayout(false);
     this.c1DockingTabPage3.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.tabMain)).EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 15
0
 private void _clearMenus(RibbonMenu rMenu, C1CommandMenu cMenu)
 {
     rMenu.Items.Clear();
     cMenu.CommandLinks.Clear();
     rMenu.Enabled = cMenu.Enabled = false;
 }
Exemplo n.º 16
0
 private void _addMenus(RibbonMenu rMenu, C1CommandMenu cMenu, string texts)
 {
     _addMenus(rMenu, cMenu, texts != null ? texts.Split('|') : null);
 }
Exemplo n.º 17
0
 private void _addSubMenus(RibbonMenu rParent, C1CommandMenu cParent, string menuName, string texts)
 {
     _addSubMenus(rParent, cParent, menuName, texts != null ? texts.Split('|') : null);
 }