예제 #1
0
 public compareView(testItem test)
 {
     if (test == null)
     {
         this.Close();
     }
     TestCompare = test;
     InitializeComponent();
     dg_Actual.Scroll += new ScrollEventHandler(dg_Actual_Scroll);
 }
예제 #2
0
파일: Form2.cs 프로젝트: JanRads/Utilities
 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();
 }
예제 #3
0
파일: Form2.cs 프로젝트: JanRads/Utilities
        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;
        }
예제 #4
0
파일: Form1.cs 프로젝트: JanRads/Utilities
        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();
        }
예제 #5
0
 public void updatedListView(object o, testItem e)
 {
     getTestsByPhase(lastNumPhase, true);
 }