private void menuItemClientProcessAdd_Click(object sender, EventArgs e) { if (this._selectedNode != null) { if (this._selectedNode.Nodes.Count > 0) { Utility.ShowErrorMessage(LocalizeText.Get(381)); return; } TwoStringInputForm twoStringInputForm = new TwoStringInputForm(LocalizeText.Get(382), LocalizeText.Get(383), LocalizeText.Get(384), LocalizeText.Get(385)); if (twoStringInputForm.ShowDialog() != DialogResult.OK) { return; } WorkGroupCondition condition = new WorkGroupCondition(twoStringInputForm.Value1, twoStringInputForm.Value2); try { ((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).AddCondition(condition); this.IncreaseConditionCountWorkGroup(condition); this._modified = true; this.TreeViewWorkGroup_AfterSelect(sender, new TreeViewEventArgs(this._selectedNode)); } catch (ArgumentException) { Utility.ShowErrorMessage(LocalizeText.Get(386)); } } }
private void listViewProperty_DoubleClick(object sender, EventArgs e) { if (!this._editable) { return; } if (this.listViewProperty.SelectedItems.Count > 0) { ListViewItem listViewItem = this.listViewProperty.SelectedItems[0]; TwoStringInputForm twoStringInputForm = new TwoStringInputForm("프로세스 속성 편집", this.IsStaticProperty(listViewItem) ? "프로세스 속성을 입력하세요." : "동적 속성은 편집할 수 없습니다.", "Key", "Value", listViewItem.SubItems[0].Text, listViewItem.SubItems[1].Text); while (twoStringInputForm.ShowDialog() == DialogResult.OK) { try { if (this.IsStaticProperty(listViewItem)) { this.CheckProperty(twoStringInputForm.Value1, listViewItem.Index); listViewItem.SubItems[0].Text = twoStringInputForm.Value1; listViewItem.SubItems[1].Text = twoStringInputForm.Value2; } break; } catch (Exception ex) { Utility.ShowErrorMessage(LocalizeText.Get(313) + ex.Message); } } } }
private void ListViewPerformanceDescription_DoubleClick(object sender, EventArgs e) { if (!this._editable) { return; } if (this.listViewPerformanceDescription.SelectedItems.Count > 0) { ListViewItem listViewItem = this.listViewPerformanceDescription.SelectedItems[0]; TwoStringInputForm twoStringInputForm = new TwoStringInputForm(LocalizeText.Get(309), LocalizeText.Get(310), LocalizeText.Get(311), LocalizeText.Get(312), listViewItem.SubItems[0].Text, listViewItem.SubItems[1].Text); while (twoStringInputForm.ShowDialog() == DialogResult.OK) { try { new RCProcess.PerformanceDescriptionParser(twoStringInputForm.Value1, twoStringInputForm.Value2); listViewItem.SubItems[0].Text = twoStringInputForm.Value1; listViewItem.SubItems[1].Text = twoStringInputForm.Value2; break; } catch (Exception ex) { Utility.ShowErrorMessage(LocalizeText.Get(313) + ex.Message); } } } }
private void buttonPropertyAdd_Click(object sender, EventArgs e) { TwoStringInputForm twoStringInputForm = new TwoStringInputForm("프로세스 속성 추가", "프로세스 속성을 입력하세요", "Key", "Value"); while (twoStringInputForm.ShowDialog() == DialogResult.OK) { try { this.CheckProperty(twoStringInputForm.Value1, -1); this.listViewProperty.Items.Add(new ListViewItem(new string[] { twoStringInputForm.Value1, twoStringInputForm.Value2 })); this.listViewProperty.EnsureVisible(this.listViewProperty.Items.Count - 1); break; } catch (Exception ex) { Utility.ShowErrorMessage("속성을 추가할 수 없습니다. 원본 메세지: " + ex.Message); } } }
private void buttonPerformanceDescAdd_Click(object sender, EventArgs e) { TwoStringInputForm twoStringInputForm = new TwoStringInputForm(LocalizeText.Get(304), LocalizeText.Get(305), LocalizeText.Get(306), LocalizeText.Get(307)); while (twoStringInputForm.ShowDialog() == DialogResult.OK) { try { new RCProcess.PerformanceDescriptionParser(twoStringInputForm.Value1, twoStringInputForm.Value2); this.listViewPerformanceDescription.Items.Add(new ListViewItem(new string[] { twoStringInputForm.Value1, twoStringInputForm.Value2 })); this.listViewPerformanceDescription.EnsureVisible(this.listViewPerformanceDescription.Items.Count - 1); break; } catch (Exception ex) { Utility.ShowErrorMessage(LocalizeText.Get(308) + ex.Message); } } }
private void buttonPropertyAdd_Click(object sender, EventArgs e) { TwoStringInputForm twoStringInputForm = new TwoStringInputForm("Add process attribute", "Enter process properties", "Key", "Value"); while (twoStringInputForm.ShowDialog() == DialogResult.OK) { try { this.CheckProperty(twoStringInputForm.Value1, -1); this.listViewProperty.Items.Add(new ListViewItem(new string[] { twoStringInputForm.Value1, twoStringInputForm.Value2 })); this.listViewProperty.EnsureVisible(this.listViewProperty.Items.Count - 1); break; } catch (Exception ex) { Utility.ShowErrorMessage("Cannot add attribute. Original message: " + ex.Message); } } }