private void newMiClicked(Object sender, EventArgs e) { DialogResult result; if (changesMade) { result = discardChangesDialog(); if (result == DialogResult.No) { saveMiClicked(new object(), new EventArgs()); } else if (result == DialogResult.Cancel) { return; } } Conversation newCon = new Conversation(""); DialogProperties dp = new DialogProperties(ref newCon); dp.Text = "New Dialog"; result = dp.ShowDialog(this); if (result == DialogResult.Cancel) { return; } conversation = newCon; treeListView.ClearObjects(); NpcIdGenerator = new IdGenerator(); fileName = ""; this.Text = "Dialog Manager - " + conversation.npcName; changesMade = false; }
private void propertiesMenuItem_Click(object sender, EventArgs e) { DialogProperties prop = new DialogProperties(ref conversation); DialogResult result = prop.ShowDialog(this); if (result == DialogResult.Cancel) { return; } this.Text = "Dialog Editor - " + conversation.npcName + "*"; changesMade = true; }
private void propertiesMenuItem_Click(object sender, EventArgs e) { DialogProperties prop = new DialogProperties(ref conversation); DialogResult result = prop.ShowDialog(this); if (result == DialogResult.Cancel) return; this.Text = "Dialog Editor - " + conversation.npcName + "*"; changesMade = true; }
private void newMiClicked(Object sender, EventArgs e) { DialogResult result; if (changesMade) { result = discardChangesDialog(); if (result == DialogResult.No) { saveMiClicked(new object(), new EventArgs()); } else if (result == DialogResult.Cancel) return; } Conversation newCon = new Conversation(""); DialogProperties dp = new DialogProperties(ref newCon); dp.Text = "New Dialog"; result = dp.ShowDialog(this); if (result == DialogResult.Cancel) return; conversation = newCon; treeListView.ClearObjects(); NpcIdGenerator = new IdGenerator(); fileName = ""; this.Text = "Dialog Manager - " + conversation.npcName; changesMade = false; }