Esempio n. 1
0
        private void openFileToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            //TODO: temporary
            Config.InitialPath               = @"C:\Users\mtr\Source\Repos\GardanZero\HS_VNFrame_ScriptHelper\HS_VNFrame_ScriptHelper\Scripts\";
            openFileDialog1.Filter           = "Python Files | *.py";
            openFileDialog1.InitialDirectory = Config.InitialPath;
            DialogResult dialogResult = openFileDialog1.ShowDialog();

            // this is the selected file

            LastOpenedFileName = openFileDialog1.FileName;
            StructureLoader    = new StructureLoader(LastOpenedFileName, this);
            StructureLoader.LoadStructure();
        }
Esempio n. 2
0
        private void applyButton_Click(object sender, EventArgs e)
        {
            // write current text and speaker in dictionary to the node number
            //string newText = StructureLoader.DetailsDictionary[StructureLoader.LastNodeNumber].Replace("\"" + StructureLoader.LastNodeText + "\"", "\"" + textTB.Text + "\"").Replace("\"" + StructureLoader.LastNodeSpeaker + "\"", "\"" + speakerTB.Text + "\"");
            string newText = RawViewTB.Text;

            StructureLoader.DetailsDictionary[StructureLoader.LastNodeNumber] = newText;

            // update the treeview
            if (StructureLoader.LastNode != null)
            {
                // TODO: sometimes this is null, not sure what the implication is...
                StructureLoader.LastNode.Text = newText.Substring(0, 50);
            }

            StructureLoader.CreateTreeViewFromDictionary(StructureLoader.DetailsDictionary);


            applyButton.Enabled = false;
        }