Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TVView" /> class.
 /// </summary>
 /// <param name="model">The model.</param>
 public TVView(TVViewModel model)
 {
     this.model = model;
     this.InitializeComponent();
     this.MainIcon.Width = SizeEnum.IconSize;
     this.MainIcon.Height = SizeEnum.IconSize;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates the new tree.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="id">The identifier.</param>
        /// <returns>
        /// the view-model of the tree
        /// </returns>
        public TVViewModel CreateNewObject(VRPosition position, int id)
        {
            TVViewModel viewModel = new TVViewModel(position, id);
            TVView view = new TVView(viewModel);

            this.LinkMVVM(view, viewModel);
            return viewModel;
        }
Esempio n. 3
0
        public void TVTest()
        {
            JObject tv = new JObject();
            tv.Add("Id", 1);
            tv.Add("State", false);
            tv.Add("ShowingText", 200);
            tv.Add("Text", 300);
            tv.Add("Movie", 500);

            TVViewModel tv1 = new TVViewModel(new VRPosition(100, 200, 300), 1);
            Dictionary<int, TVViewModel> tvs = handler.TVs;
            tvs.Add(tv1.Id, tv1);
            handler.TVs = tvs;
            handler.Handle(tv);
            TVViewModel tv2 = new TVViewModel(new VRPosition(100, 200, 300), 1);

            Assert.AreEqual(tv1.ToString(), tv2.ToString());
        }
Esempio n. 4
0
 public void SetUp()
 {
     position1 = new VRPosition(42, 42, 42);
     tv1 = new TVViewModel(position1, 1);
     tv2 = new TVViewModel(position1, 2);
 }