public MainWindowViewModel() { var textCategorizer = new TextCategorizer(); this.TrainViewModel = new TrainViewModel(textCategorizer); this.PredictViewModel = new PredictViewModel(textCategorizer); }
public PredictViewModel(TextCategorizer textCategorizer) { this.textCategorizer = textCategorizer; this.LoadExampleCommand = new DelegateCommand(this.LoadExample, this.CanAct); this.LoadCommand = new DelegateCommand(this.Load, this.CanAct); this.PredictCommand = new DelegateCommand(this.Predict, this.CanAct); }
public TrainViewModel(TextCategorizer textCategorizer) { this.textCategorizer = textCategorizer; this.LoadExampleCommand = new DelegateCommand(this.LoadExample, this.CanAct); this.TrainCommand = new DelegateCommand(this.Train, this.CanAct); this.SaveCommand = new DelegateCommand(this.Save, this.CanAct); this.textCategorizer.TrainProgress += OnTrainProgress; }