コード例 #1
0
ファイル: OtherCompMain.cs プロジェクト: youthjoy/cshelper
        private void BindTopTool()
        {
            //ToolBarHelper tsHelper = new ToolBarHelper();

            //ToolStripButton docReq = tsHelper.New("关联文档", QX.GenFramework.Properties.Resources.compedit, new EventHandler(docReq_Click));

            //this.top_tool_bar.AddCustomControl(docReq);

            ToolBarHelper tsHelper = new ToolBarHelper();

            this.top_tool_bar.AddClicked += new EventHandler(top_tool_bar_AddClicked);

            this.top_tool_bar.EditClicked += new EventHandler(top_tool_bar_EditClicked);

            this.top_tool_bar.RefreshClicked += new EventHandler(top_tool_bar_RefreshClicked);

            this.top_tool_bar.LookClicked += new EventHandler(top_tool_bar_LookClicked);

            //top_tool_bar.DelClicked += new EventHandler(top_tool_bar_DelClicked);

            this.top_tool_bar.SearchClicked += new EventHandler(top_tool_bar_SearchClicked);
            this.top_tool_bar.AddSearchAllModule();
        }
コード例 #2
0
 private void UpdateHideBottomToolBar(double windowWidth) => ToolBarHelper.SetHideBottomToolBar(navigationSplitView, windowWidth > 600);
コード例 #3
0
ファイル: DocScan.cs プロジェクト: youthjoy/cshelper
        public void BindDocTopTool()
        {
            ToolBarHelper tsHelper = new ToolBarHelper();
            ToolStripButton scanRefBtn = tsHelper.New("扫描", QX.GenFramework.Properties.Resources.gantan, new EventHandler(scanBtn_Click));

            this.top_cctool_bar.AddCustomControl(scanRefBtn);
        }
コード例 #4
0
ファイル: DocChange.cs プロジェクト: youthjoy/cshelper
        private void BindTopTool()
        {
            this.top_tool_bar.SearchClicked += new EventHandler(top_tool_bar_SearchClicked);
            this.top_tool_bar.AddSearchAllModule();
            ToolBarHelper tsHelper = new ToolBarHelper();
            ToolStripButton btnDownload = tsHelper.New("转储", QX.GenFramework.Properties.Resources.import, new EventHandler(btnDownload_Click));
            this.top_tool_bar.AddCustomControl(8, btnDownload);
            ToolStripButton openBtn = tsHelper.New("浏览", QX.GenFramework.Properties.Resources.look, new EventHandler(openBtn_Click));
            //this.top_tool_bar.AddCustomControl(openBtn);
            //openBtn.Click += new EventHandler(openBtn_Click);

            this.top_tool_bar.RefreshClicked += new EventHandler(top_tool_bar_RefreshClicked);

            this.top_tool_bar1.SearchClicked += new EventHandler(top_tool_bar1_SearchClicked);
            this.top_tool_bar1.AddSearchAllModule();

            ToolStripButton btnDownload1 = tsHelper.New("转储", QX.GenFramework.Properties.Resources.import, new EventHandler(btnDownload_Click1));
            this.top_tool_bar1.AddCustomControl(8, btnDownload1);

            this.top_tool_bar1.RefreshClicked += new EventHandler(top_tool_bar1_RefreshClicked);
        }
コード例 #5
0
ファイル: CommonToolBar.cs プロジェクト: youthjoy/cshelper
        public void AddSearchModule(List<string> dic)
        {
            if (onSearchClicked != null)
            {
                DateTimePicker bDate = new DateTimePicker();
                bDate.Name = "bDate";
                DateTimePicker eDate = new DateTimePicker();
                eDate.Name = "eDate";
                ToolStripTextBox txtKey = new ToolStripTextBox();
                txtKey.Name = "Key";

                if (dic.Contains("bDate"))
                {
                    //时间控件
                    ToolStripLabel tLabel = new ToolStripLabel();
                    tLabel.Text = "开始时间:";
                    AddCustomControl(0, tLabel);

                    AddCDTPtoToolstrip(1, bDate);
                }

                if (dic.Contains("eDate"))
                {
                    bDate.Value = DateTime.Now.AddMonths(-1);
                    ToolStripLabel tLabel2 = new ToolStripLabel();
                    tLabel2.Text = "结束时间:";

                    AddCustomControl(2, tLabel2);

                    AddCDTPtoToolstrip(3, eDate);
                }

                if (dic.Contains("key"))
                {
                    eDate.Value = DateTime.Now;
                    ToolStripLabel tLabel3 = new ToolStripLabel();
                    tLabel3.Text = "关键字:";

                    AddCustomControl(4, tLabel3);

                    AddCustomControl(5, txtKey);

                }

                ToolBarHelper tsHelper = new ToolBarHelper();
                ToolStripButton SearchBtn = tsHelper.New("搜索", QX.GenFramework.Properties.Resources.search, new EventHandler(SearchBtn_Click));
                AddCustomControl(6, SearchBtn);
            }
        }
コード例 #6
0
        /// <summary>
        /// Regenerate topBar for stuff and stuff
        /// </summary>
        /// <param name="rendWidth"></param>
        /// <param name="force">Force Regen?</param>
        public void GenBar(float rendWidth, bool force = false)
        {
            if (setup || force) //prevent recreating toolbars unless forced
            {
                return;
            }

            #region File Menu Buttons
            GUIDropDownButtonConfig[] FileMenuButtons = new GUIDropDownButtonConfig[4];
            FileMenuButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "New", value = null, callback = (d, b) => { screen.LoadNewModel(); }
            };
            FileMenuButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "Open", value = null, callback = (d, b) => { openFileWindow.Visible = true; }
            };
            FileMenuButtons[2] = new GUIDropDownButtonConfig()
            {
                text = "Save", value = null, callback = (d, b) => { if (screen.CurrentFile != null)
                                                                    {
                                                                        screen.SaveModel();
                                                                    }
                                                                    else
                                                                    {
                                                                        saveFileWindow.Visible = true;
                                                                    } }
            };
            FileMenuButtons[3] = new GUIDropDownButtonConfig()
            {
                text = "Save As...", value = null, callback = (d, b) => { saveFileWindow.Visible = true; }
            };
            #endregion

            #region Gfx Menu Buttons
            GUIDropDownButtonConfig[] GfxMenuButtons = new GUIDropDownButtonConfig[3];
            GfxMenuButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "FXAA", value = gfxType.fxaa, callback = SetGfxOption
            };
            GfxMenuButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "Shadows", value = gfxType.shadows, callback = SetGfxOption
            };
            GfxMenuButtons[2] = new GUIDropDownButtonConfig()
            {
                text = "Wireframe", value = gfxType.wireframe, callback = SetGfxOption
            };

            GUIDropDownButtonConfig[] fogButtons = new GUIDropDownButtonConfig[4];
            fogButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "Off", value = FogQuality.Off, callback = SetGfxOption
            };
            fogButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "Low", value = FogQuality.Low, callback = SetGfxOption
            };
            fogButtons[2] = new GUIDropDownButtonConfig()
            {
                text = "Medium", value = FogQuality.Medium, callback = SetGfxOption
            };
            fogButtons[3] = new GUIDropDownButtonConfig()
            {
                text = "High", value = FogQuality.High, callback = SetGfxOption
            };

            GUIDropDownButtonConfig[] pcfButtons = new GUIDropDownButtonConfig[5];
            pcfButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "1", value = 1, callback = SetGfxOption
            };
            pcfButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "2", value = 2, callback = SetGfxOption
            };
            pcfButtons[2] = new GUIDropDownButtonConfig()
            {
                text = "4", value = 4, callback = SetGfxOption
            };
            pcfButtons[3] = new GUIDropDownButtonConfig()
            {
                text = "6", value = 6, callback = SetGfxOption
            };
            pcfButtons[4] = new GUIDropDownButtonConfig()
            {
                text = "12", value = 12, callback = SetGfxOption
            };
            #endregion

            #region Editor Menu Buttons
            GUIDropDownButtonConfig[] EditorButtons = new GUIDropDownButtonConfig[5];
            EditorButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "Color Picker", value = typeof(GUIColorPickerWindow), callback = showWindowElement
            };
            EditorButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "Eyedropper", value = null, callback = null
            };
            EditorButtons[2] = new GUIDropDownButtonConfig()
            {
                text = "Paint", value = null, callback = null
            };
            EditorButtons[3] = new GUIDropDownButtonConfig()
            {
                text = "Create Block", value = null, callback = null
            };
            EditorButtons[4] = new GUIDropDownButtonConfig()
            {
                text = "Delete Block", value = null, callback = null
            };
            #endregion

            #region Debug Menu Buttons
            GUIDropDownButtonConfig[] DebugMenuButtons = new GUIDropDownButtonConfig[2];
            DebugMenuButtons[0] = new GUIDropDownButtonConfig()
            {
                text = "Regen ToolBar", value = null, callback = (d, b) => { GenBar(renderer.ScreenWidth, true); }
            };
            DebugMenuButtons[1] = new GUIDropDownButtonConfig()
            {
                text = "show colour menu", value = typeof(GUIColorPickerWindow), callback = showWindowElement
            };
            #endregion

            GUIFrame bottomBar = new GUIFrame(new UDim2(0, 0, 1, -30), new UDim2(1, 0, 0, 30), theme);

            statusLeft = new GUILabel(UDim2.Zero, new UDim2(0.5f, 0, 1, 0), "<left status>", TextAlign.Left, theme)
            {
                Parent = bottomBar
            };
            statusRight = new GUILabel(new UDim2(0.5f, 0, 0, 0), new UDim2(0.5f, 0, 1, 0), "<right status>", TextAlign.Right, theme)
            {
                Parent = bottomBar
            };

            GUIFrame rightHandBar = new GUIFrame(new UDim2(.5f, -45, 0, 0), new UDim2(1, 0, 1, 0), theme);
            rightHandBar.MinSize = new UDim2(0, 90, .75f, 90);
            rightHandBar.MaxSize = rightHandBar.MinSize;

            GUIButton toAddRBar = new GUIButton(UDim2.Zero, new UDim2(1, 0, 1, 0), "Test", theme)
            {
                Parent = rightHandBar
            };

            ToolBarCreator genTop = new ToolBarCreator(theme);

            genTop.SetButtonWidth(4);

            genTop.Add("File", FileMenuButtons);
            genTop.Add("GFX", GfxMenuButtons,
                       new SubDropdownConfig()
            {
                Title = "Fog", subButtons = fogButtons
            },
                       new SubDropdownConfig()
            {
                Title = "PCF Samples", subButtons = pcfButtons
            }
                       ); //<!-- gfx settings -->
            genTop.Add("Tools", EditorButtons);
            genTop.Add("Debug", DebugMenuButtons);

            this.TopBar = genTop.GetToolBar();

            TopBarHelper = new ToolBarHelper(this.TopBar);

            GUIColorPickerWindow ColorWindow = new GUIColorPickerWindow(renderer.Sprites.GUISystem, new UDim2(0.3f, 0, 0.3f, 0), theme);
            ColorWindow.MinSize = new UDim2(0, 400, 0, 300);
            ColorWindow.MaxSize = new UDim2(0, 550, 0, 400);


            SetupDefaultGraphicsSettings();

            windowElements.Add(ColorWindow);

            renderer.Sprites.GUISystem.Add(ColorWindow);
            area.AddTopLevel(TopBar, bottomBar, rightHandBar);
        }
コード例 #7
0
ファイル: DocMain.cs プロジェクト: youthjoy/cshelper
 public void BindTopTool()
 {
     ToolBarHelper tsHelper = new ToolBarHelper();
     ToolStripButton scanDocBtn = tsHelper.New("关联文档", QX.GenFramework.Properties.Resources.batch, new EventHandler(scanDocBtn_Click));
     //ucProdAll.AddCustomBtn(scanDocBtn, 7);
 }
コード例 #8
0
ファイル: DocRepairQuery.cs プロジェクト: youthjoy/cshelper
        private void BindTopTool()
        {
            #region 库存

            //Bll_Bse_Dict dcInstance = new Bll_Bse_Dict();
            //List<Bse_Dict> list = dcInstance.GetDictByKey("SearchType");

            //comboStat.DataSource = list;
            //comboStat.DisplayMember = "Dict_Name";
            //comboStat.ValueMember = "Dict_Code";
            //comboStat.Tag = list;

            this.top_tool_bar.SearchClicked += new EventHandler(top_tool_bar_SearchClicked);
            this.top_tool_bar.AddSearchAllModule();
            this.top_tool_bar.LookClicked += new EventHandler(top_tool_bar_LookClicked);
            //ToolStripControlHost comboStatHost = new ToolStripControlHost(comboStat);
            //comboStatHost.Margin = new Padding(5, 0, 0, 0);
            //this.top_tool_bar.AddCustomControl(6, comboStatHost);
            ToolBarHelper tsHelper = new ToolBarHelper();
            ToolStripButton btnDownload = tsHelper.New("下载", QX.GenFramework.Properties.Resources.import, new EventHandler(btnDownload_Click));

            this.top_tool_bar.AddCustomControl(9, btnDownload);
            #endregion
        }
コード例 #9
0
ファイル: CompMange.cs プロジェクト: youthjoy/cshelper
        public void BindTopTool()
        {
            ToolBarHelper tsHelper = new ToolBarHelper();

            this.top_tool_bar.SaveClicked += new EventHandler(top_tool_bar_SaveClicked);

            scanBtn = tsHelper.New("扫描", QX.GenFramework.Properties.Resources.gantan, new EventHandler(scanBtn_Click));

            this.top_tool_bar.AddCustomControl(scanBtn);

            Bll_Bse_Dict dcInstance = new Bll_Bse_Dict();
            List<Bse_Dict> list = dcInstance.GetDictByKey("ScanMode");

            comboStat.DataSource = list;
            comboStat.DisplayMember = "Dict_Name";
            comboStat.ValueMember = "Dict_Code";
            comboStat.Tag = list;

            ToolStripControlHost comboStatHost = new ToolStripControlHost(comboStat);
            comboStatHost.Margin = new Padding(5, 0, 0, 0);
            this.top_tool_bar.AddCustomControl(6, comboStatHost);
        }
コード例 #10
0
ファイル: ProdRepairOp.cs プロジェクト: youthjoy/cshelper
        public void BindTopTool()
        {
            this.top_tool_bar.SaveClicked += new EventHandler(top_tool_bar_SaveClicked);

            ToolBarHelper tsHelper = new ToolBarHelper();
            scanBtn = tsHelper.New("扫描", QX.GenFramework.Properties.Resources.gantan, new EventHandler(scanBtn_Click));

            this.top_tool_bar.AddCustomControl(scanBtn);
        }