public frmSetting() { InitializeComponent(); RenderTheme r = new RenderTheme(); r.ApplyTheme(lvExtension); r.ApplyTheme(lvImageEditing); }
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"]; }
private void frmExtension_Load(object sender, EventArgs e) { //Load config //Windows Bound (Position + Size)-------------------------------------------- Rectangle rc = GlobalSetting.StringToRect(GlobalSetting.GetConfig($"{Name}.WindowsBound", "280,125,850,550")); if (!Helper.IsOnScreen(rc.Location)) { rc.Location = new Point(280, 125); } Bounds = rc; //windows state-------------------------------------------------------------- string s = GlobalSetting.GetConfig($"{Name}.WindowsState", "Normal"); if (s == "Normal") { WindowState = FormWindowState.Normal; } else if (s == "Maximized") { WindowState = FormWindowState.Maximized; } //Apply Windows theme RenderTheme r = new RenderTheme(); r.ApplyTheme(tvExtension); //load extensions LoadExtensions(); //Load language: 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"]; RightToLeft = GlobalSetting.LangPack.IsRightToLeftLayout; }
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"]; }