Esempio n. 1
0
        private void BtCreateFileSc_Click(object sender, EventArgs e)
        {
            ApplyFilter();
            bool quit = false;

            string scfilesNotExistsMessage;

            string[] texts = FileScUtils.GetTextsFromPatches(subfolders, out scfilesNotExistsMessage);

            if (scfilesNotExistsMessage != "")
            {
                quit = MessageBox.Show("Отсутствуют файлы сценария в папках:" + Environment.NewLine + scfilesNotExistsMessage + Environment.NewLine + "Продолжить?",
                                       "Предупреждение", MessageBoxButtons.YesNo) == DialogResult.Yes ? false : true;
            }

            string dbxmlFilesNotExistsMessage;
            string linesNotExistsMessage;

            if (!quit)
            {
                FileScUtils.GetFileScFromScs(folder, subfolders, texts, out dbxmlFilesNotExistsMessage, out linesNotExistsMessage, ref quit);
            }

            if (!quit)
            {
                FileScUtils.SaveFileSc(folder, texts);
            }
        }
Esempio n. 2
0
        private void BtRNCheck_Click(object sender, EventArgs e)
        {
            string report = FileScUtils.RNReport(subfolders);

            if (report != "")
            {
                ShowBigMessageForm sbmf = new ShowBigMessageForm(report);
                sbmf.ShowDialog();
            }
        }
Esempio n. 3
0
        private void ApplyFilter()
        {
            //фильтр патчей по условию с чекбоксами
            if (CbPatchFrom.Checked)
            {
                subfolders = Array.FindAll(subfolders, (x => FileScUtils.GetPatchOrderNumber(new DirectoryInfo(x).Name) >= (int)NudPatchFrom.Value));
            }

            if (CbPatchTo.Checked)
            {
                subfolders = Array.FindAll(subfolders, (x => FileScUtils.GetPatchOrderNumber(new DirectoryInfo(x).Name) <= (int)NudPatchTo.Value));
            }
        }
Esempio n. 4
0
        private void BtCreateFileScFromFiles_Click(object sender, EventArgs e)
        {
            ApplyFilter();
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.DefaultExt       = "txt";
            sfd.Filter           = "Текстовый файл|*.txt";
            sfd.FileName         = "file_sc";
            sfd.InitialDirectory = folder;
            string[] prefixes = { "ORA", "IPC", "STWF" };

            string[] texts;
            FileScUtils.GetFileScFromFiles(folder, subfolders, out texts);
            FileScUtils.SaveFileSc(folder, texts);
        }
Esempio n. 5
0
 private void BtCheckFp_Click(object sender, EventArgs e)
 {
     FileScUtils.CheckFP(folder);
 }