예제 #1
0
 public PeaksAnalyzer(IDataCursor cursor, IPeaksFinder finder, ISmoother smoother,
                      IPeaksRepository peaksRepository, ILorentzian lorentzianModel)
 {
     lorentzian   = lorentzianModel;
     dataCursor   = cursor;
     peaksFinder  = finder;
     dataSmoother = smoother;
     peaks        = peaksRepository;
 }
예제 #2
0
        public MainView(IMainViewModel viewModel, IDataCursor dataCursor, IPeaksRepository peaksRepository,
                        ILorentzian lorentzianModel)
        {
            InitializeComponent();

            SpectrumQuickView.DataTransform = new Log10YTransform();
            SpectrumQuickView.VerticalAxis  = new VerticalAxis {
                LabelProvider = new MyExponentialLabelProvider()
            };

            SpectrumAnalysis.DataTransform = new Log10YTransform();
            SpectrumAnalysis.VerticalAxis  = new VerticalAxis {
                LabelProvider = new MyExponentialLabelProvider()
            };

            FWHM.AxisGrid.DrawHorizontalMinorTicks = true;
            FWHM.AxisGrid.DrawHorizontalTicks      = true;
            FWHM.AxisGrid.DrawVerticalMinorTicks   = true;
            FWHM.AxisGrid.DrawVerticalTicks        = true;
            FWHM.VerticalAxis = new VerticalAxis {
                LabelProvider = new MyExponentialLabelProvider()
            };

            PeakPosition.AxisGrid.DrawHorizontalMinorTicks = true;
            PeakPosition.AxisGrid.DrawHorizontalTicks      = true;
            PeakPosition.AxisGrid.DrawVerticalMinorTicks   = true;
            PeakPosition.AxisGrid.DrawVerticalTicks        = true;
            PeakPosition.VerticalAxis = new VerticalAxis {
                LabelProvider = new MyExponentialLabelProvider()
            };

            PeakValue.AxisGrid.DrawHorizontalMinorTicks = true;
            PeakValue.AxisGrid.DrawHorizontalTicks      = true;
            PeakValue.AxisGrid.DrawVerticalMinorTicks   = true;
            PeakValue.AxisGrid.DrawVerticalTicks        = true;
            PeakValue.DataTransform = new Log10YTransform();
            PeakValue.VerticalAxis  = new VerticalAxis {
                LabelProvider = new MyExponentialLabelProvider()
            };

            ViewModel = viewModel;
            ViewModel.QuickViewChanged += OnSpectraChanged;
            ViewModel.AnalysisChanged  += OnAnalysisChanged;

            cursor = dataCursor;

            dataCursor.SpectraLoaded   += OnSpectraChanged;
            dataCursor.SpectraChanged  += OnSpectraChanged;
            dataCursor.VoltagesLoaded  += OnVoltagesChanged;
            dataCursor.VoltagesChanged += OnVoltagesChanged;

            peaks = peaksRepository;

            lorentzian = lorentzianModel;
        }