/// <summary> /// Constructor /// </summary> /// <param name="model"></param> public SingleViewModel(IMazeModel model) : base(model) { MyModel = model as SingleMazeModel; MyModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
/// <summary> /// Sets the model for the ViewModel /// </summary> /// <param name="m">model</param> public void SetModel(IMazeModel m) { MyModel = m; string ip = ConfigurationManager.AppSettings["ip"]; string port = ConfigurationManager.AppSettings["port"]; string row = ConfigurationManager.AppSettings["rows"]; string col = ConfigurationManager.AppSettings["cols"]; VM_Rows = Int32.Parse(row); VM_Cols = Int32.Parse(col); }