public MainWindowController(string productVersion, EventHandler quitHandler)
        {
            id = -1;//Add drop down for selecting a single or all devices for settings control
            disposables = new List<IDisposable>();
            controlColor = new Color16Bit(new Utility.HslColor(0, 0, 0.5).ToRgbColor());

            AttachObserver((LogMsgObserver)(LoggerHelper.GetInstance()));//attach logger
            // Create Manager instances
            connectionManager = new ConnectionManager(VID, PID);
            settingsManager = new SettingsManager();
            extensionManager = new ExtensionManager();
            preOutputProcessor = new PreOutputProcessor();
            whiteBalController = new WhiteBalanceWindowController(settingsManager);
            pollingWindowController = new PollingAreaWindowController();
            disposables.Add(pollingWindowController);
            // Attach event observers
            connectionManager.AttachObserver((ConnectionEventObserver)settingsManager);
            connectionManager.AttachObserver((ConnectionEventObserver)extensionManager);
            connectionManager.AttachObserver((ConnectionEventObserver)whiteBalController);
            connectionManager.AttachObserver((ConnectionEventObserver)pollingWindowController);
            connectionManager.AttachObserver((ConnectionEventObserver)this);
            preOutputProcessor.AttachObserver((AntumbraColorObserver)connectionManager);
            extensionManager.AttachObserver((AntumbraColorObserver)preOutputProcessor);
            settingsManager.AttachObserver((ConfigurationObserver)extensionManager);
            settingsManager.AttachObserver((ConfigurationObserver)preOutputProcessor);
            settingsManager.AttachObserver((ConfigurationObserver)this);
            pollingWindowController.PollingAreaUpdatedEvent += new PollingAreaWindowController.PollingAreaUpdated(UpdatePollingSelection);
            // Find devices
            connectionManager.UpdateDeviceConnections();
            settingsManager.UpdateBoundingBox();

            AttachObserver((GlowCommandObserver)extensionManager);
            pollingWindowController.AttachObserver((GlowCommandObserver)this);

            SystemEvents.SessionSwitch += new SessionSwitchEventHandler(SystemEvents_SessionSwitch);
            SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(PowerModeChanged);
            this.window = new MainWindow();
            this.window.closeBtn_ClickEvent += new EventHandler(closeBtnClicked);
            this.window.colorWheel_ColorChangedEvent += new EventHandler(colorWheelColorChanged);
            this.window.brightnessTrackBar_ScrollEvent += new EventHandler(brightnessValueChanged);
            this.window.hsvBtn_ClickEvent += new EventHandler(hsvBtnClicked);
            this.window.sinBtn_ClickEvent += new EventHandler(sinBtnClicked);
            this.window.neonBtn_ClickEvent += new EventHandler(neonBtnClicked);
            this.window.mirrorBtn_ClickEvent += new EventHandler(mirrorBtnClicked);
            this.window.augmentBtn_ClickEvent += new EventHandler(augmentBtnClicked);
            this.window.smoothBtn_ClickEvent += new EventHandler(smoothBtnClicked);
            this.window.gameBtn_ClickEvent += new EventHandler(gameBtnClicked);
            this.window.mainWindow_MouseDownEvent += new System.Windows.Forms.MouseEventHandler(mouseDownEvent);
            this.window.quitBtn_ClickEvent += new EventHandler(quitBtnClicked);
            this.quitEventHandler += quitHandler;
            this.window.setPollingBtn_ClickEvent += new EventHandler(setPollingBtnClickHandler);
            this.window.onOffValueChanged += new EventHandler(OnOffValueChangedHandler);
            this.window.whiteBalanceBtn_ClickEvent += new EventHandler(whiteBalanceBtnClicked);
            this.window.throttleBar_ValueChange += new EventHandler(throttleBarValueChanged);
        }
 public WhiteBalanceWindowController(SettingsManager settingsManager)
 {
     this.settingsManager = settingsManager;
     views = new Dictionary<int, WhiteBalanceWindow>();
     control = new Utility.HslColor(0, 0, .5).ToRgbColor();
 }