Пример #1
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();
        }
Пример #2
0
 public void SetAdvStatusPopupFormCustomizer(IAavStatusPopupFormCustomizer aavPopupCustomizer)
 {
     m_AavPopupCustomizer = aavPopupCustomizer;
 }