Ejemplo n.º 1
0
		private void OnCreate()
		{
			Guid xzoneUID = IElementZone.ZoneUID;
			var createZoneEventArg = new CreateXZoneEventArg();
			ServiceFactory.Events.GetEvent<CreateXZoneEvent>().Publish(createZoneEventArg);
			if (createZoneEventArg.Zone != null)
				IElementZone.ZoneUID = createZoneEventArg.Zone.UID;
			Helper.BuildMap();
			Helper.SetXZone(IElementZone);
			UpdateZones(xzoneUID);
			if (!createZoneEventArg.Cancel)
				Close(true);
		}
Ejemplo n.º 2
0
		private void OnCreateXZone(CreateXZoneEventArg createZoneEventArg)
		{
			ZonesViewModel.CreateZone(createZoneEventArg);
		}
		void OnCreateNew()
		{
			var createZoneEventArg = new CreateXZoneEventArg();
			ServiceFactory.Events.GetEvent<CreateXZoneEvent>().Publish(createZoneEventArg);
			if (createZoneEventArg.Zone != null)
			{
				TargetZones.Add(createZoneEventArg.Zone);
				if (TargetZones.Count == 1)
				{
					SaveCommand.Execute();
				}
			}
		}