Esempio n. 1
0
        public HistogramViewModel(MainWindowViewModel mainViewModel, IHistogram histogram)
        {
            this.mainViewModel = mainViewModel;
            this.histogram = histogram;
            this.image = histogram.Image;
            this.points = new PointCollection();

            this.points.Add(new Point(0, histogram.Max));
            int i = 0;
            foreach (int value in histogram.Values)
            {
                points.Add(new Point(i++, histogram.Max - value));
            }
            // last point (lower-right corner)
            points.Add(new Point(i, histogram.Max));
        }
Esempio n. 2
0
 public MainWindow()
 {
     InitializeComponent();
     Model = new MainWindowViewModel();
 }