Exemplo n.º 1
0
 private void UCTopMenuBubbleBar_MouseClick(object sender, MouseEventArgs e)
 {
     if (AppSetting.GetInstance().ShowAdvanceSetting)
     {
         if (e.Button == MouseButtons.Right)
         {
             ContextMenu contextMenu = new ContextMenu();
             MenuItem    menuItem    = new MenuItem();
             menuItem.Text   = "刷新";
             menuItem.Click += delegate(object newsender, EventArgs newe)
             {
                 base.SuspendLayout();
                 bool flag3 = this._bubbleBar1 != null;
                 if (flag3)
                 {
                     this._bubbleBar1.Items.Clear();
                     base.Controls.Remove(this._bubbleBar1);
                     this._bubbleBar1.Dispose();
                     this._bubbleBar1 = null;
                 }
                 this.InitializeChild();
                 base.ResumeLayout();
                 this.Refresh();
             };
             contextMenu.MenuItems.Add(menuItem);
             contextMenu.Show(this, e.Location);
         }
     }
 }
Exemplo n.º 2
0
        private void PictureBox1_Click(object sender, EventArgs e)
        {
            this.i++;
            bool flag = this.i % 3 == 0;

            if (flag)
            {
                AppSetting.GetInstance().ShowAdvanceSetting = true;
            }
            else
            {
                AppSetting.GetInstance().ShowAdvanceSetting = false;
            }
        }
 private void UCItemToolBar_MouseClick(object sender, MouseEventArgs e)
 {
     if (AppSetting.GetInstance().ShowAdvanceSetting&& (e.Button == MouseButtons.Right))
     {
         ContextMenu menu = new ContextMenu();
         MenuItem    item = new MenuItem
         {
             Text = "刷新"
         };
         item.Click += delegate(object newsender, EventArgs newe) {
             base.Items.Clear();
             this.InitToolItems();
             this.Refresh();
         };
         menu.MenuItems.Add(item);
         menu.Show(this, e.Location);
     }
 }
        private void ShowAppParams(object param = null)
        {
            FormContainer formContainer = new FormContainer();
            TabControl    tabControl    = new TabControl();
            TabPage       tabPage       = new TabPage();

            tabPage.Text = "快速设置";
            UCSetupWizard uCSetupWizard = new UCSetupWizard();

            uCSetupWizard.Dock = DockStyle.Fill;
            tabPage.Controls.Add(uCSetupWizard);
            tabControl.TabPages.Add(tabPage);
            TabPage tabPage2 = new TabPage();

            tabControl.TabPages.Add(tabPage2);
            UCMultiObjPropertyInfo uCMultiObjPropertyInfo = new UCMultiObjPropertyInfo();

            uCMultiObjPropertyInfo.AddObjs(UISetting.GetInstance().Name, UISetting.GetInstance());
            //uCMultiObjPropertyInfo.AddObjs(this._ucbench.GetSetting().Name, this._ucbench.GetSetting());
            //uCMultiObjPropertyInfo.AddObjs(UISetting.GetInstance().Name, UISetting.GetInstance());
            //uCMultiObjPropertyInfo.AddObjs(this._ucnavigatorbar.GetSetting().Name, this._ucnavigatorbar.GetSetting());
            if (this._uccenterview.Realview != null && this._uccenterview.Realview is UCPictureView)
            {
                UCPictureView.NestSetting setting = (this._uccenterview.Realview as UCPictureView).GetSetting();
                uCMultiObjPropertyInfo.AddObjs(setting.Name, setting);
            }
            uCMultiObjPropertyInfo.AddObjs(this._ucitemtoolbar.GetSetting().Name, this._ucitemtoolbar.GetSetting());
            uCMultiObjPropertyInfo.AddObjs(SummaryPropertiesSetting.GetInstance().Name, SummaryPropertiesSetting.GetInstance());
            uCMultiObjPropertyInfo.AddObjs(this._ucstatusbar.GetSetting().Name, this._ucstatusbar.GetSetting());
            tabPage2.Controls.Add(uCMultiObjPropertyInfo);
            tabPage2.Text = "界面参数设置";
            uCMultiObjPropertyInfo.Dock = DockStyle.Fill;
            TabPage tabPage3 = new TabPage();

            tabControl.TabPages.Add(tabPage3);
            UCMultiObjPropertyInfo uCMultiObjPropertyInfo2 = new UCMultiObjPropertyInfo();

            uCMultiObjPropertyInfo2.AddObjs(UpdateSetting.GetInstance().Name, UpdateSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(EmailSetting.GetInstance().Name, EmailSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(AccountSetting.GetInstance().Name, AccountSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(AppSetting.GetInstance().Name, AppSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(DebugSetting.GetInstance().Name, DebugSetting.GetInstance());
            //uCMultiObjPropertyInfo2.AddObjs(AbstractSetting<NetSetting>.CurSetting.Name, AbstractSetting<NetSetting>.CurSetting);
            uCMultiObjPropertyInfo2.AddObjs(NetSetting.GetInstance().Name, NetSetting.GetInstance());
            bool showAdvanceSetting = AppSetting.GetInstance().ShowAdvanceSetting;

            uCMultiObjPropertyInfo2.AddObjs(FunctionSetting.GetInstance().Name, FunctionSetting.GetInstance());
            if (showAdvanceSetting)
            {
                uCMultiObjPropertyInfo2.AddObjs(AbstractSetting <ServerIniConfig> .CurSetting.Name, AbstractSetting <ServerIniConfig> .CurSetting);
                uCMultiObjPropertyInfo2.AddObjs(FormAboutMe.Setting.Name, FormAboutMe.Setting);
            }
            tabPage3.Controls.Add(uCMultiObjPropertyInfo2);
            tabPage3.Text = "系统参数参数设置";
            uCMultiObjPropertyInfo2.Dock = DockStyle.Fill;
            bool showAdvanceSetting2 = AppSetting.GetInstance().ShowAdvanceSetting;

            if (showAdvanceSetting2)
            {
                TabPage tabPage4 = new TabPage();
                tabControl.TabPages.Add(tabPage4);
                UCMenuBarDesign uCMenuBarDesign = new UCMenuBarDesign();
                uCMenuBarDesign.Dock = DockStyle.Fill;
                tabPage4.Controls.Add(uCMenuBarDesign);
                tabPage4.Text = "菜单配置";
            }
            tabControl.Dock = DockStyle.Fill;
            formContainer.SetControl(tabControl);
            formContainer.Size = new Size(760, 540);
            formContainer.Text = "系统设置";
            formContainer.SetKeyEscCloseForm(true);
            formContainer.ShowDialog();
        }