protected DialogToken([NotNull] DialogBuilder builder, DialogToken inputToken, [NotNull] string tokenName) { _builder = builder; InputToken = inputToken; TokenName = tokenName; OutputToken = TokenName; Builder.AddToken(this); }
private void AddToken([NotNull] DialogToken token) { if (token is IInputDialogToken) { return; } if (_tokens.Exists(t => token.TokenName == t?.TokenName)) { throw new ApplicationException("Token with same name already defined!"); } _tokens.Add(token); }
public static async Task <RoutePickerDialogResult> ShowAsync(Route direction, StopGroup stopGroup = null) { var token = new DialogToken { OriginalRoute = direction, OriginalStop = stopGroup }; var currentFrame = (Frame)Window.Current.Content; currentFrame.Navigate(typeof(RoutePickerDialog), token); await token.WorkTask; return(token.Result); }
public static async Task <RoutePickerDialogResult> ShowAsync(Route direction, StopGroup stopGroup = null) { var token = new DialogToken { OriginalRoute = direction, OriginalStop = stopGroup }; var currentPage = (PhoneApplicationPage)App.RootFrame.Content; currentPage.NavigationService.Navigate(new Uri("/Dialogs/RoutePickerDialog.xaml", UriKind.Relative)); await token.WorkTask; return(token.Result); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); token = (DialogToken)e.Parameter; this.routeGroup = token.OriginalRoute.RouteGroup; this.routes = routeGroup.Routes.ToList(); this.stop = token.OriginalStop; this.routeIndex = routes.IndexOf(token.OriginalRoute); if (stop == null) { this.stop = await UserEstimations.BestStopAsync(token.OriginalRoute); } DataContext = this; TextName.Text = routeGroup.Description.Replace(" / ", "\n"); setName(); setContent(); //Animations.FadeInFromBottomAfter(ContentListView, this, 25); }
internal PlayerDialogToken([NotNull] DialogBuilder builder, DialogToken inputToken, [NotNull] string tokenName) : base(builder, inputToken, tokenName) { }
public PartnerDialogToken([NotNull] DialogBuilder builder, DialogToken inputTokenToken, [NotNull] string tokenName) : base(builder, inputTokenToken, tokenName) { }
public DialogToken() { Current = this; }