private void SaveTimer_Tick(object sender, EventArgs e) { ScoreManager.Score Score = new ScoreManager.Score((int)WinsUpDown.Value, (int)LosesUpDown.Value, (int)DrawsUpDown.Value, (int)StartingRateUpDown.Value); ScoreManager.Save(Score); SaveTimer.Enabled = false; WinButton.Enabled = true; LoseButton.Enabled = true; DrawButton.Enabled = true; ResetButton.Enabled = true; }
private void SaveScore() { ScoreManager.Score Score = new ScoreManager.Score ( (int)WinsUpDown.Value, (int)LosesUpDown.Value, (int)DrawsUpDown.Value, TankStartingRateEnabledCheckBox.Checked, DamageStartingRateEnabledCheckBox.Checked, SupportStartingRateEnabledCheckBox.Checked, (int)TankStartingRateUpDown.Value, (int)DamageStartingRateUpDown.Value, (int)SupportStartingRateUpDown.Value, TankInPlacementCheckbox.Checked, DamageInPlacementCheckbox.Checked, SupportInPlacementCheckbox.Checked, MenuItem_SwitchMode_OpenQueue.Checked ); ScoreManager.Save(Score); }
private void OnLoad(object sender, EventArgs e) { // 前回のウィンドウ位置を復元 Point WindowPosition = Properties.Settings.Default.WindowPosition; Point UnsetValue = new Point(-1234, -5678); if (WindowPosition != UnsetValue) { DesktopLocation = WindowPosition; } // 最大化ボタンを無効化 this.MaximizeBox = false; // 言語設定を復元 switch (Properties.Settings.Default.Language) { case "ja-JP": MenuItem_Language_Japanese_Click(null, null); break; case "en-US": MenuItem_Language_English_Click(null, null); break; case "Automatic": default: MenuItem_Language_Automatic_Click(null, null); break; } SetLanguage(); // Score を読み込んで値をセット ScoreManager.Score Score = ScoreManager.Load(); WinsUpDown.Value = Score.Wins; LosesUpDown.Value = Score.Loses; DrawsUpDown.Value = Score.Draws; TankStartingRateEnabledCheckBox.Checked = Score.IsTankStartingRateEnabled; DamageStartingRateEnabledCheckBox.Checked = Score.IsDamageStartingRateEnabled; SupportStartingRateEnabledCheckBox.Checked = Score.IsSupportStartingRateEnabled; TankStartingRateUpDown.Value = Score.TankStartingRate; DamageStartingRateUpDown.Value = Score.DamageStartingRate; SupportStartingRateUpDown.Value = Score.SupportStartingRate; TankInPlacementCheckbox.Checked = Score.IsTankInPlacement; DamageInPlacementCheckbox.Checked = Score.IsDamageInPlacement; SupportInPlacementCheckbox.Checked = Score.IsSupportInPlacement; SetQueMode(Score.IsOpenQueueMode); // ホットキーをセット SetHotkeyFromConfig(); }
private void OnLoad(object sender, EventArgs e) { // 最大化ボタンを無効化 this.MaximizeBox = false; // Score を読み込んで値をセット ScoreManager.Score Score = ScoreManager.Load(); WinsUpDown.Value = Score.Wins; LosesUpDown.Value = Score.Loses; DrawsUpDown.Value = Score.Draws; StartingRateUpDown.Value = Score.StartingRate; // ホットキーをセット SetHotkeyFromConfig(); }