Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        public FlashDataStorageVM(IPointsStorageProvider pointsSource)
        {
            _dataPointsStorageProvider = pointsSource ?? throw new ArgumentNullException(nameof(pointsSource));

            _dataPointsStorageProvider.PropertyChanged += PointsSource_PropertyChanged;
        }
Ejemplo n.º 3
0
 public GraphicVM(GraphicViewSetingVM settingsVM, IPointsStorageProvider sourceVM)
 {
     Settings = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM));
     SourceVM = sourceVM ?? throw new ArgumentNullException(nameof(sourceVM));
 }