Example #1
0
        public MainViewModel()
        {
            _GCode = new ObservableCollection<BaseGCode>();
            _GCode.CollectionChanged += GCode_CollectionChanged;

            ImageProcessor = new ImageProcessorViewModel(_GCode);
            VectorProcessor = new VectorProcessorViewModel();

            Save = new Command((x) => SaveGCodeAction(), (x) => GCode.Count > 0);
            Generate = new Command((x) => GenerateAction(), (x) => true);
            CountStats = new Command((x) => CountStatsAction(), (x) => true);

            MagnificationSource = new List<double>();
            MagnificationSource.Add(0.5);
            MagnificationSource.Add(1);
            MagnificationSource.Add(2);
            MagnificationSource.Add(4);
            MagnificationSource.Add(10);
            MagnificationSource.Add(20);
        }
Example #2
0
        public MainViewModel()
        {
            _GCode = new ObservableCollection <BaseGCode>();
            _GCode.CollectionChanged += GCode_CollectionChanged;

            ImageProcessor  = new ImageProcessorViewModel(_GCode);
            VectorProcessor = new VectorProcessorViewModel();

            Save       = new Command((x) => SaveGCodeAction(), (x) => GCode.Count > 0);
            Generate   = new Command((x) => GenerateAction(), (x) => true);
            CountStats = new Command((x) => CountStatsAction(), (x) => true);

            MagnificationSource = new List <double>();
            MagnificationSource.Add(0.5);
            MagnificationSource.Add(1);
            MagnificationSource.Add(2);
            MagnificationSource.Add(4);
            MagnificationSource.Add(10);
            MagnificationSource.Add(20);
        }