internal void ChangeStyle(MainWindow sender, ApplicationStyle applicationStyle) { switch (applicationStyle) { case ApplicationStyle.BlueLight: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Light); break; case ApplicationStyle.BlueDark: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Dark); break; case ApplicationStyle.GreenLight: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Green"), Theme.Light); break; case ApplicationStyle.GreenDark: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Green"), Theme.Dark); break; case ApplicationStyle.RedLight: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Red"), Theme.Light); break; case ApplicationStyle.RedDark: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Red"), Theme.Dark); break; case ApplicationStyle.PurpleLight: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Purple"), Theme.Light); break; case ApplicationStyle.PurpleDark: ThemeManager.ChangeTheme(sender, ThemeManager.DefaultAccents.First(a => a.Name == "Purple"), Theme.Dark); break; } }
private void ChangeTheme(ApplicationStyle applicationStyle) { switch (applicationStyle) { case ApplicationStyle.BlueLight: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Light); break; case ApplicationStyle.BlueDark: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Dark); break; case ApplicationStyle.GreenLight: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Green"), Theme.Light); break; case ApplicationStyle.GreenDark: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Green"), Theme.Dark); break; case ApplicationStyle.RedLight: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Red"), Theme.Light); break; case ApplicationStyle.RedDark: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Red"), Theme.Dark); break; case ApplicationStyle.PurpleLight: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Purple"), Theme.Light); break; case ApplicationStyle.PurpleDark: ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Purple"), Theme.Dark); break; } }
/// <inheritdoc /> public MainWindow() { InitializeComponent(); IAppSettingsBase appSettingsBase = new AppSettingsBase(Settings.Default); IApplicationStyle applicationStyle = new ApplicationStyle(); applicationStyle.Load(true); _appSettings = new AppSettings(appSettingsBase); Load(); }
/// <inheritdoc /> public MainWindow() { InitializeComponent(); IAppSettingsBase appSettingsBase = new AppSettingsBase(Settings.Default); _themeManagerHelper = new ThemeManagerHelper(); IApplicationStyle applicationStyle = new ApplicationStyle(_themeManagerHelper); applicationStyle.Load(true); _appSettings = new AppSettings(appSettingsBase); Load(); }
/// <summary> /// listBoxApplicationStyles_SelectedIndexChanged event handler. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An EventArgs that contains the event data.</param> private void listBoxApplicationStyles_SelectedIndexChanged(object sender, EventArgs e) { // If the list box is empty, just ignore the event. if (listBoxApplicationStyles.Items.Count == 0) { return; } // Update state. ApplicationStyle applicationStyle = (ApplicationStyle)listBoxApplicationStyles.SelectedItem; pictureBoxPreview.Image = applicationStyle.PreviewImage; applicationStylePreferences.ApplicationStyleType = applicationStyle.GetType(); }
/// <inheritdoc /> public MainWindow() { InitializeComponent(); IAppSettingsBase appSettingsBase = new AppSettingsBase(Settings.Default); _roundCorners = new RoundCorners(); IApplicationStyle style = new ApplicationStyle(_roundCorners, true); style.Run(); _appSettings = new AppSettings(appSettingsBase); _moveDirectory = new MoveDirectory(); _processByPath = new ProcessByPath(); _generateNewPath = new GenerateNewPath(_appSettings); Load(); }
private void Load() { IRoundCorners roundCorners = new RoundCorners(); IApplicationStyle style = new ApplicationStyle(roundCorners, true, true); style.Run(); IScriptPaths scriptPaths = new ScriptPaths(); IExecutePowerShellScript executePowerShellScript = new ExecutePowerShellScript(); ITaskBarIconConfiguration taskBarIconConfiguration = new TaskBarIconConfiguration(this, PowerShellRunnerTaskBarIcon, executePowerShellScript, scriptPaths); taskBarIconConfiguration.StartMinimized(); taskBarIconConfiguration.Run(); //MessageBox.Show(stringBuilder.ToString()); }
/// <inheritdoc /> public MainWindow() { InitializeComponent(); _roundCorners = new RoundCorners(); IApplicationStyle style = new ApplicationStyle(_roundCorners, true); style.Run(); WindowState = WindowState.Minimized; _app = (App)Application.Current; IFileListFromPath fileListFromPath = new FileListFromPath(); IListFromFileSystem listFromFileSystem = new ListFromFileSystem(_app, fileListFromPath); _compareFileLists = new CompareFileLists(listFromFileSystem, _app); _writeFileListToDb = new WriteFileListToDb(listFromFileSystem, _app); LoadAsync(); }
public UITheme(Control control) : base(control, false) { _applicationStyle = new ApplicationStyle(); ApplyTheme(); }
public SettingsViewModel() { _selectedApplicationStyle = ApplicationStyle.BlueLight; }
public void Constructor_ReturnsInterfaceName(ApplicationStyle sut) { sut.Should().BeAssignableTo <IApplicationStyle>(); }
private void ChangeTheme(ApplicationStyle applicationStyle) { new ApplicationStyleHelper().ChangeStyle(this, applicationStyle); }