Esempio n. 1
0
        private void englFoobjmsgToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TxtFoobj txtFj = new TxtFoobj("engl", NewItemPidPath.Text);

            txtFj.SetNewText();
            txtFj.writeFile();
        }
Esempio n. 2
0
        private void label6_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            TxtFoobj txtFj = new TxtFoobj("engl", NewItemPidPath.Text);

            txtFj.SetNewText();
            for (int i = 0; i < txtFj.file.arrayListOfStrings.Length; i++)
            {
                listBox1.Items.Add(txtFj.file.arrayListOfStrings[i]);
            }
        }
Esempio n. 3
0
        bool checkedTextFile(string Language)
        {
            List <int> num = new List <int>();

            listBox1.Items.Add("---------------------------------------");
            listBox1.Items.Add("Проверка дублей номеров строк " + Language + "/FOOBJ.MSG");
            listBox1.Items.Add("");
            bool     result   = true;
            TxtFoobj txtFoobj = new TxtFoobj(Language, NewItemPidPath.Text);

            for (int i = 0; i < txtFoobj.file.arrayListOfStrings.Length; i++)
            {
                if (txtFoobj.file.arrayListOfStrings[i].Length < 1)
                {
                    continue;
                }

                if (txtFoobj.file.arrayListOfStrings[i][0] != '{')
                {
                    continue;
                }

                for (int j = 0; j < txtFoobj.arrayOldPidNumbers.Length; j++)
                {
                    if (txtFoobj.file.arrayListOfStrings[j].Length < 1)
                    {
                        continue;
                    }

                    if (txtFoobj.file.arrayListOfStrings[j][0] != '{')
                    {
                        continue;
                    }

                    if (txtFoobj.getNum(txtFoobj.file.arrayListOfStrings[j]) == txtFoobj.getNum(txtFoobj.file.arrayListOfStrings[i]) && i != j)
                    {
                        if (num.Contains(j))
                        {
                            continue;
                        }

                        result = false;
                        num.Add(j);
                        num.Add(i);
                        listBox1.Items.Add("Внимание! Совпадение номеров строк:");
                        listBox1.Items.Add(txtFoobj.file.arrayListOfStrings[j]);
                        listBox1.Items.Add(txtFoobj.file.arrayListOfStrings[i]);
                        listBox1.Items.Add("");
                    }
                }
            }
            return(result);
        }