Esempio n. 1
0
		void OnCreate()
		{
			var createZoneEventArg = new CreateGKZoneEventArg();
			ServiceFactory.Events.GetEvent<CreateGKZoneEvent>().Publish(createZoneEventArg);
			if (createZoneEventArg.Zone != null)
				GKPlanExtension.Instance.RewriteItem(IElementZone, createZoneEventArg.Zone);
			if (!createZoneEventArg.Cancel)
				Close(true);
		}
		void OnCreateNew()
		{
			var createZoneEventArg = new CreateGKZoneEventArg();
			ServiceFactory.Events.GetEvent<CreateGKZoneEvent>().Publish(createZoneEventArg);
			if (createZoneEventArg.Zone != null)
			{
				SourceZones.Add(createZoneEventArg.Zone);
				SelectedSourceZone = SourceZones.FirstOrDefault(x => x == createZoneEventArg.Zone);
			}
		}