Example #1
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)        //переименовывание СФа
        {
            string nameSF;
            int    i = listBox1.SelectedIndex;

            nameSF = Interaction.InputBox("Хотите дать название смысловому фрагменту? Введите название и нажмите ОК.", "", Convert.ToString(listBox1.Items[i]));
            if (nameSF == "")
            {
                nameSF = Convert.ToString(listBox1.Items[i]);
            }
            string A = comboBox1.Text; //хотелось бы убрать по возможности
            //A = "Иван"; // Потом убрать, это времянка!!!!
            string p1 = "";

            if (label1.Text == "1")
            {
                Sergey.Serg(out p1);
            }
            else if (label1.Text == "0")
            {
                Sergey.Ukr(out p1);
            }
            Vlad.pereimSF(listBox1, p1 + "/The table of semantic fragments/" + A + ".txt", nameSF);
            Intron = IvanLibrary.GiveMeBlockStructureWithRemainElements.StartWorking(p1 + "/Text documents/" + A + ".txt", p1 + "/The table of semantic fragments/" + A + ".txt", textBox1); // потом добавить 0 в конец из-за изменений вани. Надо доработать координату фокуса при переименовывании
            Vlad.b1(listBox1, p1 + "/The table of semantic fragments/" + A + ".txt");
            Vlad.focusirovka(i, textBox1, Intron);
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string A  = comboBox1.Text;
            string p1 = "";

            //A = "Иван"; // Потом убрать, это времянка!!!!
            if (label1.Text == "1")
            {
                Sergey.Serg(out p1);
            }
            else if (label1.Text == "0")
            {
                Sergey.Ukr(out p1);
            }
            //p1 = "E://Иван/Рабочий стол/Primer";
            if (IvanLibrary.CreateSemanticFile.SelectedTextIntoIndexForSemanticFragmentTable(textBox1, p1 + "/The table of semantic fragments/" + A + ".txt", Intron))
            {
                Intron = IvanLibrary.GiveMeBlockStructureWithRemainElements.StartWorking(p1 + "/Text documents/" + A + ".txt", p1 + "/The table of semantic fragments/" + A + ".txt", textBox1);
                Vlad.focusirovka(IvanLibrary.FocusAfterCreateSemanticFile.FindNewElementofSFT(p1 + "/The table of semantic fragments/" + A + ".txt"), textBox1, Intron);
            }
            Vlad.b1(listBox1, p1 + "/The table of semantic fragments/" + A + ".txt");
        }
Example #3
0
        private void удалитьToolStripMenuItem_Click(object sender, EventArgs e) //удаление СФа
        {
            string A = comboBox1.Text;                                          //хотелось бы убрать по возможности
            // A = "Иван"; // Потом убрать, это времянка!!!!
            string p1 = "";

            if (label1.Text == "1")
            {
                Sergey.Serg(out p1);
            }
            else if (label1.Text == "0")
            {
                Sergey.Ukr(out p1);
            }
            int i = listBox1.SelectedIndex;

            i = Intron[i * 2, 1] - (Intron[i * 2, 1] - Intron[i * 2, 0]) + 1;
            Vlad.delSF(listBox1, p1 + "/The table of semantic fragments/" + A + ".txt");
            Intron = IvanLibrary.GiveMeBlockStructureWithRemainElements.StartWorking(p1 + "/Text documents/" + A + ".txt", p1 + "/The table of semantic fragments/" + A + ".txt", textBox1); // потом добавить 0 в конец из-за изменений вани. Надо доработать координату фокуса при удалении
            Vlad.b1(listBox1, p1 + "/The table of semantic fragments/" + A + ".txt");
            textBox1.Select(i, 0);
            textBox1.ScrollToCaret();
        }