public void controlNotifyTray(bool visiable) { if (menuController != null) { menuController.controlNotifyTray(visiable); } if (visiable == false) { menuController = null; } }
private void Main_Load(object sender, EventArgs e) { this.menuController = ViewManager.instance.MenuController; ViewManager.instance.controlNotifyTray(true); panServers.HorizontalScroll.Enabled = false; this.siteConfig = SiteConfig.instance(); if (!this.siteConfig.sitename.IsNullOrEmpty() && this.siteConfig.sitename != lblWindowTitle.Text) { this.lblWindowTitle.Text = this.siteConfig.sitename; } this.renderUserInfo(User.instance()); }
public Setting() { InitializeComponent(); materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.LightBlue500, Primary.LightBlue500, Primary.Amber900, Accent.Amber700, TextShade.WHITE); this.menuController = ViewManager.instance.MenuController; this.mainController = ViewManager.instance.MainController; this.mainController.PACFileReadyToOpen += controller_FileReadyToOpen; this.mainController.UpdatePACFromGFWListCompleted += controller_UpdatePACFromGFWListCompleted; this.mainController.UpdatePACFromGFWListError += controller_UpdatePACFromGFWListError; this.siteConfig = SiteConfig.instance(); this.configuration = this.mainController.GetConfigurationCopy(); this.updateChecker = new UpdateChecker(); this.updateChecker.CheckUpdateCompleted += updateChecker_CheckUpdateCompleted; }