private async Task ScheduleNewEvent(string userId, Event evt) { var scheduledAction = await scheduleStore.Schedule(userId, evt); TransitDirections directions = null; if (!string.IsNullOrEmpty(evt.Location)) { directions = await travelServiceClient.Directions.Transit.Get(evt.Location, evt.Start, userId); } if (null != directions) { await scheduleStore.UpdateDirections(scheduledAction, directions); } }
/// <summary> /// ContentA から ContentB へ遷移するためのストーリーボードを生成します。 /// </summary> /// <param name="direction">遷移する方向を指定します。</param> /// <returns>生成したストーリーボードを返します。</returns> private Storyboard CreateAnimationAtoB(TransitDirections direction) { var storyboard = new Storyboard(); storyboard.Children = direction == TransitDirections.ToLeft ? new TimelineCollection() { CreateMoveAnimation(TimeZero, TimeZero, this.HorizontalOffset, "OffsetXB"), CreateMoveAnimation(TimeZero, AnimationTime, 0, "OffsetXB"), CreateMoveAnimation(TimeZero, AnimationTime, -this.HorizontalOffset, "OffsetXA"), } : new TimelineCollection() { CreateMoveAnimation(TimeZero, TimeZero, -this.HorizontalOffset, "OffsetXB"), CreateMoveAnimation(TimeZero, AnimationTime, 0, "OffsetXB"), CreateMoveAnimation(TimeZero, AnimationTime, this.HorizontalOffset, "OffsetXA"), }; return(storyboard); }