コード例 #1
0
		private void OnCreate()
		{
			var createDirectionEventArg = new CreateGKDirectionEventArg();
			ServiceFactory.Events.GetEvent<CreateGKDirectionEvent>().Publish(createDirectionEventArg);
			if (createDirectionEventArg.Direction != null)
				IElementDirection.DirectionUID = createDirectionEventArg.Direction.UID;
			if (!createDirectionEventArg.Cancel)
				Close(true);
		}
コード例 #2
0
		void OnCreateNew()
		{
			var createGKDirectionEventArg = new CreateGKDirectionEventArg();
			ServiceFactory.Events.GetEvent<CreateGKDirectionEvent>().Publish(createGKDirectionEventArg);
			if (createGKDirectionEventArg.Direction != null)
			{
				SourceDirections.Add(createGKDirectionEventArg.Direction);
				SelectedSourceDirection = SourceDirections.FirstOrDefault(x => x == createGKDirectionEventArg.Direction);
			}
		}