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(); } }
public void SetSpectraViewFormCustomizer(ISpectraViewFormCustomizer spectraViewCustomizer) { m_SpectraViewCustomizer = spectraViewCustomizer; if (spectraViewCustomizer != null) { m_DisplaySettings = spectraViewCustomizer.FormDisplaySettings; } else { m_DisplaySettings = new TangraConfig.SpectraViewDisplaySettings(); m_DisplaySettings.Load(); m_DisplaySettings.Initialize(); } }
public void SetSpectraViewFormCustomizer(ISpectraViewFormCustomizer spectraViewCustomizer) { m_SpectraViewCustomizer = spectraViewCustomizer; if (spectraViewCustomizer != null) { m_DisplaySettings = spectraViewCustomizer.FormDisplaySettings; } else { m_DisplaySettings = new TangraConfig.SpectraViewDisplaySettings(); m_DisplaySettings.Load(); m_DisplaySettings.Initialize(); } }
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(); }