/// <summary> /// Радиокнопки отображения доп. записей о пациенте /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void RadioButtonAdditions_Click(object sender, EventArgs e) { var rb = sender as RadioButton; var name = rb.Name.Substring(12, 1); switch (name) { case "N": if (_userControl != null) { this.Height -= _userControl.Height; _panelAdditions.Controls.Remove(_userControl); _userControl = null; } break; case "H": _userControl = await _viewModel.GetUcViewAsync("Ho"); ShowUcView(); break; case "E": _userControl = await _viewModel.GetUcViewAsync("Ex"); ShowUcView(); break; case "O": _userControl = await _viewModel.GetUcViewAsync("Ob"); ShowUcView(); break; default: throw new Exception("Ошибка в определении радиокнопки"); } }