Beispiel #1
0
        private async void abb_signin_onClicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            SaveUserInfo();
            if (rb_elder.IsChecked == true)
            {
                LocalSettingsHelper.SetBoolStatus(LocalSettingsHelper.KEY_ROLE, true);
            }
            else
            {
                LocalSettingsHelper.SetBoolStatus(LocalSettingsHelper.KEY_ROLE, false);
            }
            //Button btn = sender as Button;

            //向布局中添加控件
            //Button jj = new Button();
            //jj.Content = "fasdf";
            //uu.Children.Add(jj);
            disablePanel();
            PopupLoading.IsOpen = true;
            //显示进度条
            // loadingPanel.Visibility = Windows.UI.Xaml.Visibility.Visible;
            string result = await SignIn();

            if (result.Equals("succeed"))
            {
                LocalSettingsHelper.SetBoolStatus(LocalSettingsHelper.KEY_SIGNIN, true);
                InitPush();
            }
            else
            {
                if (result != "")
                {
                    MessageDialog message = new MessageDialog(result);
                    await message.ShowAsync();
                }
            }
            // loadingPanel.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            this.PopupLoading.IsOpen = false;
            enablePanel();

            ////构建参数
            //ValueSet p = new ValueSet();
            //p["name"] = account;
            //p["city"] = password;

            //导航到目标页
            //并传递参数
            //  this.Frame.Navigate(typeof(SecondPage), p);
        }
Beispiel #2
0
        private async void abb_signup_onClicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            SaveUserInfo();
            //Button btn = sender as Button;
            disablePanel();
            this.PopupLoading.IsOpen = true;
            //显示进度条
            //   loadingPanel.Visibility = Windows.UI.Xaml.Visibility.Visible;
            string result = await SignUp();

            if (result.Equals("succeed"))
            {
                LocalSettingsHelper.SetBoolStatus(LocalSettingsHelper.KEY_SIGNIN, true);
            }
            MessageDialog message = new MessageDialog(result);
            await message.ShowAsync();

            // loadingPanel.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            this.PopupLoading.IsOpen = false;
            enablePanel();
        }
 private void LogOutBtn_Clicked(object sender, RoutedEventArgs e)
 {
     LocalSettingsHelper.SetBoolStatus(LocalSettingsHelper.KEY_SIGNIN, false);
     this.Frame.Navigate(typeof(MainPage));
 }