/// <summary> /// Поместить строку в указанный объект /// </summary> /// <param name="objectName">Название объекта, куда класть текст</param> /// <param name="str">Текст, который надо положить в объект</param> public void PutStringToObject(string objectName, string str) { switch (objectName) { case "comboBoxOrderly": comboBoxOrderly.Text = str; break; case "comboBoxScrubNurse": comboBoxScrubNurse.Text = str; break; case "textBoxSurgeons": if (!string.IsNullOrEmpty(textBoxSurgeons.Text)) { if (!textBoxSurgeons.Text.EndsWith("\r\n")) { textBoxSurgeons.Text += "\r\n"; } textBoxSurgeons.Text += str; } else { textBoxSurgeons.Text = str; } textBoxSurgeons.Text = CConvertEngine.RemoveDuplicates(textBoxSurgeons.Text); break; case "textBoxAssistents": if (!string.IsNullOrEmpty(textBoxAssistents.Text)) { if (!textBoxAssistents.Text.EndsWith("\r\n")) { textBoxAssistents.Text += "\r\n"; } textBoxAssistents.Text += str; } else { textBoxAssistents.Text = str; } textBoxAssistents.Text = CConvertEngine.RemoveDuplicates(textBoxAssistents.Text); break; case "textBoxOperationTypes": textBoxOperationTypes.Text = str; break; } }