Пример #1
0
        private void buttonLoadApps_Click(object sender, EventArgs e)
        {
            ini12.INIWrite(MonkeyTestPath, "Monket Test", "Package", "");

            Add_ons MonkeyTest = new Add_ons();

            MonkeyTest.MonkeyTest();

            string ReadLine;

            string[] array;
            string   Path = Application.StartupPath + "\\app.txt";

            //string Path = "D:\\app.txt";

            this.comboxQcProName.Items.Clear();
            StreamReader reader = new StreamReader(Path, System.Text.Encoding.GetEncoding("GB2312"));

            while (reader.Peek() >= 0)
            {
                try
                {
                    ReadLine = reader.ReadLine();
                    if (ReadLine != "")
                    {
                        ReadLine = ReadLine.Replace("\"", "").Substring(8);
                        array    = ReadLine.Split(',');
                        if (array.Length == 0)
                        {
                            MessageBox.Show("您选择的导入数据类型有误,请重试!");
                            return;
                        }
                        this.comboxQcProName.Items.Add(array[0]);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
                comboxQcProName.Text = "Select App";
            }

            SavedLabel.Text = "";
        }
Пример #2
0
        private void buttonRunAll_Click(object sender, EventArgs e)
        {
            Add_ons MonkeyTest_All = new Add_ons();

            MonkeyTest_All.MonkeyTest();
        }