コード例 #1
0
 public MainWindowViewModel(IDialogManager _dialogManager, SensorReadoutValues _sensorReadoutValues, AxisValues _axisValues)
 {
     dialogManager              = _dialogManager;
     sensorReadoutValues        = _sensorReadoutValues;
     axisValues                 = _axisValues;
     openedGraphicWindowsParams = new List <string>();
 }
コード例 #2
0
 public GraphicViewModel(ChartValues <SensorValue> values, AxisValues _axisValues, string graphicTitle)
 {
     DateTimeFormatter = value => new DateTime((long)value).ToString("mm:ss:ms");
     mapper            = Mappers.Xy <SensorValue>()
                         .X(model => model.GeneratingTime.Ticks)
                         .Y(model => model.Magnitude);
     Charting.For <SensorValue>(mapper);
     axisValues = _axisValues;
     axisValues.PropertyChanged += AxisPropertyChanged;
     Values       = values;
     GraphicTitle = graphicTitle;
 }
コード例 #3
0
 protected override void OnStartup(StartupEventArgs e)
 {
     try
     {
         AxisValues          axisValues          = new AxisValues();
         SensorReadoutValues sensorReadoutValues = new SensorReadoutValues(axisValues);
         var dialogManager = new DialogManager();
         dialogManager.Register <GraphicViewModel, GraphicView>();
         var mainWindow = new MainWindow()
         {
             DataContext = new MainWindowViewModel(dialogManager, sensorReadoutValues, axisValues),
         };
         mainWindow.Show();
     }
     catch (Exception ex)
     {
         Log.Write(ex);
     }
 }