public MainWindow(IAppState appState, ISettings settings, IConfigCommsPort commsPort, ICommsPortFactory commsPortFactory) : this() { this.appState = appState; this.settings = settings; this.commsPort = commsPort; this.commsPortFactory = commsPortFactory; this.appState.StateChanged += AppState_StateChanged; this.appState.State = NXTCamView.Core.State.NotConnected; }
public ColorForm(IAppState appState, IColorTarget colorTarget, IConfigCommsPort commsPort) { _appState = appState; _commsPort = commsPort; _colorTarget = colorTarget; InitializeComponent(); Icon = AppImages.GetIcon(AppImages.Colors); setupColorFunction(); setupToolbar(); initErrorImage(); _appState.StateChanged += appStateChanged; StickyWindowsUtil.MakeStickyMDIChild(this); }
public TrackingForm(IAppState appState, IConfigCommsPort commsPort) { _appState = appState; InitializeComponent(); Icon = AppImages.GetIcon(AppImages.Tracking); cbtnStart.Command = new StartTrackingCommand(_appState, this); cbtnStop.Command = new StopTrackingCommand(_appState, this); cbtnPause.Command = new TogglePauseTrackingCommand(_appState, this); cbtnPause.ExecutionType = ExecutionType.OnDownUpToggle; _appState.StateChanged += appStateStateChanged; pnlTrackedColors.MyPaint += pnlTrackedColors_Paint; _trackingCmd = new TrackingCommand(_appState, commsPort, objectsDetected); SetupColors(); StickyWindowsUtil.MakeStickyMDIChild(this); }
public MainForm(IAppState appState, IUpdater updater, ColorForm colorForm, TrackingForm trackingForm, IConfigCommsPort commsPort, ICommsPortFactory commsPortFactory) { _appState = appState; _commsPort = commsPort; _commsPortFactory = commsPortFactory; _updater = updater; _colorForm = colorForm; _trackingForm = trackingForm; Thread.CurrentThread.Name = "GuiThread"; Icon = AppImages.GetIcon(AppImages.MainForm); InitializeComponent(); StickyWindowsUtil.MakeSticky(this); StickyWindow.Active = Settings.Default.SnapWindows; tsmSnapWindows.Checked = StickyWindow.Active; _appState.StateChanged += appStateChanged; _appState.State = State.NotConnected; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.ThreadException += Application_ThreadException; }