예제 #1
0
        public static void ApplicationWiseCommands_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            if (!args.Request.ApplicationCommands.Any(c => ((string)c.Id) == "Options"))
            {
                var command = new Windows.UI.ApplicationSettings.SettingsCommand("Options", "Options", x =>
                {
                    var settings = new SettingsPage();

                    settings.Show();
                });
                args.Request.ApplicationCommands.Add(command);
            }

            if (!args.Request.ApplicationCommands.Any(c => ((string)c.Id) == "About"))
            {
                var command = new Windows.UI.ApplicationSettings.SettingsCommand("About", "About", x =>
                {
                    var settings = new AboutSettingsFlyout();
                    settings.Show();
                });
                args.Request.ApplicationCommands.Add(command);
            }
        }
예제 #2
0
 void App_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
 {
     // Add a command that links to a website
     Windows.UI.ApplicationSettings.SettingsCommand privacyPolicyCommand = new Windows.UI.ApplicationSettings.SettingsCommand("privacyPolicyCommand", "Privacy Policy", (x) =>
     {
         Windows.System.Launcher.LaunchUriAsync(new Uri("http://massivescale.com/pages/apps/rmv-awesome/rmv-awesome-privacy-policy/")); // Launch the website
     });
     args.Request.ApplicationCommands.Add(privacyPolicyCommand);
 }
예제 #3
0
        void OnCommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            var setting = new Windows.UI.ApplicationSettings.SettingsCommand("MySetting", "Alkalmazás beállításai", onHandleClick);

            args.Request.ApplicationCommands.Add(setting);
        }
예제 #4
0
        private void SettingsPane_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            foreach (SettingsCommand cmd in OnCommandsRequested())
            {
#pragma warning disable 618
                args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand(cmd.Id, cmd.Label, new Windows.UI.Popups.UICommandInvokedHandler((c) => { SettingsCommand sc = new SettingsCommand(c.Id, c.Label, cmd.Invoked); sc.Invoked.Invoke(sc); })));
            }

#if WINDOWS_UWP
            // add missing 8.1 commands
#if DEBUG
            if (true)
#else
            if (!Package.Current.IsDevelopmentMode)
#endif
            {
#pragma warning disable 618
                args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("rateAndReview", "Rate and review", async(c) =>
                {
                    await InTheHand.ApplicationModel.Store.CurrentApp.RequestReviewAsync();
                }));
#pragma warning disable 618
                args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("privacyPolicy", "Privacy policy", async(c) =>
                {
                    await InTheHand.ApplicationModel.Store.CurrentApp.RequestDetailsAsync();
                }));
            }
#endif

            /*if (showAbout)
             * {
             *  args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("about", "About", (c) =>
             *  {
             *      SettingsFlyout flyout = new SettingsFlyout();
             *      flyout.Title = "About";
             *      //flyout.IconSource = new BitmapImage(InTheHand.ApplicationModel.Package.Current.Logo);
             *      flyout.Content = new InTheHandUI.AboutView();
             *      flyout.Show();
             *  }));
             * }*/
        }
예제 #5
0
        void MainPage_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            Windows.UI.ApplicationSettings.SettingsCommand updateSetting =
                new Windows.UI.ApplicationSettings.SettingsCommand("AppUpdateSettings", "App updates", (handler) =>
            {
                SettingsFlyout1 updatesFlyout = new SettingsFlyout1();
                updatesFlyout.ShowCustom();
            });

            args.Request.ApplicationCommands.Add(updateSetting);
        }
예제 #6
0
 private void App_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
 {
     if (args.Request.ApplicationCommands.Count < 1)
     {
         args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("privacy", "Privacy Policy", x =>
         {
             Frame.Navigate(typeof(About));
         }));
     }
 }
예제 #7
0
        public void Settings_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            args.Request.ApplicationCommands.Clear();

            Windows.UI.ApplicationSettings.SettingsCommand command = new Windows.UI.ApplicationSettings.SettingsCommand("AboutPage", "About", (commandHandler) => new AboutFlyout().Show());
            args.Request.ApplicationCommands.Add(command);
        }
        private void MainPage_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args)
        {
            Windows.UI.ApplicationSettings.SettingsCommand generalSetting =
                new Windows.UI.ApplicationSettings.SettingsCommand("AppSettings", "SurferLite Settings", (handler) =>
            {
                SettingsFlyoutGeneral generalSettingsFlyout = new SettingsFlyoutGeneral();
                generalSettingsFlyout.Show();
            });

            args.Request.ApplicationCommands.Add(generalSetting);
        }