Ejemplo n.º 1
0
        private void run_script_Click(object sender, EventArgs e)
        {
            // Creates and initializes a new Queue.

            TreeNodeCollection nodes = treeView1.Nodes[0].Nodes[0].Nodes;

            Queue <string> myQTest = new Queue <string>();


            foreach (TreeNode n in nodes)
            {
                if (n.Checked)
                {
                    myQTest.Enqueue(n.FullPath);
                }
            }
            if (myQTest.Count == 0)
            {
                return;
            }



            runits[0].InnerText = numericUpDown1.Value.ToString();
            docConfiguration.Save(Environment.CurrentDirectory + @"\pmsp_files\UserFiles\Configuration\DefaultConfiguration.xml");



            TestFlowRunner.RunMyTest(myQTest);
            TestFlowRunner.ResultOnTable(table_ressults);
        }
Ejemplo n.º 2
0
        private void runall_Click(object sender, EventArgs e)
        {
            //****************************** First Level ***************************************
            if (firstLevel.Checked)
            {
                if (textBox1.Text == "" || textBox1.Text == null)
                {
                    MessageBox.Show("choose image* or Uncheck in First Level");
                    return;
                }

                ImageBurnClass imageOnFire = new ImageBurnClass(textBox1.Text);


                #region Burning Image

                if (checkImage.Checked)
                {
                    //Set Machine to G3
                    textBox1.Text = openFileDialog1.FileName;
                    try
                    {
                        imageOnFire.StateToG3UsingScript();
                        Thread.Sleep(5000);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("can't G3:\n" + ex.Message);
                        return;
                    }
                    //========================================               ======================================
                    //======================================== Burning image ======================================
                    //========================================               ======================================
                    try
                    {
                        imageOnFire.BurnThatImage();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("can't burn image:\n" + ex.Message);
                        return;
                    }
                }
                #endregion

                //sleep...Waake
                Thread.Sleep(5000);
                imageOnFire.StateToAcdcUsingScript();
                Thread.Sleep(5000);

                //Driver Installer
                #region DriverInstaller
                if (checkDriver.Checked)
                {
                    MessageBox.Show(TargetAddress);

                    DriverInstallerClass.CopyInstallDriver(ip_address, TargetAddress, platform_username);
                }
                #endregion



                #region Dut general setup
                MotorAutoSetup mt = new MotorAutoSetup(dutIP.Text);
                mt.SetSettup();
                #endregion
            }


            //***********************************************************************************



            //*********************************Socend Level**************************************************


            if (twoLevel.Checked)
            {
                SaveSettings.SaveAllSettings(aNodes, errorMsg, errorMsg2, errorMsg3, provision, dutIP,
                                             platform, platformType, sku, ppolicy, platform_username, platform_userpass, me_name, me_pass);
            }


            //***********************************************************************************


            //***********************************Third Level*************************************

            // Creates and initializes a new Queue.

            if (testflow.Checked)
            {
                TreeNodeCollection nodes = treeView1.Nodes[0].Nodes[0].Nodes;

                Queue <string> myQTest = new Queue <string>();


                foreach (TreeNode n in nodes)
                {
                    if (n.Checked)
                    {
                        myQTest.Enqueue(n.FullPath);
                    }
                }
                if (myQTest.Count == 0)
                {
                    return;
                }


                //Save Iterations
                runits[0].InnerText = numericUpDown1.Value.ToString();
                docConfiguration.Save(Environment.CurrentDirectory + @"\pmsp_files\UserFiles\Configuration\DefaultConfiguration.xml");


                //Start Running Test
                TestFlowRunner.RunMyTest(myQTest);
            }



            //***********************************************************************************
        }