Beispiel #1
0
 public SettingsForm(DefaultSettings ds, bool settingDef)
 {
     GameConfig = new GameSettings();
     InitializeComponent();
     LoadDefaultSettings(ds);
     if(settingDef)
     {
         settingDefaults = true;
         this.Text = "Default settings";
     }
 }
Beispiel #2
0
        private void LoadDefaultSettings(DefaultSettings ds)
        {
            GameConfig = new GameSettings();
            if (ds == null)
                return;
            LoadingDefaults = true;
            pHash.Text = ds.PlayerHash;
            numberofBets.Value = ds.BetAmmount;
            GameConfig.UseStrat = ds.UseStrat;
            GameConfig.ResetBetMultiplyer = ds.ResetBetMultiplyer;
            GameConfig.ResetBetMultiplyerDeadline = ds.ResetBetMultiplyerDeadline;

            useStratCheck.Checked = GameConfig.UseStrat;
            GameConfig.StratergySquares = ds.StratergySquares;
            if (GameConfig.UseStrat)
            {
                stratDisplay.Reset();
                foreach (int sv in GameConfig.StratergySquares)
                {
                    stratDisplay.SetSquare(sv, Brushes.Green);
                }
            }

            betCostNUD.Value = ds.BetCost;
            stopAfterWinCheck.Checked = ds.StopAfterWin;
            stopAfterLossCheck.Checked = ds.StopAfterLoss;
            showExWindow.Checked = ds.ShowExceptionWindow;
            precentOnLoss.Value = ds.PercentOnLoss;
            showGBombsCheck.Checked = ds.ShowGameBombs;
            saveLog.Checked = ds.SaveLogToFile;
            cfgTag.Text = ds.ConfigTag;
            stopAfterGamesChecked.Checked = ds.StopAfterGames;
            percentOnLossReset.Checked = ds.ResetBetMultiplyer;
            PercentOnLossResetGames.Value = ds.ResetBetMultiplyerDeadline;
            useProxy.Checked = ds.UseProxy;
            proxyBox.Text = ds.Proxy;
            metaChecked.Checked = ds.MetaSettings;

            nudDelay.Value = ds.GameDelay;

            BalanceStopCheck.Checked = ds.CheckBalance;
            if(ds.BalanceStopAbove == -1)
            {
                balanceStopOverChecked.Checked = false;
            }
            else
            {
                if(ds.BalanceStopAbove > balanceStopOver.Minimum && ds.BalanceStopAbove < balanceStopOver.Maximum)
                    balanceStopOver.Value = ds.BalanceStopAbove;
                balanceStopOverChecked.Checked = true;
            }
            if (ds.BalanceStopBelow == -1)
            {
                balanceStopUnderChecked.Checked = false;
            }
            else
            {
                if(ds.BalanceStopBelow > balanceStopUnder.Minimum && ds.BalanceStopBelow < balanceStopUnder.Maximum)
                    balanceStopUnder.Value = ds.BalanceStopBelow;
                balanceStopUnderChecked.Checked = true;
            }

            if (ds.StopAfterGamesAmmount < 1)
                stopAfterGamesNum.Value = 1;
            else
                stopAfterGamesNum.Value = ds.StopAfterGamesAmmount;
            stopAfterGamesNum.Enabled = stopAfterGamesChecked.Checked;

            switch (ds.BombCount)
            {
                case 1:
                    radioButton1.Checked = true;
                    break;
                case 3:
                    radioButton2.Checked = true;
                    break;
                case 5:
                    radioButton3.Checked = true;
                    break;
                case 24:
                    radioButton4.Checked = true;
                    break;
            }
            numberofBets.Enabled = !GameConfig.UseStrat;
            LoadingDefaults = false;
        }
Beispiel #3
0
 public SettingsForm(DefaultSettings ds)
 {
     GameConfig = new GameSettings();
     InitializeComponent();
     LoadDefaultSettings(ds);
 }
Beispiel #4
0
 public SettingsForm()
 {
     GameConfig = new GameSettings();
     InitializeComponent();
     GameConfig.BombCount = 3;
 }