Ejemplo n.º 1
0
        public LightCurveController(Form mainFormView, VideoController videoController, AddinsController addinsController)
        {
            m_MainFormView = mainFormView;
            m_VideoController = videoController;
            m_AddinsController = addinsController;

            m_LightCurveForm = null;
        }
Ejemplo n.º 2
0
        public LightCurveController(Form mainFormView, VideoController videoController, AddinsController addinsController)
        {
            m_MainFormView     = mainFormView;
            m_VideoController  = videoController;
            m_AddinsController = addinsController;

            m_LightCurveForm = null;
        }
Ejemplo n.º 3
0
        public ucAddins(AddinsController addinsController, IAddinContainer[] addinContainers)
        {
            InitializeComponent();

            m_AddinsController = addinsController;
            m_AddinContainers.AddRange(addinContainers);

            #if !WIN32
            pnlOccultWatcherSettings.Visible = false;
            #else
            CheckOWIntegrationStatus();
            #endif
        }
Ejemplo n.º 4
0
        public frmTangraSettings(
            ILightCurveFormCustomizer lightCurveCustomizer, 
			ISpectraViewFormCustomizer spectraViewCustomizer,
            IAdvStatusPopupFormCustomizer advPopupCustomizer, 
            IAavStatusPopupFormCustomizer aavPopupCustomizer,
            AddinsController addinsController,
			IAddinContainer[] addinContainers,
            VideoController videoController)
        {
            InitializeComponent();

            m_AddinsController = addinsController;
            m_AdvPopupCustomizer = advPopupCustomizer;
            m_AavPopupCustomizer = aavPopupCustomizer;
            m_AddinContainers = addinContainers;
            m_VideoController = videoController;

            InitAllPropertyPages();

            TangraConfig.Load(ApplicationSettingsSerializer.Instance);

            ucCustomizeLightCurveViewer lightCurvesColoursPanel = m_PropertyPages.Select(kvp => kvp.Value).FirstOrDefault(x => x is ucCustomizeLightCurveViewer) as ucCustomizeLightCurveViewer;
            if (lightCurvesColoursPanel != null)
                lightCurvesColoursPanel.SetLightCurveFormCustomizer(lightCurveCustomizer);

            ucCustomizeSpectroscopy spectroscopyColoursPanel = m_PropertyPages.Select(kvp => kvp.Value).FirstOrDefault(x => x is ucCustomizeSpectroscopy) as ucCustomizeSpectroscopy;
            if (spectroscopyColoursPanel != null)
                spectroscopyColoursPanel.SetSpectraViewFormCustomizer(spectraViewCustomizer);

            ucADVSVideo12bit AdvsVideo12bitPanel = m_PropertyPages.Select(kvp => kvp.Value).FirstOrDefault(x => x is ucADVSVideo12bit) as ucADVSVideo12bit;
            if (AdvsVideo12bitPanel != null)
                AdvsVideo12bitPanel.SetAdvStatusPopupFormCustomizer(advPopupCustomizer);

            ucAAV8bit Aav8bitPanel = m_PropertyPages.Select(kvp => kvp.Value).FirstOrDefault(x => x is ucAAV8bit) as ucAAV8bit;
            if (Aav8bitPanel != null)
                Aav8bitPanel.SetAdvStatusPopupFormCustomizer(aavPopupCustomizer);

            foreach(SettingsPannel panel in m_PropertyPages.Values)
                panel.LoadSettings();
        }
Ejemplo n.º 5
0
        public frmLightCurve(LightCurveController controller, AddinsController addinsController)
        {
            InitializeComponent();

            m_LightCurveController = controller;
            m_AddinsController = addinsController;

            // Not implemented yet, may be one day ...
            miFullReprocess.Visible = false;

            m_DisplaySettings.Load();
            m_DisplaySettings.Initialize();

            picTarget1Pixels.Image = new Bitmap(34, 34);
            picTarget2Pixels.Image = new Bitmap(34, 34);
            picTarget3Pixels.Image = new Bitmap(34, 34);
            picTarget4Pixels.Image = new Bitmap(34, 34);
            picTarget1PSF.Image = new Bitmap(34, 34);
            picTarget2PSF.Image = new Bitmap(34, 34);
            picTarget3PSF.Image = new Bitmap(34, 34);
            picTarget4PSF.Image = new Bitmap(34, 34);

            miIncludeObject.Image = new Bitmap(15, 15);
            m_SmallGraph = null;

            pnlChart.Paint += new PaintEventHandler(pnlChart_Paint);
            pnlSmallGraph.Paint += new PaintEventHandler(pnlSmallGraph_Paint);

            Text = "Light Curves";

            Top = 100; Left = 100; // Default values for the very first time

            PositionMemento.LoadControlPosition(this);

            miAddins.Visible = false;
            miAddins.DropDownItems.Clear();
        }
        internal frmRunMultiFrameMeasurements(
			VideoController videoController, 
            AstrometryController astrometryController,
            AddinsController addinsController, 
            VideoAstrometryOperation astrometry, 
            MeasurementContext measurementContext, 
            FieldSolveContext fieldSolveContext,
            out List<ITangraAddinAction> astrometryAddinActions, 
            out List<ITangraAddin> astrometryAddins)
        {
            InitializeComponent();

            pboxAperturePreview.Image = new Bitmap(pboxAperturePreview.Width, pboxAperturePreview.Height, PixelFormat.Format24bppRgb);

            m_VideoController = videoController;
            m_AddinsController = addinsController;
            m_AstrometryController = astrometryController;

            m_VideoAstrometry = astrometry;
            m_MeasurementContext = measurementContext;
            m_FieldSolveContext = fieldSolveContext;

            SyncTimeStampControlWithExpectedFrameTime();
            nudMinStars.SetNUDValue(TangraConfig.Settings.Astrometry.MinimumNumberOfStars);

            m_MeasurementContext.MaxMeasurements = 200;

            #region Configure the Reduction Settings. The same must be done in the frmConfigureReprocessing and frmSelectReductionType
            // Removes the Background Gradient
            cbxBackgroundMethod.Items.RemoveAt(2);
            #endregion

            SetComboboxIndexFromPhotometryReductionMethod(TangraConfig.Settings.LastUsed.AstrometryPhotometryReductionMethod);
            SetComboboxIndexFromBackgroundMethod(TangraConfig.Settings.LastUsed.AstrometryPhotometryBackgroundMethod);
            cbxFitMagnitudes.Checked = TangraConfig.Settings.LastUsed.AstrometryFitMagnitudes;

            if (TangraConfig.Settings.LastUsed.AstrometryMagFitAperture.HasValue &&
                TangraConfig.Settings.LastUsed.AstrometryMagFitGap.HasValue &&
                TangraConfig.Settings.LastUsed.AstrometryMagFitAnnulus.HasValue)
            {
                nudAperture.ValueChanged -= nudAperture_ValueChanged;
                try
                {
                    nudAperture.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitAperture.Value);
                    nudGap.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitGap.Value);
                    nudAnnulus.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitAnnulus.Value);
                }
                finally
                {
                    nudAperture.ValueChanged += nudAperture_ValueChanged;
                }
            }
            else
                ResetAperture();

            cbxOutputMagBand.SelectedIndex = (int)TangraConfig.Settings.Astrometry.DefaultMagOutputBand;

            lblCatBand.Text = string.Format("Magnitude Band for Photometry (from {0})", m_FieldSolveContext.StarCatalogueFacade.CatalogNETCode);
            cbxCatalogPhotometryBand.Items.Clear();
            cbxCatalogPhotometryBand.Items.AddRange(m_FieldSolveContext.StarCatalogueFacade.CatalogMagnitudeBands);
            CatalogMagnitudeBand defaultBand = cbxCatalogPhotometryBand.Items.Cast<CatalogMagnitudeBand>().FirstOrDefault(e => e.Id == TangraConfig.Settings.StarCatalogue.CatalogMagnitudeBandId);
            if (defaultBand != null)
                cbxCatalogPhotometryBand.SelectedItem = defaultBand;
            else
                cbxCatalogPhotometryBand.SelectedIndex = 0;

            cbxExpectedMotion.SelectedIndex = 1;
            cbxSignalType.Visible = false;
            cbxSignalType.SelectedIndex = 0;
            cbxFrameTimeType.SelectedIndex = 0;
            pnlIntegration.Visible = false;
            cbxInstDelayUnit.SelectedIndex = 0;

            m_AstrometryAddinActions = m_AddinsController.GetAstrometryActions(out m_AstrometryAddins);

            foreach (ITangraAddinAction action in m_AstrometryAddinActions)
            {
                clbAddinsToRun.Items.Add(new AddinActionEntry(action));
            }
            astrometryAddinActions = m_AstrometryAddinActions;
            astrometryAddins = m_AstrometryAddins;

            cbxInstDelayCamera.Items.Clear();
            cbxInstDelayCamera.Items.Add(string.Empty);
            cbxInstDelayCamera.Items.AddRange(InstrumentalDelayConfigManager.GetAvailableCameras().ToArray());

            m_Initialised = true;
        }
Ejemplo n.º 7
0
        internal frmLightCurve(LightCurveController controller, AddinsController addinsController, LCFile lcFile, string lcFilePath)
            : this(controller, addinsController)
        {
            m_LCFile = lcFile;
            m_LCFilePath = lcFilePath;
            m_Header = lcFile.Header;
            m_Header.LcFile = lcFile;
            m_Footer = lcFile.Footer;
            m_FrameTiming = lcFile.FrameTiming;

            Text = "Light Curves - " + Path.GetFileName(lcFilePath);

            OnNewLCFile();
        }
Ejemplo n.º 8
0
 public OcrExtensionManager(AddinsController addinsController)
 {
     m_AddinsController = addinsController;
 }
Ejemplo n.º 9
0
        public frmMain()
        {
            InitializeComponent();

            TangraConfig.Load(ApplicationSettingsSerializer.Instance);

            m_VideoFileView = new VideoFileView(this);
            m_ImageToolView = new ImageToolView(this);
            m_ZoomedImageView = new ZoomedImageView(zoomedImage, this);

            m_VideoController = new VideoController(this, m_VideoFileView, m_ZoomedImageView, m_ImageToolView, pnlControlerPanel);
            m_AddinsController = new AddinsController(this, m_VideoController);
            m_VideoController.OcrExtensionManager = new OcrExtensionManager(m_AddinsController);

            m_LongOperationsManager = new LongOperationsManager(this, m_VideoController);

            m_LightCurveController = new LightCurveController(this, m_VideoController, m_AddinsController);
            m_MakeDarkFlatController = new DarkFlatFrameController(this, m_VideoController);
            m_ConvertVideoToFitsController = new ConvertVideoToFitsController(this, m_VideoController);
            m_ConvertVideoToAavController = new ConvertVideoToAavController(this, m_VideoController);
            m_AstrometryController = new AstrometryController(m_VideoController, m_LongOperationsManager);
            m_SpectroscopyController = new SpectroscopyController(this, m_VideoController);
            m_AutoUpdatesController = new AutoUpdatesController(this, m_VideoController);

            NotificationManager.Instance.SetVideoController(m_VideoController);

            m_VideoController.SetLightCurveController(m_LightCurveController);
            m_VideoController.SetAddinsController(m_AddinsController);

            BuildRecentFilesMenu();

            m_AddinsController.LoadAddins();

            #if !WIN32
            miVideoModelling.Visible = false;
            #endif
            m_AutoUpdatesController.CheckForUpdates(false);
        }