/// <summary> /// Creates the car. /// </summary> /// <param name="position">The position.</param> /// <param name="id">The identifier.</param> /// <param name="type">The type.</param> /// <returns> /// The created ViewModel /// </returns> public AbstractCarViewModel CreateNewObject(VRPosition position, int id, int type) { AbstractCarViewModel car = null; switch (type) { case (int)CarEnum.Normal: car = new NormalCarViewModel(position, id); break; case (int)CarEnum.Police: car = new PoliceCarViewModel(position, id); break; case (int)CarEnum.Ambulance: car = new AmbulanceCarViewModel(position, id); break; case (int)CarEnum.Firetruck: car = new FiretruckCarViewModel(position, id); break; default: break; } CarView view = new CarView(car); this.LinkMVVM(view, car); return car; }
public void SetUp() { position1 = new VRPosition(42, 42, 42); scale = new VRScale(100, 100); building1 = new BuildingViewModel(position1, scale, 1); building2 = new BuildingViewModel(position1, scale, 2); }
/// <summary> /// Initializes a new instance of the <see cref="CharacterViewModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> /// <param name="emotion">The emotion.</param> /// <param name="action">The action.</param> /// <param name="color">The color.</param> public CharacterViewModel(VRPosition pos, int id, int emotion, int action, string color) { this.characterModel = new CharacterModel(pos, id, emotion, action, color); this.Model = this.characterModel; Log.Logger.GetInstance().Warning("New Char at: " + pos.X + ":" + pos.Y); }
/// <summary> /// Sets the position. /// </summary> /// <param name="pos">The position.</param> public void SetPosition(VRPosition pos) { Thickness margin = this.Margin; margin.Left = pos.X; margin.Top = pos.Y; this.Margin = margin; }
public void SetUp() { position1 = new VRPosition(42, 42, 42); seat1 = new SeatViewModel(position1, 1); seat2 = new SeatViewModel(position1, 2); factory = new BenchFactory(); }
/// <summary> /// Creates the new bench. /// </summary> /// <param name="position">The position.</param> /// <param name="id">The identifier.</param> /// <param name="seatIDs">The seat i ds.</param> /// <returns> /// the viewModel of the bench. /// </returns> public BenchViewModel CreateNewObject(VRPosition position, int id, Collection<int> seatIDs) { Collection<SeatViewModel> svmList = new Collection<SeatViewModel>(); BenchViewModel viewModel = new BenchViewModel(position, id, svmList); return viewModel; }
/// <summary> /// Creates the new object. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> /// <returns>A new object</returns> public SeatViewModel CreateNewObject(VRPosition pos, int id) { SeatView view = new SeatView(); SeatViewModel viewModel = new SeatViewModel(pos, id); this.LinkMVVM(view, viewModel); return viewModel; }
public void SetUp() { position1 = new VRPosition(42, 42, 42); scale = new VRScale(100, 100); tree1 = new TreeViewModel(position1, 1); tree2 = new TreeViewModel(position1, 2); }
/// <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 TreeViewModel CreateNewObject(VRPosition position, int id) { TreeView view = new TreeView(); TreeViewModel viewModel = new TreeViewModel(position, id); this.LinkMVVM(view, viewModel); return viewModel; }
public void SetPositionBenchTest() { bench1.SetSeats(); VRPosition actualPosition = bench1.GetSeatWithID(5).Position; VRPosition expectedPosition = new VRPosition(position1.X, position1.Y); Assert.AreEqual(expectedPosition.X, actualPosition.X); Assert.AreEqual(expectedPosition.Y, actualPosition.Y); }
public void SetPositionWhileHiddenTest() { VRPosition pos = new VRPosition(200, 100); Assert.AreEqual("Hidden", viewModel.Visible); viewModel.Position = pos; Assert.AreEqual("Visible", viewModel.Visible); Assert.AreEqual(pos, viewModel.Position); }
/// <summary> /// Initializes a new instance of the <see cref="BuildingViewModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="scale">The scale.</param> /// <param name="id">The identifier.</param> public BuildingViewModel(VRPosition pos, VRScale scale, int id) { Log.Logger.GetInstance().Warning("1scale = " + scale.Width); Log.Logger.GetInstance().Debug("new builView at (" + pos.X + ":" + pos.Y + ":" + pos.Rotation + ") with w=" + scale.Width + " and h=" + scale.Height); this.buildingModel = new BuildingModel(pos, scale, id); this.Model = this.buildingModel; }
/// <summary> /// Creates the new object. /// </summary> /// <param name="pos">The position.</param> /// <returns> /// The new object /// </returns> public PatientViewModel CreateNewObject(VRPosition pos) { PatientViewModel character = new PatientViewModel(pos); PatientView view = new PatientView(); this.LinkMVVM(view, character); return character; }
/// <summary> /// Initializes a new instance of the <see cref="TVModel"/> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> public TVModel(VRPosition pos, int id) : base(pos, new VRScale(SizeEnum.DefaultVRObjectSize), id) { this.IsOn = false; this.Scale = new VRScale(SizeEnum.CharacterSize); this.Icon = ImageEnum.TvIcon.GetImageBrush(); }
/// <summary> /// Initializes a new instance of the <see cref="CharacterModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> /// <param name="emotion">The emotion.</param> /// <param name="action">The action.</param> /// <param name="color">The color.</param> public CharacterModel(VRPosition pos, int id, int emotion, int action, string color) : base(pos, new VRScale(SizeEnum.DefaultVRObjectSize), id) { this.SetEmotion(emotion); this.SetAction(action); this.BackgroundColor = color; this.Visible = "Hidden"; }
/// <summary> /// Creates the new object. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> /// <param name="emotion">The emotion.</param> /// <param name="action">The action.</param> /// <returns>The new object</returns> public CharacterViewModel CreateNewObject(VRPosition pos, int id, int emotion, int action) { string color = this.RandomGRB(); CharacterViewModel character = new CharacterViewModel(pos, id, emotion, action, color); CharacterView view = new CharacterView(character); this.LinkMVVM(view, character); return character; }
public void SetUp() { position1 = new VRPosition(42, 42, 360); position2 = new VRPosition(42, 42, 360); position3 = new VRPosition(24, 42, 360); position4 = new VRPosition(42, 24, 360); position5 = new VRPosition(42, 42, 300); position6 = new VRPosition(84, 84, 360); position7 = new VRPosition(42, 42); }
/// <summary> /// Creates the new building. /// </summary> /// <param name="position">The position.</param> /// <param name="scale">The scale.</param> /// <param name="id">The identifier.</param> /// <returns> /// the view-model of the building /// </returns> public BuildingViewModel CreateNewObject(VRPosition position, VRScale scale, int id) { BuildingView view = new BuildingView(); Log.Logger.GetInstance().Warning("0scale = " + scale.Width); Log.Logger.GetInstance().Error("Building pos " + position.X + " " + position.Y); BuildingViewModel viewModel = new BuildingViewModel(position, scale, id); this.LinkMVVM(view, viewModel); return viewModel; }
public void SetUp() { position1 = new VRPosition(42, 42, 42); svm1 = new SeatViewModel(position1, 5); svm2 = new SeatViewModel(position1, 4); Collection<SeatViewModel> seatList = new Collection<SeatViewModel>(); seatList.Add(svm1); seatList.Add(svm2); bench1 = new BenchViewModel(position1, 1, seatList); bench2 = new BenchViewModel(position1, 2, seatList); }
public void SetUp() { position = new VRPosition(42, 42, 42); patient = new PatientViewModel(position); }
public void MapSetMarginTest() { VRPosition pos = new VRPosition(500, 499); Assert.AreNotEqual(-500.0d, map.GetCanvas().Margin.Left); map.SetMargin(pos); Assert.AreEqual(-500.0d, map.GetCanvas().Margin.Left); Assert.AreEqual(-499.0d, map.GetCanvas().Margin.Top); }
/// <summary> /// Initializes a new instance of the <see cref="BuildingModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="scale">The scale.</param> /// <param name="id">The identifier.</param> public BuildingModel(VRPosition pos, VRScale scale, int id) : base(pos, scale, id) { }
public void SetUp() { position = new VRPosition(1, 1, 0); bench = new BenchModel(position, 11); }
public void SetUp() { position = new VRPosition(100, 100, 230); tv = new TVModel(position, 10); }
/// <summary> /// Initializes a new instance of the <see cref="TreeModel"/> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> public TreeModel(VRPosition pos, int id) : base(pos, new VRScale(SizeEnum.Unity.TreeSize()), id) { this.Image = ImageEnum.TreeIcon.GetImageBrush(); }
/// <summary> /// Initializes a new instance of the <see cref="AbstractCarViewModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> public AbstractCarViewModel(VRPosition pos, int id) : base() { }
/// <summary> /// Initializes a new instance of the <see cref="SeatViewModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> public SeatViewModel(VRPosition pos, int id) { this.seatModel = new SeatModel(pos, id); this.Model = this.seatModel; }
/// <summary> /// Initializes a new instance of the <see cref="BenchViewModel" /> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> /// <param name="svmList">The SVM list.</param> public BenchViewModel(VRPosition pos, int id, Collection<SeatViewModel> svmList) { this.benchModel = new BenchModel(pos, id); this.Model = this.benchModel; this.SeatList = svmList; }
/// <summary> /// Initializes a new instance of the <see cref="FiretruckCarViewModel"/> class. /// </summary> /// <param name="pos">The position.</param> /// <param name="id">The identifier.</param> public FiretruckCarViewModel(VRPosition pos, int id) : base(pos, id) { this.CarModel = new FiretruckCarModel(pos, id); this.Model = this.CarModel; }
public void SetUp() { position1 = new VRPosition(42, 42, 42); tv1 = new TVViewModel(position1, 1); tv2 = new TVViewModel(position1, 2); }