Esempio n. 1
0
        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;
        }
Esempio n. 2
0
File: GUI.cs Progetto: VicBoss/KR
        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;
        }