示例#1
0
        /// <summary>
        /// Saves references to child controllers. Adds event handlers.
        /// </summary>
        /// <param name="setupController"></param>
        /// <param name="discoveryController"></param>
        /// <param name="managementController"></param>
        /// <param name="testController"></param>
        /// <param name="deviceController"></param>
        public void SetChildControllers(ConformanceTestController setupController,
                                        DiscoveryController discoveryController,
                                        ManagementController managementController,
                                        TestController testController,
                                        DeviceController deviceController)
        {
            _conformanceTestController = setupController;
            _discoveryController       = discoveryController;
            _managementController      = managementController;
            _testController            = testController;
            _deviceController          = deviceController;

            _controllers = new List <IController>();

            _controllers.AddRange(new IController[] { setupController, discoveryController, managementController, testController, deviceController });

            _testController.TestSuiteStarted   += _testController_TestSuiteStarted;
            _testController.TestSuiteCompleted += _testController_TestSuiteCompleted;
            _testController.TestsCleared       += _testController_TestsCleared;
            _testController.SettingPagesLoaded += _testController_SettingPagesLoaded;

            _managementController.ProfileApplied     += _managementController_ProfileApplied;
            _managementController.OperationStarted   += _managementController_OnOperationStarted;
            _managementController.OperationCompleted += _managementController_OnOperationCompleted;

            _managementController.SettingsLoaded += new System.EventHandler(_managementController_SettingsLoaded);

            _discoveryController.DiscoveryStarted   += _discoveryController_DiscoveryStarted;
            _discoveryController.DiscoveryCompleted += _discoveryController_DiscoveryCompleted;

            _conformanceTestController.OperationStarted   += _deviceController_OperationStarted;
            _conformanceTestController.OperationCompleted += _deviceController_OperationCompleted;

            _discoveryController.OperationStarted   += _deviceController_OperationStarted;
            _discoveryController.OperationCompleted += _deviceController_OperationCompleted;

            _deviceController.OperationStarted   += _deviceController_OperationStarted;
            _deviceController.OperationCompleted += _deviceController_OperationCompleted;

            _conformanceTestController.TestsRunRequested += _testController.RunConformance;
            _conformanceTestController.HaltRequested     += _testController.Halt;
            _conformanceTestController.ExitRequested     += _testController.Exit;
            _conformanceTestController.SettingsMissing   += _conformanceTestController_SettingsMissing;

            _testController.TestStarted        += _conformanceTestController.TestStarted;
            _testController.TestCompleted      += _conformanceTestController.TestCompleted;
            _testController.TestSuiteCompleted += _conformanceTestController.TestSuiteCompleted;
            _testController.ConformanceInitializationCompleted += _conformanceTestController.InitializationCompleted;
            _testController.DeviceInfoReceived += _testController_DeviceInfoReceived;

            _testController.NetworkSettingsChangedEvent += _discoveryController_NetworkSettingsChanged;
            _testController.SecurityChangedEvent        += DiscoveryControllerSecurityChangedEvent;
        }
示例#2
0
        /// <summary>
        /// Saves references to child controllers. Adds event handlers.
        /// </summary>
        /// <param name="setupController"></param>
        /// <param name="discoveryController"></param>
        /// <param name="managementController"></param>
        /// <param name="testController"></param>
        /// <param name="deviceController"></param>
        public void SetChildControllers(ConformanceTestController setupController,
                                        DiscoveryController discoveryController,
                                        ManagementController managementController,
                                        TestController testController,
                                        DeviceController deviceController)
        {
            _conformanceTestController = setupController;
            _discoveryController       = discoveryController;
            _managementController      = managementController;
            _testController            = testController;
            _deviceController          = deviceController;

            _controllers = new List <IController>();

            _controllers.AddRange(new IController[] { setupController, discoveryController, managementController, testController, /*reportController, */ deviceController /*, requestsController*/ });

            _testController.TestSuiteStarted   += _testController_TestSuiteStarted;
            _testController.TestSuiteCompleted += _testController_TestSuiteCompleted;
            _testController.TestsCleared       += _testController_TestsCleared;
            _testController.SettingPagesLoaded += _testController_SettingPagesLoaded;

            _managementController.ProfileApplied     += _managementController_ProfileApplied;
            _managementController.OperationStarted   += _managementController_OnOperationStarted;
            _managementController.OperationCompleted += _managementController_OnOperationCompleted;

            _discoveryController.DiscoveryStarted   += _discoveryController_DiscoveryStarted;
            _discoveryController.DiscoveryCompleted += _discoveryController_DiscoveryCompleted;

            _conformanceTestController.OperationStarted   += _deviceController_OperationStarted;
            _conformanceTestController.OperationCompleted += _deviceController_OperationCompleted;

            _discoveryController.OperationStarted   += _deviceController_OperationStarted;
            _discoveryController.OperationCompleted += _deviceController_OperationCompleted;

            _deviceController.OperationStarted   += _deviceController_OperationStarted;
            _deviceController.OperationCompleted += _deviceController_OperationCompleted;

            _conformanceTestController.TestsRunRequested += _testController.RunConformance;
            _conformanceTestController.HaltRequested     += _testController.Halt;
            _conformanceTestController.ExitRequested     += _testController.Exit;

            _testController.TestStarted        += _conformanceTestController.TestStarted;
            _testController.TestCompleted      += _conformanceTestController.TestCompleted;
            _testController.TestSuiteCompleted += _conformanceTestController.TestSuiteCompleted;
            _testController.ConformanceInitializationCompleted += _conformanceTestController.InitializationCompleted;
            _testController.DeviceInfoReceived += _testController_DeviceInfoReceived;
        }
示例#3
0
        /// <summary>
        /// Saves references to child controllers. Adds event handlers.
        /// </summary>
        /// <param name="setupController"></param>
        /// <param name="discoveryController"></param>
        /// <param name="managementController"></param>
        /// <param name="testController"></param>
        /// <param name="reportController"></param>
        /// <param name="deviceController"></param>
        /// <param name="requestsController"></param>
        public void SetChildControllers(SetupController setupController,
                                        DiscoveryController discoveryController,
                                        ManagementController managementController,
                                        TestController testController,
                                        ReportController reportController,
                                        DeviceController deviceController,
                                        RequestsController requestsController)
        {
            _setupController      = setupController;
            _discoveryController  = discoveryController;
            _managementController = managementController;
            _testController       = testController;
            _reportController     = reportController;
            _deviceController     = deviceController;
            _requestsController   = requestsController;

            _controllers = new List <IController>();

            _controllers.AddRange(new IController[] { setupController, discoveryController, managementController, testController, reportController, deviceController, requestsController });

            _testController.TestSuiteStarted   += _testController_TestSuiteStarted;
            _testController.TestSuiteCompleted += _testController_TestSuiteCompleted;
            _testController.TestEvent          += _testController_TestEvent;
            _testController.TestsCleared       += _testController_TestsCleared;

            _managementController.ProfileApplied      += _managementController_ProfileApplied;
            _managementController.FeaturesApplied     += _managementController_FeaturesApplied;
            _managementController.OnCertificationMode += _managementController_OnCertificationMode;
            _managementController.OperationStarted    += _managementController_OnOperationStarted;
            _managementController.OperationCompleted  += _managementController_OnOperationCompleted;

            _discoveryController.DiscoveryStarted   += _discoveryController_DiscoveryStarted;
            _discoveryController.DiscoveryCompleted += _discoveryController_DiscoveryCompleted;

            _setupController.OperationStarted   += _deviceController_OperationStarted;
            _setupController.OperationCompleted += _deviceController_OperationCompleted;

            _discoveryController.OperationStarted   += _deviceController_OperationStarted;
            _discoveryController.OperationCompleted += _deviceController_OperationCompleted;

            _deviceController.OperationStarted   += _deviceController_OperationStarted;
            _deviceController.OperationCompleted += _deviceController_OperationCompleted;

            _requestsController.OperationStarted   += _deviceController_OperationStarted;
            _requestsController.OperationCompleted += _deviceController_OperationCompleted;
        }