Ejemplo n.º 1
0
        void Settings_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            try
            {
                var viewAboutPage = new SettingsCommand("", "Об авторе", cmd =>
                {
                    //(Window.Current.Content as Frame).Navigate(typeof(AboutPage));
                    var settingsFlyout        = new Callisto.Controls.SettingsFlyout();
                    settingsFlyout.Content    = new About();
                    settingsFlyout.HeaderText = "Об авторе";

                    settingsFlyout.IsOpen = true;
                });
                args.Request.ApplicationCommands.Add(viewAboutPage);

                var viewAboutMalukahPage = new SettingsCommand("", "Политика конфиденциальности", cmd =>
                {
                    var settingsFlyout        = new Callisto.Controls.SettingsFlyout();
                    settingsFlyout.Content    = new Privacy();
                    settingsFlyout.HeaderText = "Политика конфиденциальности";

                    settingsFlyout.IsOpen = true;
                });
                args.Request.ApplicationCommands.Add(viewAboutMalukahPage);
            }
            catch { };
        }
Ejemplo n.º 2
0
 public void GoToProfile()
 {
     Callisto.Controls.SettingsFlyout AboutFlyout = new Callisto.Controls.SettingsFlyout();
     AboutFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
     AboutFlyout.HeaderText  = International.Translation.Profile;
     AboutFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));
     AboutFlyout.Content     = new W8.UI.Views.UC.Profile();
     AboutFlyout.IsOpen      = true;
 }
Ejemplo n.º 3
0
        public static Callisto.Controls.SettingsFlyout NewDefaultFlyout(string header, UserControl content)
        {
            var flyout = new Callisto.Controls.SettingsFlyout();

            flyout.HeaderBrush = Application.Current.Resources["AppColor"] as SolidColorBrush;
            flyout.HeaderText  = header;
            var bmp = new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.png"));

            flyout.SmallLogoImageSource = bmp;
            flyout.Content = content;
            return(flyout);
        }
Ejemplo n.º 4
0
        void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            Callisto.Controls.SettingsFlyout AboutFlyout = new Callisto.Controls.SettingsFlyout();
            AboutFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            AboutFlyout.HeaderText = International.Translation.Login_Title;
            AboutFlyout.Content = new Views.UC.Login();

            SettingsCommand aboutsc = new SettingsCommand("LoginW", International.Translation.Login_Title, (x) =>
            {

                AboutFlyout.IsOpen = true;

            });

            args.Request.ApplicationCommands.Add(aboutsc);
        }
Ejemplo n.º 5
0
 void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
 {
     Color backgroundcolor = Color.FromArgb(255, 0, 77, 96);
     var setting = new SettingsCommand("setting", "遊玩設定", (handler) =>
         {
             var settings = new Callisto.Controls.SettingsFlyout();
             settings.Content = new HareTortoiseGameXaml.Setting();
             settings.HeaderText = "遊玩設定";
             settings.IsOpen = true;
             settings.ContentForegroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(Colors.White);
             settings.HeaderBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
             settings.ContentBackgroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
         });
     var privateRule = new SettingsCommand("private", "隱私權條款", (handler) =>
         {
             var settings = new Callisto.Controls.SettingsFlyout();
             settings.Content = new HareTortoiseGameXaml.PrivateRule();
             settings.HeaderText = "隱私權條款";
             settings.IsOpen = true;
             settings.ContentForegroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(Colors.White);
             settings.HeaderBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
             settings.ContentBackgroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
         });
     var rule = new SettingsCommand("rule", "遊戲說明", (handler) =>
     {
         var settings = new Callisto.Controls.SettingsFlyout();
         settings.Content = new HareTortoiseGameXaml.Rule();
         settings.HeaderText = "遊戲說明";
         settings.IsOpen = true;
         settings.ContentForegroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(Colors.White);
         settings.HeaderBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
         settings.ContentBackgroundBrush = new Windows.UI.Xaml.Media.SolidColorBrush(backgroundcolor);
     });
     args.Request.ApplicationCommands.Add(rule);
     args.Request.ApplicationCommands.Add(setting);
     args.Request.ApplicationCommands.Add(privateRule);
 }
Ejemplo n.º 6
0
        void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            if (AppBase.Current.User == null)
            {
                Callisto.Controls.SettingsFlyout LoginFlyout = new Callisto.Controls.SettingsFlyout();
                SettingsCommand aboutsc = new SettingsCommand("LoginW", International.Translation.Login, (x) =>
                {
                    LoginFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
                    LoginFlyout.HeaderText  = International.Translation.Login;
                    LoginFlyout.Content     = new Views.UC.Login();
                    LoginFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));

                    LoginFlyout.IsOpen = true;
                });

                args.Request.ApplicationCommands.Add(aboutsc);
            }
            else
            {
                Callisto.Controls.SettingsFlyout ProfileFlyout = new Callisto.Controls.SettingsFlyout();
                SettingsCommand aboutsc = new SettingsCommand("ProfileFlyout", International.Translation.Profile, (x) =>
                {
                    ProfileFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
                    ProfileFlyout.HeaderText  = International.Translation.Profile;
                    ProfileFlyout.Content     = new Views.UC.Profile();
                    ProfileFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));
                    ProfileFlyout.IsOpen      = true;
                });

                args.Request.ApplicationCommands.Add(aboutsc);


                SettingsCommand newsCommand = new SettingsCommand("logout", International.Translation.Logout, (uiCommand) => { Logout(); });
                args.Request.ApplicationCommands.Add(newsCommand);
            }

            //Callisto.Controls.SettingsFlyout SupportFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("SupportFlyout", International.Translation.Help, (x) =>
            //{

            //    SupportFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    SupportFlyout.HeaderText = International.Translation.Help;
            //    SupportFlyout.Content = new Views.UC.Support();
            //    SupportFlyout.IsOpen = true;



            //}));

            //Callisto.Controls.SettingsFlyout MissionFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("MissionFlyout", International.Translation.Mission, (x) =>
            //{

            //    //MissionFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    //MissionFlyout.HeaderText =  International.Translation.Mission;
            //    //MissionFlyout.Content = new Views.UC.Mission();
            //    //MissionFlyout.IsOpen = true;



            //}));

            //Callisto.Controls.SettingsFlyout NewsFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("NewsFlyout", International.Translation.News, (x) =>
            //{

            //    NewsFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    NewsFlyout.HeaderText = International.Translation.News;
            //    NewsFlyout.Content = new Views.UC.News();
            //    NewsFlyout.IsOpen = true;



            //}));
            SettingsCommand logout = new SettingsCommand("logout", International.Translation.News, (uiCommand) => { LaunchPrivacyPolicyUrl("http://ifixit.org/"); });

            args.Request.ApplicationCommands.Add(logout);

            SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy", "Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl("http://www.ifixit.com/Info/Privacy"); });

            args.Request.ApplicationCommands.Add(privacyPolicyCommand);
        }
Ejemplo n.º 7
0
        void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {

            if (AppBase.Current.User == null)
            {
                Callisto.Controls.SettingsFlyout LoginFlyout = new Callisto.Controls.SettingsFlyout();
                SettingsCommand aboutsc = new SettingsCommand("LoginW", International.Translation.Login, (x) =>
                {

                    LoginFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
                    LoginFlyout.HeaderText = International.Translation.Login;
                    LoginFlyout.Content = new Views.UC.Login();
                    LoginFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));

                    LoginFlyout.IsOpen = true;



                });

                args.Request.ApplicationCommands.Add(aboutsc);
            }
            else
            {
                Callisto.Controls.SettingsFlyout ProfileFlyout = new Callisto.Controls.SettingsFlyout();
                SettingsCommand aboutsc = new SettingsCommand("ProfileFlyout", International.Translation.Profile, (x) =>
                {

                    ProfileFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
                    ProfileFlyout.HeaderText = International.Translation.Profile;
                    ProfileFlyout.Content = new Views.UC.Profile();
                    ProfileFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));
                    ProfileFlyout.IsOpen = true;



                });

                args.Request.ApplicationCommands.Add(aboutsc);


                SettingsCommand newsCommand = new SettingsCommand("logout", International.Translation.Logout, (uiCommand) => { Logout(); });
                args.Request.ApplicationCommands.Add(newsCommand);

            }

            //Callisto.Controls.SettingsFlyout SupportFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("SupportFlyout", International.Translation.Help, (x) =>
            //{

            //    SupportFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    SupportFlyout.HeaderText = International.Translation.Help;
            //    SupportFlyout.Content = new Views.UC.Support();
            //    SupportFlyout.IsOpen = true;



            //}));

            //Callisto.Controls.SettingsFlyout MissionFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("MissionFlyout", International.Translation.Mission, (x) =>
            //{

            //    //MissionFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    //MissionFlyout.HeaderText =  International.Translation.Mission;
            //    //MissionFlyout.Content = new Views.UC.Mission();
            //    //MissionFlyout.IsOpen = true;



            //}));

            //Callisto.Controls.SettingsFlyout NewsFlyout = new Callisto.Controls.SettingsFlyout();
            //args.Request.ApplicationCommands.Add(new SettingsCommand("NewsFlyout", International.Translation.News, (x) =>
            //{

            //    NewsFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
            //    NewsFlyout.HeaderText = International.Translation.News;
            //    NewsFlyout.Content = new Views.UC.News();
            //    NewsFlyout.IsOpen = true;



            //}));
            SettingsCommand logout = new SettingsCommand("logout", International.Translation.News, (uiCommand) => { LaunchPrivacyPolicyUrl("http://ifixit.org/"); });
            args.Request.ApplicationCommands.Add(logout);

            SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy", "Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl("http://www.ifixit.com/Info/Privacy"); });
            args.Request.ApplicationCommands.Add(privacyPolicyCommand);


        }
Ejemplo n.º 8
0
 public void GoToProfile()
 {
     Callisto.Controls.SettingsFlyout AboutFlyout = new Callisto.Controls.SettingsFlyout();
     AboutFlyout.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;
     AboutFlyout.HeaderText = International.Translation.Profile;
     AboutFlyout.HeaderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 113, 206));
     AboutFlyout.Content = new W8.UI.Views.UC.Profile();
     AboutFlyout.IsOpen = true;
 }
Ejemplo n.º 9
0
        private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            Color backgroundcolor = Color.FromArgb(255, 0, 77, 96);
            var about = new SettingsCommand("about","關於",(handler) =>
            {
                var settings = new Callisto.Controls.SettingsFlyout();
                settings.Content=new About();
                settings.ContentForegroundBrush= new SolidColorBrush(Colors.White);
                settings.HeaderBrush=new SolidColorBrush(backgroundcolor);
                settings.ContentBackgroundBrush= new SolidColorBrush(backgroundcolor);
                settings.HeaderText="關於";
                settings.IsOpen=true;
                
            });

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