예제 #1
0
        private async void Share_Click(object sender, RoutedEventArgs e)
        {
            var title = ViewModel.StickerSet.Title;
            var link  = new Uri(MeUrlPrefixConverter.Convert($"addstickers/{ViewModel.StickerSet.Name}"));

            await ShareView.GetForCurrentView().ShowAsync(link, title);
        }
예제 #2
0
        private async void Share_Click(object sender, RoutedEventArgs e)
        {
            var builder = new List <string>();

            if (Server != null)
            {
                builder.Add("server=" + Server);
            }
            if (Port != null)
            {
                builder.Add("port=" + Port);
            }
            //if (Username != null)
            //{
            //    builder.Add("user="******"pass="******"socks?{string.Join("&", builder)}"));

            await ShareView.GetForCurrentView().ShowAsync(link, title);
        }
예제 #3
0
        private async void Share_Click(object sender, RoutedEventArgs e)
        {
            var stickerSet = ViewModel.StickerSet;

            if (stickerSet == null)
            {
                return;
            }

            var title = stickerSet.Title;
            var link  = new Uri(MeUrlPrefixConverter.Convert(ViewModel.ProtoService, $"addstickers/{stickerSet.Name}"));

            Hide();
            await ShareView.GetForCurrentView().ShowAsync(link, title);
        }
예제 #4
0
        public static ShareView GetForCurrentView()
        {
            var id = ApplicationView.GetApplicationViewIdForWindow(Window.Current.CoreWindow);

            if (_windowContext.TryGetValue(id, out WeakReference <ShareView> reference) && reference.TryGetTarget(out ShareView value))
            {
                return(value);
            }

            var context = new ShareView();

            _windowContext[id] = new WeakReference <ShareView>(context);

            return(context);
        }