public VideoFrameInteractionController(frmMain mainForm, VideoRenderingController videoRenderingController) { m_VideoRenderingController = videoRenderingController; m_MainForm = mainForm; m_MainForm.picVideoFrame.MouseDown +=picVideoFrame_MouseClick; TrackingContext.Current.Reset(); }
public frmMain() { InitializeComponent(); statusStrip.SizingGrip = false; m_StateManager = new CameraStateManager(); m_StateManager.CameraDisconnected(); m_ObservatoryController = new ObservatoryController(); m_ObservatoryController.TelescopeConnectionChanged += TelescopeConnectionChanged; m_ObservatoryController.FocuserConnectionChanged += FocuserConnectionChanged; m_ObservatoryController.VideoConnectionChanged += VideoConnectionChanged; m_ObservatoryController.TelescopeStateUpdated += TelescopeStateUpdated; m_ObservatoryController.FocuserStateUpdated += FocuserStateUpdated; m_ObservatoryController.FocuserPositionUpdated += FocuserPositionUpdated; m_ObservatoryController.VideoStateUpdated += VideoStateUpdated; m_ObservatoryController.VideoError += VideoError; m_AnalysisManager = new FrameAnalysisManager(m_ObservatoryController); m_VideoRenderingController = new VideoRenderingController(this, m_StateManager, m_AnalysisManager); m_VideoFrameInteractionController = new VideoFrameInteractionController(this, m_VideoRenderingController); Version occuRecVersion = Assembly.GetExecutingAssembly().GetName().Version; bool isBeta = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(BetaReleaseAttribute), false).Length == 1; appVersion = string.Format("v{0}.{1}{2}", occuRecVersion.Major, occuRecVersion.Minor, isBeta ? " BETA" : ""); Text = string.Format("OccuRec {0}", appVersion); CheckForUpdates(false); UpdateState(null); ASCOMClient.Instance.Initialise(Settings.Default.ASCOMLoadInSeparateAppDomain); TelescopeConnectionChanged(ASCOMConnectionState.Disconnected); FocuserConnectionChanged(ASCOMConnectionState.Disconnected); VideoConnectionChanged(ASCOMConnectionState.Disconnected); UpdateASCOMConnectivityState(); }