Ejemplo n.º 1
0
 private async void LogOld_Click(object sender, RoutedEventArgs e)
 {
     if (System.IO.File.Exists(System.IO.Path.Combine(ApplicationData.Current.LocalFolder.Path, "log.old")))
     {
         await ShareView.GetForCurrentView().ShowAsync(new InputMessageDocument(new InputFileLocal(System.IO.Path.Combine(ApplicationData.Current.LocalFolder.Path, "log.old")), null, null));
     }
 }
Ejemplo n.º 2
0
 private async void ShareExecute()
 {
     if (ShareLink != null)
     {
         await ShareView.GetForCurrentView().ShowAsync(ShareLink, ShareTitle);
     }
 }
Ejemplo n.º 3
0
        private async void ShareExecute(ProxyViewModel proxy)
        {
            var response = await ProtoService.SendAsync(new GetProxyLink(proxy.Id));

            if (response is Text text && Uri.TryCreate(text.TextValue, UriKind.Absolute, out Uri uri))
            {
                await ShareView.GetForCurrentView().ShowAsync(uri, Strings.Resources.Proxy);
            }
        }
Ejemplo n.º 4
0
 private void View_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
 {
     sender.AddWebAllowedObject("TelegramWebviewProxy", new TelegramGameProxy(withMyScore =>
     {
         this.BeginOnUIThread(async() =>
         {
             await ShareView.GetForCurrentView().ShowAsync(_shareMessage, withMyScore);
         });
     }));
 }
        private async void MessagesForwardExecute()
        {
            var messages = SelectedItems.Where(x => x.CanBeForwarded).OrderBy(x => x.Id).ToList();

            if (messages.Count > 0)
            {
                SelectionMode = ListViewSelectionMode.None;
                await ShareView.GetForCurrentView().ShowAsync(messages);
            }
        }
Ejemplo n.º 6
0
        private async void ShareExecute()
        {
            var background = _item;

            if (background == null)
            {
                return;
            }

            var response = await ProtoService.SendAsync(new GetBackgroundUrl(background.Name, background.Type));

            if (response is HttpUrl url)
            {
                await ShareView.GetForCurrentView().ShowAsync(new Uri(url.Url), null);
            }
        }
Ejemplo n.º 7
0
 private async void Share_Click(object sender, RoutedEventArgs e)
 {
     await ShareView.GetForCurrentView().ShowAsync(_shareMessage);
 }
 private async void ThemeShareExecute(ThemeCustomInfo theme)
 {
     await ShareView.GetForCurrentView().ShowAsync(new InputMessageDocument(new InputFileLocal(theme.Path), null, null));
 }
 private async void MessageForwardExecute(Message message)
 {
     SelectionMode = ListViewSelectionMode.None;
     await ShareView.GetForCurrentView().ShowAsync(message);
 }