private void CreateMenu()
 {
     this.mContextMenu = new ContextMenu(new MenuItem[] {
         serversItem = new MenuItem("服务器", new MenuItem[] {
             enableAllServerItem  = new MenuItem("启用所有服务器", new EventHandler(this.enableAllServerItem_Click)),
             disableAllServerItem = new MenuItem("停用所有服务器", new EventHandler(this.disableAllServerItem_Click)),
             new MenuItem("-"),
             configItem = new MenuItem("编辑服务器", new EventHandler(this.configItem_Click))
         }),
         new MenuItem("-"),
         autoStartupItem = new MenuItem("开机自启动", new EventHandler(this.autoStartupItem_Click)),
         new MenuItem("-"),
         logItem = new MenuItem("显示日志", new EventHandler(this.logItem_Click)),
         new MenuItem("退出", new EventHandler(this.exitItem_Click))
     });
     autoStartupItem.Checked = AutoStartupUtil.Check();
 }
        private void CreateMenu()
        {
            this._contextMenu = new ContextMenu(new MenuItem[] {
                _serversItem = new MenuItem("服务器", new MenuItem[] {
                    _enableAllServerItem  = new MenuItem("启用所有服务器", this.enableAllServerItem_Click),
                    _disableAllServerItem = new MenuItem("停用所有服务器", this.disableAllServerItem_Click),
                    new MenuItem("-"),
                    _configItem = new MenuItem("编辑服务器", this.configItem_Click)
                }),
                new MenuItem("-"),
                _autoStartupItem = new MenuItem("开机自启动", this.autoStartupItem_Click),
                new MenuItem("-"),
                _logItem = new MenuItem("显示日志", this.logItem_Click),
                new MenuItem("更新", new MenuItem[]
                {
                    new MenuItem("检查更新", this.checkUpdateItem_Click),
                    new MenuItem("-"),
                    _autoCheckUpdateItem = new MenuItem("启动时检查更新", this.autoCheckUpdateItem_Click)
                }),
                _aboutItem = new MenuItem("关于", this.aboutItem_Click),
                new MenuItem("-"),
                new MenuItem("退出", this.exitItem_Click)
            });
            _autoStartupItem.Checked = AutoStartupUtil.Check();

            if (Configuration.GetConfigFile()["autoCheckUpdate"] == null)
            {
                JObject loCfg = Configuration.GetConfigFile();
                loCfg["autoCheckUpdate"] = false;
                Configuration.SaveConfigFile(loCfg);
            }
            _autoCheckUpdateItem.Checked = (bool)Configuration.GetConfigFile()["autoCheckUpdate"];
            if (_autoCheckUpdateItem.Checked)
            {
                UpdateController.GetInstance().StartChecking(true);
            }
        }