public MainWindow()
 {
     InitializeComponent();
     pdc = PlotDataConnector.getInstance();
     VM  = new MainViewModel();
     this.DataContext = VM;
 }
        public MainViewModel()
        {
            this.timer = new Timer(OnTimerElapsed);

            this.Prefs = new PlotModelParameter[numberOfModels];
            this.pdc   = PlotDataConnector.getInstance();
            SetupModel();
        }