public compareView(testItem test) { if (test == null) { this.Close(); } TestCompare = test; InitializeComponent(); dg_Actual.Scroll += new ScrollEventHandler(dg_Actual_Scroll); }
private void Form2_Load(object sender, EventArgs e) { t = new testItem(); updatecbxPhases(); selectPhase("Phase " + (currectPhaseIndex + 1)); tags = Properties.Settings.Default.tags.Split(',').OrderBy(x => x).ToArray(); types = Properties.Settings.Default.types.Split(',').OrderBy(x => x).ToArray(); cbxTag.Items.AddRange(tags); cbxType.Items.AddRange(types); updateTestCbx(); }
private void cbxTests_SelectedIndexChanged(object sender, EventArgs e) { groupBox1.Text = "Edit Test:"; string testID = cbxTests.SelectedItem.ToString().Split(' ')[0]; t = tests.First(x => x.id == testID); testNameText.Text = t.testName; cbxTag.SelectedText = t.tag; scriptActualText.Text = t.script_Actual; scriptExpectedText.Text = t.script_Expected; cbxType.Text = t.type; }
private void newRegTestCSV(List <int> PhasesForRun) { saveChanges(cmxPhases.SelectedIndex + 1); int id = 1; foreach (var item in P2.phaseItems) { var res = PhasesForRun.Exists(x => x == id); if (res) { List <string> rowsTest = new List <string>(); rowsTest.Add("Test_Name, Tag,Script_Actual,Script_Expected,Name_Actual,Name_Expected,Type"); var Rows = P2.phaseItems[id - 1].Items.Where(x => x.Exec == true).ToArray(); foreach (var row in Rows) { if (It.Exists(x => x.id == row.Item)) { testItem testX = It.First(x => x.id == row.Item); rowsTest.Add(testX.testName + "," + testX.tag + "," + testX.script_Actual + "," + testX.script_Expected + "," + testX.name_Actual + "," + testX.name_Expected + "," + testX.type); } } TextWriter tw = new StreamWriter(strPathPHA + @"TestFiles\Phase" + id.ToString() + ".csv"); foreach (var line in rowsTest) { tw.WriteLine(line); } tw.Close(); } id++; } GC.Collect(); }
public void updatedListView(object o, testItem e) { getTestsByPhase(lastNumPhase, true); }