Пример #1
0
        public MainForm(string param)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Setup report geneator
            reportGenerator = new ReportGenerator(this);

            // Setup AppLogger and testTree objects
            appLog = new AppLogger(listBoxAppLog);
            testTree = new TestTree(treeViewXML);
            tester = new Tester(this, testTree, listViewThreads, testDataList);
            testStartTime = new DateTime(DateTime.Now.Ticks);
            statusBarPanelTimer.Text = "00:00:00:000";

            if (param.Length > 3)
            {
                XMLLoad loader = new XMLLoad(appLog, testTree);
                loader.LoadTestXML(param);

                menuItemActionsRunSingle.Enabled = true;

                EnableTreeNodeControlItems(true);
                treeViewXML.Select();
            }
        }
Пример #2
0
        private void LoadXML(bool bImport)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                if (bImport == false)
                {
                    //listViewThreads.Clear();
                    TreeNode node;
                    while ((node = testTree.GetSelectedNodesParent()) != null)
                        node.Remove();
                }
                appLog.Reset();
                XMLLoad loader = new XMLLoad(appLog, testTree);
                loader.LoadTestXML(openFileDialog.FileName.ToString());
                //menuItemActionsRunall.Enabled = true;
                menuItemActionsRunSingle.Enabled = true;

                EnableTreeNodeControlItems(true);
                treeViewXML.Select();
            }
        }