Example #1
0
        public static void UpdateUI(this WaveLenghts waves, UIList ui)
        {
            ui.dgrid.ItemsSource = waves.Wave;
            ui.dgrid.Items.Refresh();

            ui.wavePlot.PlotLines(waves.Wave);
        }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();

            System.Globalization.CultureInfo.DefaultThreadCurrentCulture   = new System.Globalization.CultureInfo("en-US");
            System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo("en-US");

            m_SelectedWaves               = new WaveLenghts();
            m_SelectedWaves.onWaveAdd    += SelectedWaves_onWaveAdd;
            m_SelectedWaves.onWaveChange += SelectedWaves_onWaveChange;

            m_SysConf                    = new SystemConfig();
            m_SysConf.onChange          += SysConf_onChange;
            m_SysConf.onWaveLimitChange += SysConf_onWaveLimitChange;

            this.DataContext = m_SysConf;

            m_WavePlot = new WavePlotter(WavePlotCanvas);
            m_ConfPlot = new ConfigPlotter(ConfigurationPlot);

            m_CrystalPlot = new Interface.CrystalPlot(CrystalPlotViev);

            m_Detector            = new Detector();
            m_DetectorPlot        = new DetectorPlot(DetectorPlotCanvas, ObservedSpectrumCanvas);
            m_DetectorPlot.XZoom += DetectorPlot_XZoom;
            m_DetectorPlot.YZoom += DetectorPlot_YZoom;

            m_UIS = new UIList()
            {
                dgrid        = SelectedWavesList,
                wavePlot     = m_WavePlot,
                detector     = m_Detector,
                detectorPlot = m_DetectorPlot
            };

            Logger.InitLogger("ExceptionLog.txt");
        }