예제 #1
0
파일: GUI.cs 프로젝트: rudylockhart/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;
        }
예제 #2
0
파일: GUI.cs 프로젝트: 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;
        }