private void addPCPhraseMiClicked(Object sender, EventArgs e) { if (!(treeListView.SelectedObject != null && treeListView.SelectedObject is DialogNode)) { showError("Please select some NPC phrase.", "Error"); return; } DialogNode selectedNode = (DialogNode)treeListView.SelectedObject; DialogResponse pcResponse = new DialogResponse("", "", false); Form addPCPhraseForm = new AddPCPhrase(ref pcResponse); addPCPhraseForm.ShowDialog(this); if (pcResponse.response.Equals("")) { return; } selectedNode.addResponse(pcResponse); treeListView.RefreshObject(selectedNode); treeListView.Expand(selectedNode); if (!changesMade) { this.Text = this.Text + "*"; } changesMade = true; }
private void addPCPhraseMiClicked(Object sender, EventArgs e) { if (!(treeListView.SelectedObject != null && treeListView.SelectedObject is DialogNode)) { showError("Please select some NPC phrase.", "Error"); return; } DialogNode selectedNode = (DialogNode)treeListView.SelectedObject; DialogResponse pcResponse = new DialogResponse("", "", false); Form addPCPhraseForm = new AddPCPhrase(ref pcResponse); addPCPhraseForm.ShowDialog(this); if (pcResponse.response.Equals("")) return; selectedNode.addResponse(pcResponse); treeListView.RefreshObject(selectedNode); treeListView.Expand(selectedNode); if (!changesMade) this.Text = this.Text + "*"; changesMade = true; }