private void OnCreate()
		{
			Guid zoneUID = IElementZone.ZoneUID;
			var createZoneEventArg = new CreateZoneEventArg();
			ServiceFactory.Events.GetEvent<CreateZoneEvent>().Publish(createZoneEventArg);
			if (createZoneEventArg.Zone != null)
				IElementZone.ZoneUID = createZoneEventArg.Zone.UID;
			Helper.BuildMap();
			Helper.SetZone(IElementZone);
			UpdateZones(zoneUID);
			if (!createZoneEventArg.Cancel)
				Close(true);
		}
		private void OnCreate()
		{
			var createZoneEventArg = new CreateZoneEventArg();
			createZoneEventArg.Zone = new Zone();
			if (IsGuardDevice)
				createZoneEventArg.Zone.ZoneType = ZoneType.Guard;
			else
				createZoneEventArg.Zone.ZoneType = ZoneType.Fire;
			ServiceFactory.Events.GetEvent<CreateZoneEvent>().Publish(createZoneEventArg);
			if (!createZoneEventArg.Cancel)
			{
				var zoneViewModel = new ZoneViewModel(createZoneEventArg.Zone);
				Zones.Add(zoneViewModel);
				SelectedZone = zoneViewModel;
			}
		}
Example #3
0
 private void OnCreate()
 {
     var createZoneEventArg = new CreateZoneEventArg();
     ServiceFactory.Events.GetEvent<CreateZoneEvent>().Publish(createZoneEventArg);
     IElementZone.ZoneNo = createZoneEventArg.ZoneNo;
     Helper.SetZone(IElementZone);
     if (!createZoneEventArg.Cancel)
         Close(true);
 }
Example #4
0
		void OnCreateZone(CreateZoneEventArg createZoneEventArg)
		{
			ZonesViewModel.CreateZone(createZoneEventArg);
		}