public VectorProcessorViewModel()
 {
     PathGroups = new ObservableCollection<Engine.GCodeGeneration.VectorProcessor.VPathGroup>();
     OpenSvg = new Command((x) => OpenSvgAction(), (x) => true);
     MoveUp = new Command((x) => MoveUpAction(), (x) => SelectedGroup != null);
     MoveDown = new Command((x) => MoveDownAction(), (x) => SelectedGroup != null);
 }
예제 #2
0
        public ImageProcessorViewModel(ObservableCollection<BaseGCode> gcode)
        {
            _GCode = gcode;
            Generate = new Command((x) => GenerateAction(), (x) => _Bitmap != null);
            OpenImage = new Command((x) => OpenImageAction(), (x) => true);

            _InterpolatorsSource = new List<Engine.Interpolators.IInterpolator>();
            InterpolatorsSource.Add(new Engine.Interpolators.StepInterpolator());
            InterpolatorsSource.Add(new Engine.Interpolators.BilinearInterpolator());
            SelectedInterpolator = InterpolatorsSource[0];
        }
예제 #3
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);
        }