示例#1
0
文件: MainForm.cs 项目: 15831944/tool
        public MainForm()
        {
            InitializeComponent();
            SetSplashScreen();
            Control.CheckForIllegalCrossThreadCalls = false;
            ThreadPool.RegisterWaitForSingleObject(Program.ewh, OnProgramStarted, null, -1, false);

            Panel.Skin.AutoHideStripSkin             = _autoHideStripSkin;
            vS2012ToolStripExtender1                 = new VSToolStripExtender(components);
            vS2012ToolStripExtender1.DefaultRenderer = _toolStripProfessionalRenderer;
            vS2012ToolStripExtender1.VS2012Renderer  = _vs2012ToolStripRenderer;
            vS2012ToolStripExtender1.VS2013Renderer  = _vs2013ToolStripRenderer;
            this.Panel.Theme = new VS2012LightTheme();
            switch (vsVersion)
            {
            case "2012":
                this.Panel.Theme = new VS2012LightTheme();
                version          = VSToolStripExtender.VsVersion.Vs2012;
                break;

            case "2013":
                this.Panel.Theme = new VS2013BlueTheme();
                version          = VSToolStripExtender.VsVersion.Vs2013;
                break;

            default:
                this.Panel.Theme = new VS2005Theme();
                version          = VSToolStripExtender.VsVersion.Vs2005;
                break;
            }
            this.EnableVSRenderer(version);
            Initialize();
        }
 private void EnableVSRenderer(VSToolStripExtender.VsVersion version)
 {
     vS2012ToolStripExtender1.SetStyle(this.mainMenu, version);
     vS2012ToolStripExtender1.SetStyle(this.toolBar, version);
     vS2012ToolStripExtender1.SetStyle(this.statusBar, version);
 }