Exemplo n.º 1
0
        private void AccentSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(AccentSelector.SelectedItem is Accent selectedAccent))
            {
                return;
            }
            var theme = ThemeManager.DetectAppStyle(Application.Current);

            ThemeManager.ChangeAppStyle(Application.Current, selectedAccent, theme.Item1);
            _colorConfigurationController.WriteConfiguration(new ColorConfiguration {
                Color = selectedAccent.Name
            });
        }
Exemplo n.º 2
0
        private void SaveSettingsClick(object sender, RoutedEventArgs e)
        {
            _serverConfigurationController.WriteConfiguration(new ServerConfiguration
            {
                Host        = TxtBoxHost.Text,
                Port        = TxtBoxPort.Text,
                FtpUser     = FtpUserTextBox.Text,
                FtpPassword = FtpPasswordTextBox.Password
            });

            if (CheckIfConfigHasChanged())
            {
                ShowRestartMessage();
            }
            else
            {
                DialogResult = true;
            }
        }