public SettingsControl(ContentControl control, Views.Library library)
        {
            InitializeComponent();

            // reload ParrotData from file
            JoystickHelper.DeSerialize();

            ChkUseSto0ZCheckBox.IsChecked = Lazydata.ParrotData.UseSto0ZDrivingHack;
            sTo0zZonePercent.Value        = Lazydata.ParrotData.StoozPercent;
            ChkSaveLastPlayed.IsChecked   = Lazydata.ParrotData.SaveLastPlayed;
            ChkUseDiscordRPC.IsChecked    = Lazydata.ParrotData.UseDiscordRPC;
            ChkConfirmExit.IsChecked      = Lazydata.ParrotData.ConfirmExit;
            ChkCheckForUpdates.IsChecked  = Lazydata.ParrotData.CheckForUpdates;
            ChkDownloadIcons.IsChecked    = Lazydata.ParrotData.DownloadIcons;
            ChkSilentMode.IsChecked       = Lazydata.ParrotData.SilentMode;
            ChkUiDisableHardwareAcceleration.IsChecked = Lazydata.ParrotData.UiDisableHardwareAcceleration;
            ChkFullAxisGas.IsChecked      = Lazydata.ParrotData.FullAxisGas;
            ChkFullAxisBrake.IsChecked    = Lazydata.ParrotData.FullAxisBrake;
            ChkReverseAxisGas.IsChecked   = Lazydata.ParrotData.ReverseAxisGas;
            ChkReverseAxisBrake.IsChecked = Lazydata.ParrotData.ReverseAxisBrake;
            textBoxExitGameKey.Text       = Lazydata.ParrotData.ExitGameKey;
            textBoxPauseGameKey.Text      = Lazydata.ParrotData.PauseGameKey;
            textBoxScoreSubmissionID.Text = Lazydata.ParrotData.ScoreSubmissionID;
            textBoxScoreCollapseKey.Text  = Lazydata.ParrotData.ScoreCollapseGUIKey;

            UiColour.ItemsSource         = new SwatchesProvider().Swatches.Select(a => a.Name).ToList();
            UiColour.SelectedItem        = Lazydata.ParrotData.UiColour;
            ChkUiDarkMode.IsChecked      = Lazydata.ParrotData.UiDarkMode;
            ChkUiHolidayThemes.IsChecked = Lazydata.ParrotData.UiHolidayThemes;

            if (App.IsPatreon())
            {
                UiPatreon.Visibility = Visibility.Visible;
            }
            else
            {
                UiPatreon.Visibility = Visibility.Collapsed;
            }

            _contentControl = control;
            _library        = library;
        }
Ejemplo n.º 2
0
        public SettingsControl(ContentControl control, Views.Library library)
        {
            InitializeComponent();

            // reload ParrotData from file
            JoystickHelper.DeSerialize();

            ChkUseSto0ZCheckBox.IsChecked = Lazydata.ParrotData.UseSto0ZDrivingHack;
            sTo0zZonePercent.Value        = Lazydata.ParrotData.StoozPercent;
            ChkSaveLastPlayed.IsChecked   = Lazydata.ParrotData.SaveLastPlayed;
            ChkUseDiscordRPC.IsChecked    = Lazydata.ParrotData.UseDiscordRPC;
            ChkConfirmExit.IsChecked      = Lazydata.ParrotData.ConfirmExit;
            ChkCheckForUpdates.IsChecked  = Lazydata.ParrotData.CheckForUpdates;
            ChkSilentMode.IsChecked       = Lazydata.ParrotData.SilentMode;
            ChkFullAxisGas.IsChecked      = Lazydata.ParrotData.FullAxisGas;
            ChkFullAxisBrake.IsChecked    = Lazydata.ParrotData.FullAxisBrake;
            ChkReverseAxisGas.IsChecked   = Lazydata.ParrotData.ReverseAxisGas;
            ChkReverseAxisBrake.IsChecked = Lazydata.ParrotData.ReverseAxisBrake;
            GunSensitivityPlayer1.Value   = Lazydata.ParrotData.GunSensitivityPlayer1;
            GunSensitivityPlayer2.Value   = Lazydata.ParrotData.GunSensitivityPlayer2;

            _contentControl = control;
            _library        = library;
        }