示例#1
0
 private void InitFeedback()
 {
     if (StoreServicesFeedbackLauncher.IsSupported())
     {
         FeedbackButton.Visibility = Visibility.Visible;
     }
 }
示例#2
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("NavigationTitles");

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackBtn        = UIAliases.CreateAppBarBtn(SegoeMDL2.FeedbackApp, stx.Text("Feedback"));
                FeedbackBtn.Click += FeedbackBtn_Click;
                MinorControls      = new ICommandBarElement[] { FeedbackBtn };
            }

            NewsBtn        = UIAliases.CreateAppBarBtn(Symbol.Important, stx.Text("News"));
            NewsBtn.Click += NewsBtn_Click;

            NewsStory = new Storyboard();
            SimpleStory.DoubleAnimation(NewsStory, NewsBtn, "Opacity", 0, 1, 350);
            NewsStory.AutoReverse    = true;
            NewsStory.RepeatBehavior = RepeatBehavior.Forever;

            MajorControls = new ICommandBarElement[] { NewsBtn };

            GetAnnouncements();

            MessageBus.SendUI(typeof(GR.GSystem.ActionCenter), AppKeys.PM_CHECK_TILES);
        }
 private async void LaunchFeedbackHub()
 {
     if (StoreServicesFeedbackLauncher.IsSupported())
     {
         await StoreServicesFeedbackLauncher.GetDefault().LaunchAsync();
     }
 }
示例#4
0
        /// <summary>
        ///     Initializes a new instance of the MainPage class.
        /// </summary>
        public MainPage()
        {
            InitializeComponent();

            FileList.ItemsSource = _sourceFiles;

            this.FeedbackButton.Visibility = StoreServicesFeedbackLauncher.IsSupported() ? Visibility.Visible : Visibility.Collapsed;
        }
示例#5
0
        private async void OnRequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args)
        {
            var _requestDeferral = args.GetDeferral();

            await StoreServicesFeedbackLauncher.GetDefault().LaunchAsync();

            _requestDeferral.Complete();
        }
示例#6
0
 private void SetFeedbackVisibility()
 {
     if (StoreServicesFeedbackLauncher.IsSupported() && false)
     {
         FeedbackButton.Visibility = Visibility.Visible;
         SettingsButton.SetValue(Grid.ColumnSpanProperty, 1);
         SettingsButton.SetValue(Grid.ColumnProperty, 1);
     }
 }
示例#7
0
        public AboutView()
        {
            InitializeComponent();

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackButton.Visibility = Visibility.Visible;
            }
        }
示例#8
0
        public ShellViewModel(INavigationService navService)
        {
            mNavService = navService;

            if (!StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackVisibility = Visibility.Collapsed;
            }
        }
示例#9
0
        public AboutFrame()
        {
            this.InitializeComponent();

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                this.feedbackButton.Visibility = Visibility.Visible;
            }
        }
示例#10
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public AboutView()
        {
            InitializeComponent();
            DataContext = Mvx.Resolve <AboutViewModel>();

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackButton.Visibility = Visibility.Visible;
            }
        }
示例#11
0
        public MobileNavigationPane()
        {
            this.InitializeComponent();

            // Show the feedback button if it's supported
            bool designMode = Windows.ApplicationModel.DesignMode.DesignModeEnabled;

            if (designMode || StoreServicesFeedbackLauncher.IsSupported())
            {
                this.Feedback.Visibility = Visibility.Visible;
            }
        }
示例#12
0
        public async Task GoToFeedbackPageAsync()
        {
            // Send telemetry
            _analyticsService.TrackEvent("OpenFeedbackApp");

            // Open feedback hub app
            bool executed = await StoreServicesFeedbackLauncher.GetDefault().LaunchAsync();

            if (executed)
            {
                // Feedback app opened
            }
        }
示例#13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// <param name="openHabsdk">The OpenHAB SDK object.</param>
        /// <param name="settingsService">Setting service instance.</param>
        /// <param name="logger">Logger class instance.</param>
        public MainViewModel(IOpenHAB openHabsdk, ISettingsService settingsService, ILogger <MainViewModel> logger)
            : base(new object())
        {
            _logger        = logger;
            CurrentWidgets = new ObservableCollection <OpenHABWidget>();

            _openHabsdk              = openHabsdk;
            _settingsService         = settingsService;
            _feedbackLauncher        = StoreServicesFeedbackLauncher.GetDefault();
            _cancellationTokenSource = new CancellationTokenSource();

            Messenger.Default.Register <TriggerCommandMessage>(this, async msg => await TriggerCommand(msg).ConfigureAwait(false));
            Messenger.Default.Register <WidgetClickedMessage>(this, msg => OnWidgetClicked(msg.Widget));
        }
示例#14
0
        public AboutView()
        {
            InitializeComponent();

            if (ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract", 1, 0))
            {
                StatusBar.SetIsVisible(this, false);
            }

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                feedbackButton.Visibility = Visibility.Visible;
            }
        }
示例#15
0
        public NavigationService(Frame frame)
        {
            this.frame = frame;

            this.navigationPaths = new Dictionary <PageType, Action <object> >
            {
                { PageType.MainPage, arg => this.frame.Navigate(typeof(MainPage), arg) },
                { PageType.CardDesignPage, arg => this.frame.Navigate(typeof(CardDesignPage), arg) },
                { PageType.FlashcardTestPage, arg => this.frame.Navigate(typeof(FlashcardTestPage), arg) },
                { PageType.CardsBrowse, arg => this.frame.Navigate(typeof(CardsBrowsePage), arg) },
                { PageType.Feedback, async arg =>
                  {
                      var launcher = StoreServicesFeedbackLauncher.GetDefault();
                      await launcher.LaunchAsync();
                  } }
            };
        }
示例#16
0
 private async Task LeaveFeedbackAsync()
 {
     if (StoreServicesFeedbackLauncher.IsSupported())
     {
         var launcher = StoreServicesFeedbackLauncher.GetDefault();
         await launcher.LaunchAsync();
     }
     else
     {
         var msg = new MessageDialog("Why don't you send us an email instead",
                                     "It looks like the feedback hub is having some trouble launching");
         msg.Commands.Add(new UICommand(
                              "Yes",
                              new UICommandInvokedHandler(SendFeedbackEmail)));
         msg.Commands.Add(new UICommand("No"));
     }
 }
示例#17
0
        private async void Feedback_Button_Click(object sender, RoutedEventArgs e)
        {
            Feedback_TextBlock.Visibility = Visibility.Collapsed;
            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                var  launcher = StoreServicesFeedbackLauncher.GetDefault();
                bool success  = await launcher.LaunchAsync();

                if (success == false)
                {
                    Feedback_TextBlock.Visibility = Visibility.Visible;
                }
            }
            else
            {
                Feedback_TextBlock.Visibility = Visibility.Visible;
            }
        }
示例#18
0
        public MainPage()
        {
            this.InitializeComponent();

            var resLoader = ResourceLoader.GetForCurrentView();

            this.navView.Loaded      += NavView_Loaded;
            this.navView.ItemInvoked += NavView_ItemInvoked;
            this.navView.PaneOpening += NavView_PaneOpening;

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                this.navItemFeedback.Visibility = Visibility.Visible;
            }

            var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150IconWithBadge);

            var tileNotification = new TileNotification(tileXml);

            TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
        }
示例#19
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            // 判断是否存在 StatusBar
            if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                //静态方法取得当前 StatusBar 实例
                statusbar = StatusBar.GetForCurrentView();

                //显示状态栏
                await statusbar.HideAsync();
            }
            //判断反馈按钮是否可用
            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                this.Feedback.Visibility = Visibility.Visible;
            }
            //判断是否打开推送开关,如何打开则显示开关
            if ((bool)settings.Values["Push_Enable"] == true)
            {
                Push_Switch.IsOn = true;
            }
        }
示例#20
0
 private async void hl_feedback_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (StoreServicesFeedbackLauncher.IsSupported())
         {
             // Launch feedback
             var launcher = StoreServicesFeedbackLauncher.GetDefault();
             await launcher.LaunchAsync();
         }
         else
         {
             EmailMessage emailMessage = new EmailMessage();
             emailMessage.To.Add(new EmailRecipient("*****@*****.**"));
             emailMessage.Subject = "[FEEDBACK] Symbol Icon Finder";
             await EmailManager.ShowComposeNewEmailAsync(emailMessage);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
     }
 }
示例#21
0
        public Shell()
        {
            InitializeComponent();

            Instance = this;

            HamMen = new HamburgerMenu();

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackButton.Visibility = Visibility.Visible;
            }

            CustomSettings.UserLogChanged -= CustomSettings_IsUserLoggedChanged;
            CustomSettings.UserLogChanged += CustomSettings_IsUserLoggedChanged;

            CustomSettings.ShowAdsChanged -= CustomSettings_ShowAdsChanged;
            CustomSettings.ShowAdsChanged += CustomSettings_ShowAdsChanged;

            SettingsPartViewModel.HelloSecurityChanged -= SettingsPartViewModel_HelloSecurityChanged;
            SettingsPartViewModel.HelloSecurityChanged += SettingsPartViewModel_HelloSecurityChanged;

            AccountsSettingsPane.GetForCurrentView().AccountCommandsRequested -= BuildLoginPaneAsync;
            AccountsSettingsPane.GetForCurrentView().AccountCommandsRequested += BuildLoginPaneAsync;

            CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;

            titleBar.LayoutMetricsChanged -= TitleBar_LayoutMetricsChanged;
            titleBar.LayoutMetricsChanged += TitleBar_LayoutMetricsChanged;

            LoggingButton.IsEnabled = SettingsService.Instance.UseHelloSecurity && KeyCredentialManager.IsSupportedAsync().AsTask().Result;

            uiSettings.ColorValuesChanged += ThemeChanger;

            NavView.ShowAd = Visibility.Collapsed;
        }
示例#22
0
 private async void Feedback_Tapped(object sender, TappedRoutedEventArgs e)
 {
     //调用系统级反馈
     var launcher = StoreServicesFeedbackLauncher.GetDefault();
     await launcher.LaunchAsync();
 }
示例#23
0
 private async void feedbackButton_Click(object sender, RoutedEventArgs e)
 {
     var launcher = StoreServicesFeedbackLauncher.GetDefault();
     await launcher.LaunchAsync();
 }
示例#24
0
 private async void LeaveFeedback()
 {
     var launcher = StoreServicesFeedbackLauncher.GetDefault();
     await launcher.LaunchAsync();
 }
示例#25
0
 private async void FeedbackButton_OnClick(object sender, RoutedEventArgs e)
 {
     await StoreServicesFeedbackLauncher.GetDefault().LaunchAsync();
 }
示例#26
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ApplicationData.Current.LocalSettings.Values.ContainsKey("isPassImage"))
                {
                    if ((bool)ApplicationData.Current.LocalSettings.Values["isPassImage"])
                    {
                        StorageFolder folder  = ApplicationData.Current.LocalFolder;
                        StorageFile   imgFile = await folder.GetFileAsync("Image");

                        BitmapImage bitmapImage = new BitmapImage();
                        using (IRandomAccessStream stream = await imgFile.OpenAsync(FileAccessMode.ReadWrite))
                        {
                            await bitmapImage.SetSourceAsync(stream);
                        }
                        imgProfile.Source = bitmapImage;
                    }
                    else
                    {
                        imgProfile.Source = new BitmapImage(new Uri("ms-appx:///Assets/account.png"));
                    }
                }
                else
                {
                    imgProfile.Source = new BitmapImage(new Uri("ms-appx:///Assets/account.png"));
                }
            }
            catch
            {
                imgProfile.Source = new BitmapImage(new Uri("ms-appx:///Assets/account.png"));
            }
            try
            {
                if (ApplicationData.Current.LocalSettings.Values.ContainsKey("isPassCoverImage"))
                {
                    if ((bool)ApplicationData.Current.LocalSettings.Values["isPassCoverImage"])
                    {
                        StorageFolder folder  = ApplicationData.Current.LocalFolder;
                        StorageFile   imgFile = await folder.GetFileAsync("CoverImage");

                        BitmapImage bitmapImage = new BitmapImage();
                        using (IRandomAccessStream stream = await imgFile.OpenAsync(FileAccessMode.ReadWrite))
                        {
                            await bitmapImage.SetSourceAsync(stream);
                        }
                        CoverImageBrush.ImageSource = bitmapImage;
                    }
                    else
                    {
                        CoverImageBrush.ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/win10purple.jpg"));
                    }
                }
                else
                {
                    CoverImageBrush.ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/win10purple.jpg"));
                }
            }
            catch
            {
                CoverImageBrush.ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/win10purple.jpg"));
            }
            try
            {
                if (StoreServicesFeedbackLauncher.IsSupported())
                {
                    this.FindName("imgBlur");
                    imgBlur.Visibility = Visibility.Visible;
                    await imgProfile.Blur(10, 0, 0).StartAsync();
                }
                else
                {
                    if (imgBlur != null)
                    {
                        imgBlur.Visibility = Visibility.Collapsed;
                    }
                }
            }
            catch (Exception)
            {
                if (imgBlur != null)
                {
                    imgBlur.Visibility = Visibility.Collapsed;
                }
            }
        }
示例#27
0
文件: Model.cs 项目: XElementDev/RYB
 public async void LaunchFeedbackHub()
 {
     var launcher = StoreServicesFeedbackLauncher.GetDefault();
     await launcher.LaunchAsync();
 }
示例#28
0
        public Task GiveFeedBack()
        {
            var launcher = StoreServicesFeedbackLauncher.GetDefault();

            return(launcher.LaunchAsync().AsTask());
        }
示例#29
0
 public async Task LaunchAsync()
 {
     await StoreServicesFeedbackLauncher.GetDefault().LaunchAsync();
 }
示例#30
0
文件: Model.cs 项目: XElementDev/RYB
 //  --> 2017-03-09, see https://docs.microsoft.com/en-us/windows/uwp/monetize/launch-feedback-hub-from-your-app
 public bool IsFeedbackHubAvailable()
 {
     return(StoreServicesFeedbackLauncher.IsSupported());
 }