Example #1
0
        public MainPage()
        {
            this.InitializeComponent();
            SetTitleBar();
            BindGlobal();

            GlobalTool.CheckLocalEmoji();
            GlobalTool.FMNavigate(typeof(EmojiPage));
        }
Example #2
0
        private async void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
        {
            string senderName = (sender as MenuFlyoutItem).Name;

            switch (senderName)
            {
            case "MenuEmoji":
                GlobalTool.FMGoBack();
                GlobalTool.FMNavigate(typeof(EmojiPage));
                break;

            case "MenuEmojiUpdate":
                if (await GlobalTool.GetEmoji(GlobalTool.EmojiFrom.Remote))
                {
                    GlobalTool.FMNavigate(typeof(EmojiPage));
                }
                else
                {
                    GlobalTool.ShowDialog("警告", "联网获取词库失败");
                }
                break;

            case "MenuEmojiReset":
                GlobalTool.CheckLocalEmoji(true);
                GlobalTool.FMNavigate(typeof(EmojiPage));
                break;

            case "MenuExit":
                GlobalTool.CloseApp();
                break;

            case "MenuAbout":
                GlobalTool.ShowDialog("关于",
                                      "Let's Emoji v"
                                      + GlobalTool.AppVersion
                                      + "\n\n作者:FunJoo\n联系方式:[email protected]");
                break;
            }
        }