コード例 #1
0
 /// <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);
     };
 }
コード例 #2
0
        /// <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);
        }