Exemple #1
0
        protected override void CreateToolBar()
        {
            XtraTabPage page = this.xtraTabControl1.SelectedTabPage;

            foreach (var contr in page.Controls)
            {
                if (contr is ToolStrip)
                {
                    return;
                }
            }
            ToolStrip       toolStrip = new ToolStrip();
            ToolStripButton btnAdd    = new ToolStripButton();

            btnAdd.Text              = "新增明细";
            btnAdd.Image             = (Image)Resources.ResourceManager.GetObject("edit_add");
            btnAdd.TextImageRelation = TextImageRelation.ImageAboveText;
            btnAdd.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
            btnAdd.Click            += new EventHandler(btnAdd_Click);
            toolStrip.Items.Add(btnAdd);
            ToolStripSeparator toolSep = new ToolStripSeparator();

            toolStrip.Items.Add(toolSep);
            ToolStripButton btnDel = new ToolStripButton();

            btnDel.Text              = "删除明细";
            btnDel.Image             = (Image)Resources.ResourceManager.GetObject("cancel");
            btnDel.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
            btnDel.TextImageRelation = TextImageRelation.ImageAboveText;
            btnDel.Click            += new EventHandler(btnDel_Click);
            toolStrip.Items.Add(btnDel);
            toolStrip.Dock = DockStyle.Top;
            toolStrip.BringToFront();
            page.Controls.Add(toolStrip);
        }
Exemple #2
0
        private void DeleteFolderMusic_Click(object sender, EventArgs e)
        {
            this.parent.Controls.Remove(toolStrip);
            toolStrip.LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;
            int Y = 60;

            foreach (string item in ListFolderLocalVideo.Instance.GetLink())
            {
                toolStrip.Items.Add(item);
            }
            toolStrip.Location = new Point(DeleteFolderMusic.Location.X + 250, DeleteFolderMusic.Location.Y + Y);
            this.parent.Controls.Add(toolStrip);
            toolStrip.BringToFront();
            toolStrip.GripStyle = ToolStripGripStyle.Hidden;
            toolStrip.Dock      = DockStyle.None;
        }
Exemple #3
0
 private void CreateSubToolStrip()
 {
     if (toolStrip == null)
     {
         toolStrip             = new ToolStrip();
         toolStrip.LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;
         toolStrip.Dock        = DockStyle.Left;
         toolStrip.GripStyle   = ToolStripGripStyle.Hidden;
         toolStrip.AutoSize    = false;
         toolStrip.Size        = new System.Drawing.Size(121, 1024);
         //toolStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(218)))), ((int)(((byte)(248)))));
         toolStrip.BackgroundImage       = WinFormUI.Properties.Resources.secondmenu;
         toolStrip.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
         toolStrip.Hide();
         this.Controls.Add(toolStrip);
         toolStrip.BringToFront();
         toolStrip.Show();
     }
 }
        private void SetAdressVisibility(bool newState)
        {
            if (Settings.Default.IsAddressVisible != newState)
            {
                Settings.Default.IsAddressVisible = newState;
                Settings.Default.Save();
            }

            if (Settings.Default.IsAddressVisible)
            {
                Controls.Add(toolStrip);
                toolStrip.BringToFront();
                browser.BringToFront();
            }
            else
            {
                Controls.Remove(toolStrip);
            }
        }
Exemple #5
0
        private void FixToolStrip(ToolStrip ts, bool isCloseForm)
        {
            Form frm = ts.FindForm();

            _defaultOwner.Controls.Add(ts);
            foreach (ToolStripItem it in ts.Items)
            {
                if (it is ToolStripSeparator)
                {
                    it.Visible = true;
                }
            }
            ts.Dock        = _originalDock;
            ts.LayoutStyle = _originalLayout;
            ts.BringToFront();
            if (isCloseForm)
            {
                frm.Close();
            }
        }
Exemple #6
0
        private void InitializeAddInSupport()
        {
            _addInToolStrip = ToolbarService.CreateToolStrip(this, "/Workspace/TextEditor/Toolbar");
            if (_addInToolStrip.Items.Count == 0)
            {
                _addInToolStrip.Visible = false;
            }
            else
            {
                _addInToolStrip.Visible = true;
                this.Controls.Add(_addInToolStrip);
                _addInToolStrip.RenderMode = ToolStripRenderMode.ManagerRenderMode;
                _addInToolStrip.GripStyle  = ToolStripGripStyle.Hidden;
                _addInToolStrip.Dock       = DockStyle.Top;
                _addInToolStrip.BringToFront();
                panEditor.BringToFront();
            }

            MenuService.AddItemsToMenu(popUpEditor.Items, this, "/Workspace/TextEditor/ContextMenu");
            MenuService.AddItemsToMenu(mainMenu.Items, this, "/Workspace/TextEditor/MainMenu");
            MenuService.AddItemsToMenu(popUpTab.Items, this, "/Workspace/TextEditor/ContentContextMenu");
        }
Exemple #7
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitializeComponent()
        {
            #region 初始化工具栏
            this.toolStrip.Location = new System.Drawing.Point(2, 0);
            this.toolStrip.Name     = "toolStrip";
            this.toolStrip.Size     = new System.Drawing.Size(26, 102);
            this.toolStrip.TabIndex = 0;
            this.toolStrip.Text     = "";

            // _xmlTextReader = new XmlTextReader(PathService.CL_DrawToolsBox);
            //
            SetButtons();
            //

            this.toolStrip.ItemClicked += new ToolStripItemClickedEventHandler(toolStrip_ItemClicked);
            this.toolStrip.Items.AddRange(_toolStripItems.ToArray());
            toolStrip.Visible = SoftwareOption.TmpltDesigner.ShowToolBar;
            this.Controls.Add(toolStrip);
            toolStrip.BringToFront();
            #endregion
            this.components = new Container();
        }
Exemple #8
0
        void CreateSelectPlentyDialog(Page mode)
        {
            spFrm = sf.CreateCustomDialog();

            bm8 = new Bitmap(new MemoryStream(sf.ReadDataFile("installfiles\\ui\\dui_logo.png")));

            lb     = new ListBox();
            bok    = new Button();
            babort = new Button();
            pb     = new PictureBox();
            rtb    = new RichTextBox();
            ts     = new ToolStrip();
            ToolStripButton tsbSelectAll  = new ToolStripButton();
            ToolStripButton tsbSelectNone = new ToolStripButton();
            ToolStripButton tsbInvert     = new ToolStripButton();

            ((System.ComponentModel.ISupportInitialize)(pb)).BeginInit();
            ts.SuspendLayout();
            spFrm.SuspendLayout();
            //
            // lbComponents
            //
            lb.Anchor     = ((AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left)));
            lb.Font       = SetFont(8.25F, FontStyle.Bold);
            lb.ItemHeight = 16;
            lb.Location   = new System.Drawing.Point(9, 9);
            lb.Margin     = new Padding(0);
            lb.Name       = "lb";
            lb.Size       = new Size(272, 500);
            lb.TabIndex   = 0;
            if (!unattended)
            {
                lb.SelectedIndexChanged += new EventHandler(this.lb_SelectedIndexChanged);
                lb.SizeChanged          += new EventHandler(this.lb_SizeChanged);
            }

            //
            // btnOk
            //
            bok.Anchor   = ((AnchorStyles)((AnchorStyles.Bottom | AnchorStyles.Right)));
            bok.Location = new Point(598, 522);
            bok.Margin   = new Padding(3, 4, 3, 4);
            bok.Name     = "bok";
            bok.Size     = new Size(87, 30);
            bok.TabIndex = 1;
            bok.Text     = "&Ok";
            bok.UseVisualStyleBackColor = true;
            bok.Click  += new EventHandler(this.bok_Click);
            bok.Enabled = false;
            //
            // btnAbort
            //
            babort.Anchor                  = ((AnchorStyles)((AnchorStyles.Bottom | AnchorStyles.Right)));
            babort.DialogResult            = System.Windows.Forms.DialogResult.Abort;
            babort.Location                = new Point(691, 522);
            babort.Margin                  = new Padding(3, 4, 3, 4);
            babort.Name                    = "babort";
            babort.Size                    = new Size(87, 30);
            babort.TabIndex                = 2;
            babort.Text                    = "&Abort";
            babort.UseVisualStyleBackColor = true;
            //
            // pb
            //
            pb.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) |
                                         AnchorStyles.Right)));
            pb.Location = new Point(284, 9);
            pb.Margin   = new Padding(3, 4, 3, 4);
            pb.Name     = "pb";
            pb.Size     = new Size(496, 311);
            pb.SizeMode = PictureBoxSizeMode.Zoom;
            pb.Click   += new EventHandler(this.pb_Click);
            pb.Cursor   = Cursors.Hand;
            //
            // rtbDesription
            //
            rtb.Anchor             = ((AnchorStyles)((((AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right)));
            rtb.BackColor          = SystemColors.Window;
            rtb.Cursor             = Cursors.Default;
            rtb.Location           = new Point(284, 323);
            rtb.Name               = "rtb";
            rtb.ReadOnly           = true;
            rtb.Size               = new Size(496, 186);
            rtb.TabStop            = false;
            rtb.SelectionAlignment = HorizontalAlignment.Center;
            rtb.WordWrap           = true;
            //
            // ts
            //
            ts.LayoutStyle = ToolStripLayoutStyle.Flow;
            ts.Font        = SetFont(8.25F, FontStyle.Regular);
            ts.Dock        = DockStyle.None;
            ts.Items.AddRange(new ToolStripItem[] { tsbSelectAll, tsbSelectNone, tsbInvert });
            ts.Location = new Point(9, 509);
            ts.Name     = "ts";
            ts.Size     = new Size(211, 25);
            ts.Visible  = true;
            //
            // tsbSelectAll
            //
            tsbSelectAll.Name        = "tsbSelectAll";
            tsbSelectAll.Size        = new Size(54, 22);
            tsbSelectAll.Text        = "A&ll";
            tsbSelectAll.ToolTipText = "Select all entries";
            tsbSelectAll.Click      += new EventHandler(this.tsbSelect_Click);
            //
            // tsbSelectNone
            //
            tsbSelectNone.Name        = "tsbSelectNone";
            tsbSelectNone.Size        = new Size(68, 22);
            tsbSelectNone.Text        = "&None";
            tsbSelectNone.ToolTipText = "Deselect all entries";
            tsbSelectNone.Click      += new EventHandler(this.tsbSelect_Click);
            //
            // tsbInvert
            //
            tsbInvert.Name        = "tsbInvert";
            tsbInvert.Size        = new Size(86, 22);
            tsbInvert.Text        = "&Invert";
            tsbInvert.ToolTipText = "Select all unselected entries and deselect all selected ones";
            tsbInvert.Click      += new EventHandler(this.tsbSelect_Click);
            //
            // SelectPlentyDialog
            //
            spFrm.AutoScaleDimensions = new SizeF(7F, 17F);
            spFrm.AutoScaleMode       = AutoScaleMode.Font;
            spFrm.ClientSize          = new Size(792, 566);
            spFrm.MinimumSize         = new Size(800, 600);
            spFrm.Controls.Add(rtb);
            spFrm.Controls.Add(pb);
            spFrm.Controls.Add(babort);
            spFrm.Controls.Add(bok);
            spFrm.Controls.Add(lb);
            spFrm.Controls.Add(ts);
            spFrm.ControlBox    = false;
            spFrm.Font          = SetFont(9F, FontStyle.Regular);
            spFrm.Margin        = new Padding(3, 4, 3, 4);
            spFrm.StartPosition = FormStartPosition.CenterScreen;
            spFrm.Name          = "SelectPlentyDialog";
            spFrm.Text          = duiVersion + " Install";
            spFrm.FormClosed   += new FormClosedEventHandler(this.spFrm_FormClosed);

            InitPage(mode);
            ResetInfo();

            ((System.ComponentModel.ISupportInitialize)(pb)).EndInit();
            ts.BringToFront(); //helps flicker
            ts.ResumeLayout(false);
            ts.PerformLayout();
            spFrm.ResumeLayout(false);
            spFrm.PerformLayout();
        }
Exemple #9
0
        protected override void CreateToolBar()
        {
            if (this.xtraTabControl1.SelectedTabPageIndex != 0)
            {
                base.CreateToolBar();
            }
            else
            {
                XtraTabPage page = this.xtraTabControl1.SelectedTabPage;
                foreach (var contr in page.Controls)
                {
                    if (contr is ToolStrip)
                    {
                        ((ToolStrip)contr).Visible = true;
                        return;
                    }
                }
                ToolStrip       toolStrip = new ToolStrip();
                ToolStripButton btnAdd    = new ToolStripButton();
                btnAdd.Text              = "新增制程";
                btnAdd.Image             = (Image)Resources.ResourceManager.GetObject("AddToLibrary_32x32");
                btnAdd.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnAdd.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
                btnAdd.Click            += new EventHandler(btnAdd_Click);
                toolStrip.Items.Add(btnAdd);

                ToolStripSeparator toolSep = new ToolStripSeparator();
                toolStrip.Items.Add(toolSep);
                ToolStripButton btnDel = new ToolStripButton();

                btnDel.Text              = "删除制程";
                btnDel.Image             = (Image)Resources.ResourceManager.GetObject("Remove_32x32");
                btnDel.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
                btnDel.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnDel.Click            += new EventHandler(btnDel_Click);
                toolStrip.Items.Add(btnDel);

                ToolStripSeparator toolSep2 = new ToolStripSeparator();
                toolStrip.Items.Add(toolSep2);

                ToolStripButton btnAddProdInfo = new ToolStripButton();
                btnAddProdInfo.Text              = "新增制程参数";
                btnAddProdInfo.Image             = (Image)Resources.ResourceManager.GetObject("AddToLibrary_32x32");
                btnAddProdInfo.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnAddProdInfo.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
                btnAddProdInfo.Click            += btnAddProdInfo_Click;
                toolStrip.Items.Add(btnAddProdInfo);

                ToolStripSeparator toolSep3 = new ToolStripSeparator();
                toolStrip.Items.Add(toolSep3);

                ToolStripButton btnDelProdInfo = new ToolStripButton();
                btnDelProdInfo.Text              = "删除制程参数";
                btnDelProdInfo.Image             = (Image)Resources.ResourceManager.GetObject("Remove_32x32");
                btnDelProdInfo.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnDelProdInfo.DisplayStyle      = ToolStripItemDisplayStyle.ImageAndText;
                btnDelProdInfo.Click            += btnDelProdInfo_Click;
                toolStrip.Items.Add(btnDelProdInfo);

                toolStrip.Dock = DockStyle.Top;
                toolStrip.BringToFront();
                page.Controls.Add(toolStrip);
            }
        }