コード例 #1
0
        public MainWindow()
        {
            ChangeAppStyle(Application.Current, GetAccent(Settings.Default.AccentColor), GetAppTheme(Settings.Default.Theme));
            InitializeComponent();

            _generalDownloadManager.DownloadStarted         += DownloadStarted;
            _generalDownloadManager.DownloadProgressChanged += DownloadProgressChanged;

            Topmost = Settings.Default.AlwaysOnTop;
            Colors.SelectedIndex = Array.IndexOf(UiResources.GetColor().Values.ToArray(), Settings.Default.AccentColor);
            Themes.SelectedIndex = Array.IndexOf(UiResources.GetTheme().Values.ToArray(), Settings.Default.Theme);

            _gameTabController = new TabController(GameTabControl);
        }
コード例 #2
0
        private void GameSettingsTabItem_OnSelected(object sender, RoutedEventArgs e)
        {
            PsoSettings.Reload();

            // Math is used to map the Vsync values to indexes to remove the need for a Switch or an Array
            VsyncComboBox.SelectedIndex         = (int)(PsoSettings.Vsync / 140f * 5f);
            WindowModeComboBox.SelectedIndex    = PsoSettings.VirtualFullScreen ? 2 : ToInt32(PsoSettings.FullScreen);
            MonitorPlaybackCheckBox.IsChecked   = PsoSettings.MoviePlay;
            TextureComboBox.SelectedIndex       = PsoSettings.TextureResolution;
            ShaderQualityCombobox.SelectedIndex = PsoSettings.ShaderQuality;
            InterfaceSizeComboBox.SelectedIndex = PsoSettings.InterfaceSize;
            MusicSlider.Value           = PsoSettings.Music;
            SoundSlider.Value           = PsoSettings.Sound;
            VoiceSlider.Value           = PsoSettings.Voice;
            VideoSlider.Value           = PsoSettings.Video;
            SurroundToggle.IsChecked    = PsoSettings.Surround;
            GlobalFocusToggle.IsChecked = PsoSettings.GlobalFocus;

            var resolution = $"{PsoSettings.WindowWidth}x{PsoSettings.WindowHight}";

            UiResources.GetResolutions().Add(resolution);
            ResolutionsCombobox.SelectedItem = resolution;
        }