private void ImportAllChannelsSettingsFormHandler()
        {
            if (importAllChannelsSettingsFormHandlerProcessing)
            {
                return;
            }
            importAllChannelsSettingsFormHandlerProcessing = true;

            AnyControlTester gridTester = new AnyControlTester("grid", "SettingsForm");

            SourceGrid.Grid grid = (SourceGrid.Grid)gridTester.Control;

            ButtonTester addButton    = new ButtonTester("addButton", "SettingsForm");
            ButtonTester removeButton = new ButtonTester("removeButton", "SettingsForm");
            ButtonTester okButton     = new ButtonTester("okButton", "SettingsForm");

            Assert.AreEqual(1, grid.RowsCount);             //Header row only
            int row_count = grid.RowsCount;

            ExpectModal("ImportOPCForm", "ImportAllChannelsImportFormHandler");

            addButton.Click();

            Assert.Greater(grid.RowsCount, row_count);
            row_count = grid.RowsCount;

            removeButton.Click();

            Assert.AreEqual(row_count - 1, grid.RowsCount);           //Remove one row

            okButton.Click();

            importAllChannelsSettingsFormHandlerProcessing = false;
        }
        private void ImportAllChannelsImportFormHandler()
        {
            ButtonTester okButton      = new ButtonTester("okButton", "ImportOPCForm");
            ButtonTester connectButton = new ButtonTester("connectButton", "ImportOPCForm");
            ButtonTester cancelButton  = new ButtonTester("cancelButton", "ImportOPCForm");

            AnyControlTester serversComboBoxTester = new AnyControlTester("serversComboBox", "ImportOPCForm");
            ComboBox         serversComboBox       = (ComboBox)serversComboBoxTester.Control;

            AnyControlTester channelsTreeTester = new AnyControlTester("channelsTree", "ImportOPCForm");
            TreeView         channelsTree       = (TreeView)channelsTreeTester.Control;

            serversComboBox.Text = "ICONICS.SimulatorOPCDA.2";
            connectButton.Click();

            Assert.IsNotEmpty(channelsTree.Nodes);

            foreach (TreeNode n in channelsTree.Nodes)
            {
                SetNodeCheck(n, true);
            }

            okButton.Click();
        }