/** * Method for dispatching a particular dialog depending on the contentDialogType parameter. * The user is the user name which is required for the dialog message content. */ public virtual async void displayContentDialogDispatch(contentDialogType type, String user) { switch (type) { case contentDialogType.DNE: ContentDialog userInGroupDialog = new ContentDialog() { Title = "User Not Added", Content = user + " does not exist.", PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(userInGroupDialog, true); break; case contentDialogType.InvalidEmail: ContentDialog invalidUserEmailDialog = new ContentDialog() { Title = "User Not Added", Content = user + " is not a valid email address form.", PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(invalidUserEmailDialog, true); break; case contentDialogType.RepeatMember: ContentDialog repeatMemberDialog = new ContentDialog() { Title = "User Not Added", Content = user + " already in group.", PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(repeatMemberDialog, true); break; case contentDialogType.NoServer: ContentDialog noServerDialog = new ContentDialog() { Title = "User Not Added", Content = "Could not sync group with server.", PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(noServerDialog, true); break; case contentDialogType.SuccessfulAdd: ContentDialog successDialog = new ContentDialog() { Title = user + " Successfully Added!", Content = "You will now be able to chat with " + user, PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(successDialog, true); break; case contentDialogType.NoEmail: ContentDialog noEmailDialog = new ContentDialog() { Title = "No User Added", Content = "Please enter an email address", PrimaryButtonText = "Ok" }; await ContentDialogHelper.CreateContentDialogAsync(noEmailDialog, true); break; } }
public override void displayContentDialogDispatch(contentDialogType type, String user) { dialogType = type; }