private void ThemeComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e) { try { var comboitem = this.themeComboBox.SelectedItem as ComboBoxItem; switch (this.themeComboBox.SelectedIndex) { case 0: case 2: case 3: ThemeFactory.ChangeTheme(new Uri(comboitem.Tag.ToString(), UriKind.RelativeOrAbsolute)); break; case 1: case 4: case 5: case 6: ThemeFactory.ChangeTheme(comboitem.Tag.ToString()); break; } } catch (Exception error) { Framework.EventBus.Publish(error); } }
protected override void OnStartup(StartupEventArgs _e) { InitInternalServer(); base.OnStartup(_e); ThemeFactory.ChangeTheme("luna.normalcolor"); var main = new MainWindow(); main.Show(); }
public void SetTheme(string themeName) { try { if (themeName == "dev2010") { string uri = "/AvalonDock.Themes;component/themes/dev2010.xaml"; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); } else if (themeName == "dev2010green") { string uri = "/AvalonDock.Themes;component/themes/dev2010green.xaml"; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); } else if (themeName == "dev2010red") { string uri = "/AvalonDock.Themes;component/themes/dev2010red.xaml"; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); } else if (themeName == "ExpressionDark") { string uri = "/AvalonDock.Themes;component/themes/ExpressionDark.xaml"; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); } else if (themeName == "ExpressionLight") { string uri = "/AvalonDock.Themes;component/themes/ExpressionLight.xaml"; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); } else if (themeName == "classic" || themeName == "generic" || themeName == "luna.normalcolor" || themeName == "aero.normalcolor") { ThemeFactory.ChangeTheme(themeName); } else if (themeName.StartsWith("#")) { //System.Windows.Forms.MessageBox.Show(themeName); byte a = byte.Parse(themeName.Substring(1, 2), NumberStyles.HexNumber); byte r = byte.Parse(themeName.Substring(3, 2), NumberStyles.HexNumber); byte g = byte.Parse(themeName.Substring(5, 2), NumberStyles.HexNumber); byte b = byte.Parse(themeName.Substring(7, 2), NumberStyles.HexNumber); ThemeFactory.ChangeColors(System.Windows.Media.Color.FromArgb(a, r, g, b)); } else if (themeName == "default") { ThemeFactory.ResetTheme(); } } catch // (Exception ex) { //System.Windows.Forms.MessageBox.Show(ex.ToString(), "At ToolSettings.SetTheme()"); } }
/// <summary> /// Constructor for panels /// </summary> public Panels() { try { this.InitializeComponent(); this.SideBarExplorer.Hide(); this.BottomBar.Hide(); ThemeFactory.ChangeTheme(new Uri("LGP.Components.Panels;component/Themes/lgp.xaml", UriKind.RelativeOrAbsolute)); } catch (Exception error) { Framework.EventBus.Publish(error); } }
/// <summary> /// Win main /// </summary> public winMain() { ThemeFactory.ChangeTheme("classic"); InitializeComponent(); //Select Template In Template Explorer this.lucTemplatesExplorer.SelectTemplateNode += new TemplateHander(lucTemplatesExplorer_SelectTemplateNode); //Select File In Solution Explorer this.lucSolutionExplorer.SelectFileNode += new ViewCodeHander(lucSolutionExplorer_SelectFileNode); // this.lucServerExplorer.SelectServerObject += new SelectedServerObjectHander(lucServerExplorer_SelectServerObject); // this.InitNewDocument.LoadProperties(this.lucDocumentProperties); //CodeGenerateHelper cghelper = new CodeGenerateHelper(); //SqlDBHelper sqlHelper = new SqlDBHelper( "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=srmgateway;Data Source=EBIZSQLD3.amer.corp.eds.com"); //DataTable dt = sqlHelper.GetTables("select * from SRM_ErrorLog"); //DataType System.String //DataTypeName String //ColumnSize //IsKey //AllowDBNull False/True //ColumnName }
public void InitService(params Object[] objects) { DockManager = objects[0] as DockingManager; if (DockManager == null) { throw new ArgumentException("First parameter is not of type DockingManager"); } MainWindow = objects[1] as MainWindow; if (MainWindow == null) { throw new ArgumentException("Second parameter is not of type MainWindow"); } Application.Current.Resources["ThemeDictionary"] = new ResourceDictionary(); ThemeFactory.ChangeTheme("dev2010"); MainWindow.WindowState = PropertyService.GetWabbitcodeProperty("WindowState"); MainWindow.Top = PropertyService.GetWabbitcodeProperty("Top"); MainWindow.Left = PropertyService.GetWabbitcodeProperty("Left"); MainWindow.Width = PropertyService.GetWabbitcodeProperty("Width"); MainWindow.Height = PropertyService.GetWabbitcodeProperty("Height"); DockManager.DeserializationCallback = new DockingManager.DeserializationCallbackHandler(DeserializationCallback); }
private void ChangeStandardTheme(object sender, RoutedEventArgs e) { string name = (string)((MenuItem)sender).Tag; ThemeFactory.ChangeTheme(name); }
private void ChangeCustomTheme(object sender, RoutedEventArgs e) { string uri = (string)((MenuItem)sender).Tag; ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); }