Example #1
0
 private void Button_Radio_Click(object sender, RoutedEventArgs e)
 {
     if (ConfigService.Uid >= 0)
     {
         Frame_main.Navigate(typeof(Radio));
     }
     else
     {
         NotifyPopup notifyPopup = new NotifyPopup("请先登录");
         notifyPopup.Show();
     }
 }
Example #2
0
        private async void Home_Loaded(object sender, RoutedEventArgs e)
        {
            if (!isFirstTimeLoad)
            {
                return;
            }
            isFirstTimeLoad = false;
            //AcrylicBrush_mainFrame.TintColor = MainPage.backgroundBrush.Color;//acrylic背景颜色
            TextBox_account.Text            = ConfigService.PhoneOrEmail;
            PasswordBox_password.Password   = ConfigService.Password;
            TextBox_serverIP.Text           = ConfigService.ApiUri.ToString();
            ProgressRing_initState.IsActive = true;
            int state = await Task.Run(() => Init());

            switch (state)
            {
            case 1:
            {
                ProgressRing_initState.IsActive = false;
                TextBlock_initState.Text        = "登录失败";
                NotifyPopup notifyPopup = new NotifyPopup("登陆失败");
                notifyPopup.Show();
            }
            break;

            case 2:
            {
                ProgressRing_initState.IsActive = false;
                TextBlock_initState.Text        = "获取喜欢音乐失败";
                NotifyPopup notifyPopup = new NotifyPopup("获取喜欢歌曲列表失败");
                notifyPopup.Show();
            }
            break;

            default:
            {
                ProgressRing_initState.IsActive = false;
                TextBlock_initState.Text        = "初始化完成";
                ImageEx_user.Source             = avatarImgIdStr;//设为用户头像
                TextBlock_UserName.Text         = nickName;
            }
            break;
            }
            Frame_main.Navigate(typeof(Recommendation));
        }
Example #3
0
 private void Button_recommendation_Click(object sender, RoutedEventArgs e)
 {
     Frame_main.Navigate(typeof(Recommendation));
 }
Example #4
0
 private void Button_setting_Click(object sender, RoutedEventArgs e)
 {
     //await ContentDialog_setting.ShowAsync();
     Frame_main.Navigate(typeof(SettingPage), null, new DrillInNavigationTransitionInfo());
 }
 public MainWindow()
 {
     InitializeComponent();
     Frame_main.Navigate(new LogInPage());
 }