Esempio n. 1
0
        private void SetupPopup(IPopupClient apiKeyFetcher)
        {
            const int vertOffset  = 48;
            const int horizOffset = 40;
            var       appHost     = Application.Current.Host.Content;
            var       pageSize    = new Size(appHost.ActualWidth, appHost.ActualHeight);
            var       spacing     = new RectangleSpacing(vertOffset, horizOffset, pageSize);

            Popup             = new PopupWrapper(apiKeyFetcher, spacing, ApplicationBar);
            Popup.OnClose    += PopupOnClose;
            Popup.OnRedirect += PopupOnRedirect;
            Popup.Open();
        }
Esempio n. 2
0
        public PopupWrapper(IPopupClient client, RectangleSpacing spacing)
        {
            Client = client;
            Client.OnClose += Close;
            Client.OnRedirect += ClientOnOnRedirect;

            if (spacing.AdjustedWidth.HasValue)
                Client.UserControl.Width = spacing.AdjustedWidth.Value;

            if (spacing.AdjustedHeight.HasValue)
                Client.UserControl.Height = spacing.AdjustedHeight.Value;
            
            PopupDisplay = new Popup
            {
                Child = Client.UserControl,
                VerticalOffset = spacing.Top,
                HorizontalOffset = spacing.Left
            };
        }
Esempio n. 3
0
        public PopupWrapper(IPopupClient client, RectangleSpacing spacing)
        {
            Client             = client;
            Client.OnClose    += Close;
            Client.OnRedirect += ClientOnOnRedirect;

            if (spacing.AdjustedWidth.HasValue)
            {
                Client.UserControl.Width = spacing.AdjustedWidth.Value;
            }

            if (spacing.AdjustedHeight.HasValue)
            {
                Client.UserControl.Height = spacing.AdjustedHeight.Value;
            }

            PopupDisplay = new Popup
            {
                Child            = Client.UserControl,
                VerticalOffset   = spacing.Top,
                HorizontalOffset = spacing.Left
            };
        }
Esempio n. 4
0
 public PopupWrapper(IPopupClient client, RectangleSpacing spacing, IApplicationBar applicationBar)
     : this(client, spacing)
 {
     ApplicationBar = applicationBar;
 }
Esempio n. 5
0
        private void UploadFilePopup(IPopupClient apiKeyFetcher)
        {
            MessageBoxResult mb = MessageBox.Show("Press OK to upload this torrent", "Hey", MessageBoxButton.OKCancel);


            if (mb != MessageBoxResult.OK)
            {
                
            }

        }
Esempio n. 6
0
        private void SetupPopup(IPopupClient apiKeyFetcher)
        {
            const int vertOffset = 48;
            const int horizOffset = 40;
            var appHost = Application.Current.Host.Content;
            var pageSize = new Size(appHost.ActualWidth, appHost.ActualHeight);
            var spacing = new RectangleSpacing(vertOffset, horizOffset, pageSize);

            Popup = new PopupWrapper(apiKeyFetcher, spacing, ApplicationBar);
            Popup.OnClose += PopupOnClose;
            Popup.OnRedirect += PopupOnRedirect;
            Popup.Open();
        }
Esempio n. 7
0
 public PopupWrapper(IPopupClient client, RectangleSpacing spacing, IApplicationBar applicationBar)
     :this(client, spacing)
 {
     ApplicationBar = applicationBar;
 }