public AlgorithmViewModel(Models.AlgorithmModel malgorithm) { this._malgorithm = malgorithm; this.Processes = new ObservableCollection<ProcessViewModel>(); foreach (Models.ProcessModel mpr in malgorithm.Processes) { if (mpr != null) this.Processes.Add(new ProcessViewModel(mpr)); } }
public RealTimeDetectionViewModel(Models.AlgorithmsModel malgorithms) { this._malgorithms = malgorithms; this._algorithms = new ObservableCollection<AlgorithmViewModel>(); foreach (Models.AlgorithmModel algorithm in this._malgorithms.Algorithms) { // only a reference to the object if (algorithm != null) this._algorithms.Add(new AlgorithmViewModel(algorithm, true)); } this._aposition = 0; this._malgorithm = new AlgorithmModel(this._malgorithms.Algorithms[this._aposition], true); this._currentImage = null; // Capture image from Active WebCam this._capture = new Capture(); System.Windows.Interop.ComponentDispatcher.ThreadIdle += delegate { FrameGrabber(); }; }
public AlgorithmViewModel(Models.AlgorithmModel malgorithm, bool type) { this._malgorithm = malgorithm; this._type = type; }