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); }
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); } }