/// <summary> /// Обновляет насторойки игры. /// </summary> public void SettingsChanged() { lock (_lockObject) { _settingsPack = Fun.LoadSettings(); Resized(null, null); } }
public SettingsForm() { InitializeComponent(); _testBlock.X = _testBlock.Y = 50; _settingsPack = Fun.LoadSettings().Clone(); UpdateControls(); foreach (Control item in Controls) { item.KeyDown += SettingsForm_KeyDown; } }
public static SettingsPack LoadSettings() { SettingsPack sp = Settings.Default.SettingsPack; if (sp != null) { return(sp); } sp = new SettingsPack(); sp.Apply(); return(sp); }
private void reset_Click(object sender, EventArgs e) { SettingsPack t = new SettingsPack { Blocks = _settingsPack.Blocks, Score = _settingsPack.Score, PreviousScore = _settingsPack.PreviousScore, PreviousStep = _settingsPack.PreviousStep }; _settingsPack = t; UpdateControls(); }