Пример #1
0
        public async Task ComposeMessage()
        {
            if (!DialogStack.Push(new ComposeMessageData()))
            {
                return;
            }

            await ShowHostedDialog <MessageDialog, IComposeMessageViewModel>();
        }
Пример #2
0
        public async Task ComposeTweet(string text = null)
        {
            if (!DialogStack.Push(new ComposeTweetData(null, false, text)))
            {
                return;
            }

            await ShowHostedDialog <TweetComposer, IComposeTweetViewModel>();
        }
Пример #3
0
        public async Task ViewProfile(string screenName)
        {
            if (!DialogStack.Push(new ProfileDialogData(screenName)))
            {
                return;
            }

            await ShowHostedDialog <ProfileDialog, IProfileDialogViewModel, object>();
        }
Пример #4
0
        public async Task ViewImage(IList <Uri> imageSet, Uri selectedImage)
        {
            if (!DialogStack.Push(new ImageData(imageSet, selectedImage)))
            {
                return;
            }

            await ShowHostedDialog <ImageDialog, IImageDialogViewModel>();
        }
Пример #5
0
        public async Task ViewProfile(ulong userId)
        {
            if (!DialogStack.Push(new ProfileDialogData(userId)))
            {
                return;
            }

            await ShowHostedDialog <ProfileDialog, IProfileDialogViewModel, object>();
        }
Пример #6
0
        public async Task ViewDirectMessage(MessageViewModel msg)
        {
            if (!DialogStack.Push(new MessageData(msg)))
            {
                return;
            }

            await ShowHostedDialog <MessageDetailsDialog, IMessageDetailsViewModel>();
        }
Пример #7
0
        public async Task ReplyToTweet(StatusViewModel status, bool toAll)
        {
            if (!DialogStack.Push(new ComposeTweetData(status, toAll)))
            {
                return;
            }

            await ShowHostedDialog <TweetComposer, IComposeTweetViewModel>();
        }
Пример #8
0
        public async Task ReplyToMessage(MessageViewModel message)
        {
            if (!DialogStack.Push(new ComposeMessageData(message.Partner.ScreenName, message)))
            {
                return;
            }

            await ShowHostedDialog <MessageDialog, IComposeMessageViewModel>();
        }
Пример #9
0
        public async Task QuoteTweet(StatusViewModel status, IEnumerable <ulong> preSelectedAccounts = null)
        {
            if (!DialogStack.Push(new QuoteTweetData(status, preSelectedAccounts?.ToArray() ?? new ulong[0])))
            {
                return;
            }

            await ShowHostedDialog <TweetComposer, IComposeTweetViewModel>();
        }
Пример #10
0
        public async Task OpenSearch(string query = null)
        {
            if (!DialogStack.Push(new SearchDialogData(query)))
            {
                return;
            }

            await ShowHostedDialog <SearchDialog, ISearchDialogViewModel, object>();
        }
Пример #11
0
        private DialogResult BeginDialog(FrameworkElement dialog)
        {
            var result = new DialogResult();

            result.Dialog     = dialog;
            result.Completed += PopDialog;
            SetDialogAwaitable(dialog, result);
            DialogStack.Push(dialog);

            UpdateDialogView();
            return(result);
        }
Пример #12
0
        public async Task ViewStatus(StatusViewModel status)
        {
            if (status == null)
            {
                return;
            }

            if (!DialogStack.Push(new StatusData(status)))
            {
                return;
            }

            await ShowHostedDialog <TweetDetailsDialog, ITweetDetailsViewModel>();
        }