private void putCashButton_Click(object sender, EventArgs e) { var putCashForm = new PutCashForm(_cashMachine); if (putCashForm.ShowDialog(this) != DialogResult.OK) { return; } sumTextBox.Text = _cashMachine.TotalCountOfMoney.ToString(); }