public ThemeValidation() { string[] themes = System.IO.Directory.GetFiles(CurrenTthemeFolder, "*.concept2theme",SearchOption.TopDirectoryOnly); foreach(string t in themes) { ThemeManager themecheck = new ThemeManager(t); if (themecheck.CheckThemerResources()) { allthemeinfo.Add(themecheck.infotheme); } else { System.Windows.MessageBox.Show(themecheck.infotheme.ThemeName + " is not a valid theme "); } } }
public void applyCurrenttheme(string ThemeName) { if(ThemeName==null) theme = new ThemeManager(Environment.CurrentDirectory + "\\Theme\\" + "Default Glass v1.0.Concept2theme"); else theme = new ThemeManager(Environment.CurrentDirectory + "\\Theme\\" + ThemeName + ".Concept2theme"); theme.CheckThemerResources(); MainTheme = theme.themeAttribute; panalSourceHeight = MainTheme.Br_Panal.ImageSource.Height; panalSourceWidth = MainTheme.Br_Panal.ImageSource.Width; this.Height = panalSourceHeight; this.Width = panalSourceWidth; workbench.Height = this.Height; workbench.Width = this.Width; workbench.Background = MainTheme.Br_Panal; AddButton.Source = MainTheme.Bs_AddButton; SettingButton.Source = MainTheme.bs_settings; AddButton.Height = 20; SettingButton.MaxHeight = 30; AddButton.Width = 50; SettingButton.MaxWidth = 30; }
public void IntializeMainWindow() { this.Height = System.Windows.SystemParameters.PrimaryScreenHeight; this.Width = System.Windows.SystemParameters.PrimaryScreenWidth; this.g1.Height = System.Windows.SystemParameters.PrimaryScreenHeight; this.g1.Width = System.Windows.SystemParameters.PrimaryScreenWidth; this.Top = 0; this.Left = 0; this.WindowState = WindowState.Maximized; ClipToBounds = false; Drtn_sld = Concept2DB.GetSlide(); try { //MessageBox.Show(System.Diagnostics.Process.GetCurrentProcess().ProcessName); mainIOCN.Icon = System.Drawing.Icon.ExtractAssociatedIcon(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe"); } catch (Exception ex) { MessageBox.Show(ex.Message); } mainIOCN.BalloonTipText = appname + " is minimized here.. for more option\n Please Right Click the Icon and Choose Option"; mainIOCN.BalloonTipTitle = "Pay Attention!!"; mainIOCN.Visible = true; theme = new ThemeManager(CurrentPath + "\\Theme\\" + Defaultheme + ".Concept2theme"); }