public LasCurvesExporterVM(IPointsStorageProvider deviceData) { _deviceData = deviceData; Export = new ActionCommand(() => exportToLas(), () => hasCurves(), _deviceData); update(); // hack async void update() { while (true) { await Task.Delay(1000); Export.Update(); } } bool hasCurves() { #warning will lock application if flash dump uncompressing fails return(_deviceData.PointsSource != null && _deviceData.PointsSource.PointsRows.Count > 0 && _deviceData.PointsSource.PointsRows[0].Points.Length > 0); } void exportToLas() { // ToDo: Run from dedicated thread var w = new LasExportWindow(_deviceData.PointsSource.CurveInfos, _deviceData.PointsSource.PointsRows); w.ShowDialog(); } }
public FlashDataStorageVM(IPointsStorageProvider pointsSource) { _dataPointsStorageProvider = pointsSource ?? throw new ArgumentNullException(nameof(pointsSource)); _dataPointsStorageProvider.PropertyChanged += PointsSource_PropertyChanged; }
public GraphicVM(GraphicViewSetingVM settingsVM, IPointsStorageProvider sourceVM) { Settings = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM)); SourceVM = sourceVM ?? throw new ArgumentNullException(nameof(sourceVM)); }