private void frmExtension_Load(object sender, EventArgs e) { //Load config //Windows Bound (Position + Size)-------------------------------------------- Rectangle rc = GlobalSetting.StringToRect(GlobalSetting.GetConfig(this.Name + ".WindowsBound", "280,125,840,500")); this.Bounds = rc; //windows state-------------------------------------------------------------- string s = GlobalSetting.GetConfig(this.Name + ".WindowsState", "Normal"); if (s == "Normal") { this.WindowState = FormWindowState.Normal; } else if (s == "Maximized") { this.WindowState = FormWindowState.Maximized; } //Apply Windows theme RenderTheme r = new RenderTheme(); r.ApplyTheme(tvExtension); //load extensions LoadExtensions(); //Load language: this.Text = GlobalSetting.LangPack.Items["frmExtension._Text"]; btnRefreshAllExt.Text = GlobalSetting.LangPack.Items["frmExtension.btnRefreshAllExt"]; btnGetMoreExt.Text = GlobalSetting.LangPack.Items["frmExtension.btnGetMoreExt"]; btnInstallExt.Text = GlobalSetting.LangPack.Items["frmExtension.btnInstallExt"]; btnClose.Text = GlobalSetting.LangPack.Items["frmExtension.btnClose"]; }
private void frmExtension_Load(object sender, EventArgs e) { //Load config //Windows Bound (Position + Size)-------------------------------------------- Rectangle rc = GlobalSetting.StringToRect(GlobalSetting.GetConfig(this.Name + ".WindowsBound", "280,125,840,500")); this.Bounds = rc; //windows state-------------------------------------------------------------- string s = GlobalSetting.GetConfig(this.Name + ".WindowsState", "Normal"); if (s == "Normal") { this.WindowState = FormWindowState.Normal; } else if (s == "Maximized") { this.WindowState = FormWindowState.Maximized; } //Apply Windows theme RenderTheme r = new RenderTheme(); r.ApplyTheme(tvExtension); if (!System.IO.Directory.Exists(Application.StartupPath + @"\Plugins")) { System.IO.Directory.CreateDirectory(Application.StartupPath + @"\Plugins"); } else { Global.Plugins.FindPlugins(Application.StartupPath + @"\Plugins"); foreach (ImageGlass.Plugins.Types.AvailablePlugin p in Global.Plugins.AvailablePlugins) { TreeNode n = new TreeNode(p.Instance.Name); tvExtension.Nodes.Add(n); n = null; } } //Load language: this.Text = GlobalSetting.LangPack.Items["frmExtension._Text"]; lnkGetMoreExt.Text = GlobalSetting.LangPack.Items["frmExtension.lnkGetMoreExt"]; tvExtension.Nodes[0].Text = GlobalSetting.LangPack.Items["frmExtension.Node0"]; btnClose.Text = GlobalSetting.LangPack.Items["frmExtension.btnClose"]; }