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); } }
private void BtRNCheck_Click(object sender, EventArgs e) { string report = FileScUtils.RNReport(subfolders); if (report != "") { ShowBigMessageForm sbmf = new ShowBigMessageForm(report); sbmf.ShowDialog(); } }
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)); } }
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); }
private void BtCheckFp_Click(object sender, EventArgs e) { FileScUtils.CheckFP(folder); }