private void MainView_OptionsClick(object sender, EventArgs e) { _optionsView = _mainView.CreateOptionsView(); _optionsView.NotCustomGameSelect += OptionsView_NotCustomGameSelect; _optionsView.CustomGameSelect += OptionsView_CustomGameSelect; _optionsView.ConfirmSelectionClick += OptionsView_ConfirmSelectionClick; GameType currentGameType = _gameManager.GetGameType(); _optionsView.SetSelectedOption(currentGameType); if (currentGameType == GameType.Custom) { Options currentOptions = _gameManager.CurrentOptions; _optionsView.FieldWidth = currentOptions.Width; _optionsView.FieldHeight = currentOptions.Height; _optionsView.Mines = currentOptions.MinesAmount; _optionsView.EnableCustomValues(true); } else { _optionsView.EnableCustomValues(false); } _optionsView.ShowDialog(); }
private void OptionsView_CustomGameSelect(object sender, EventArgs e) { _optionsView.EnableCustomValues(true); }