public CaptureForm(IAppState appState, ColorForm colorForm, ICommsPort commsPort) { _appState = appState; _colorForm = colorForm; InitializeComponent(); Icon = AppImages.GetIcon(AppImages.Capture); _commsPort = commsPort; _colorForm.HighlightColorsChanged += colorDetail_HighlightColorsChanged; _colorForm.ColorFunctionChanged += colorDetail_ColorFunctionChanged; StickyWindowsUtil.MakeStickyMDIChild(this); _addingColor = AppCursors.AddingColor; _removingColor = AppCursors.RemovingColor; }
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; }