Exemplo n.º 1
0
        public frmAddScheduleEntry(IObservatoryController observatoryController, FrameAnalysisManager analysisManager)
        {
            InitializeComponent();

            m_ObservatoryController = observatoryController;
            m_AnalysisManager = analysisManager;

            cbxOperations.SelectedIndex = 0;
            lblUT.Visible = Settings.Default.DisplayTimeInUT;
            lblUT2.Visible = Settings.Default.DisplayTimeInUT;

            cbxAutoFocusing.Enabled = m_ObservatoryController.IsConnectedToFocuser();
            cbxAutoPulseGuiding.Enabled = m_ObservatoryController.IsConnectedToTelescope() && m_AnalysisManager.IsPulseGuidingCalibrated();

            cbxAutoFocusing.Checked = false;
            cbxAutoPulseGuiding.Checked = false;

            SetTime(Settings.Default.DisplayTimeInUT ? DateTime.UtcNow : DateTime.Now);
        }
Exemplo n.º 2
0
        public VideoRenderingController(frmMain mainForm, CameraStateManager stateManager, FrameAnalysisManager analysisManager)
        {
            m_MainForm = mainForm;
            this.stateManager = stateManager;
            this.analysisManager = analysisManager;

            running = true;
            previewOn = true;

            m_DisplayIntensifyMode = Settings.Default.DisplayIntensifyMode;
            m_DisplayInvertedMode = Settings.Default.UseInvertedDisplayMode;
            m_DisplayHueIntensityMode = Settings.Default.UseHueIntensityDisplayMode;

            m_MainForm.tsmiHueIntensity.Checked = m_DisplayHueIntensityMode;
            m_MainForm.tsmiInverted.Checked = m_DisplayInvertedMode;
            m_MainForm.tsmiOff.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Off;
            m_MainForm.tsmiLo.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Lo;
            m_MainForm.tsmiHigh.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Hi;

            cameraImage = new CameraImage();

            ThreadPool.QueueUserWorkItem(new WaitCallback(DisplayVideoFrames));
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        public frmTelescopeControl(FrameAnalysisManager analisysManager)
        {
            InitializeComponent();

            m_AnalisysManager = analisysManager;
        }