private void ClearControls() { TextBoxCode.Clear(); TextBoxName.Clear(); TextBoxCost.Clear(); ComboBoxCategory.ResetText(); }
/// <summary> /// Очищает текстовые поля /// </summary> private void ClearData() { TextBoxNumber.Clear(); TextBoxCrew1.Clear(); TextBoxCrew2.Clear(); TextBoxCost.Clear(); }
// Private Functions // ----------------- private void SetMovieSelection(bool clear) { // set/disable next button ButtonNext.Enabled = !clear; if (clear) { PictureBoxMovie.BackgroundImage = null; TextBoxTitle.Clear(); TextBoxCategory.Clear(); TextBoxCost.Clear(); // confirm selectedMovie is null if we're clearing selectedMovie = null; Program.MovieSelection = null; } else { PictureBoxMovie.BackgroundImage = selectedMovie.Poster; TextBoxTitle.Text = selectedMovie.Title; TextBoxCategory.Text = selectedMovie.Genre; TextBoxCost.Text = "$ " + selectedMovie.Price.ToString(); Program.MovieSelection = selectedMovie; } }