Ejemplo n.º 1
0
        public bool SaveOauthInfoAsync(OauthInfo info)
        {
            OathoQuery = new OathoQuery();
            try

            {
                var NotTel = OathoQuery.GetOathinfoNotTel(info.Telephone);

                foreach (var s in NotTel)
                {
                    OathoQuery.SetOathNotDefault(s);
                }
                OathoQuery.SaveOath0Info(info);
                //var ee= OathoQuery.IsExitItems();

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }


            // throw new NotImplementedException();
        }
Ejemplo n.º 2
0
        //查询默认账号的OauthInfos
        public OauthInfo GetDefaltOathinfo()
        {
            OathoQuery = new OathoQuery();
            var tel = OathoQuery.GetDefaltTel();

            var OauthInfo = OathoQuery.GetOathinfo(tel);


            return(OauthInfo);
        }
Ejemplo n.º 3
0
        public App()
        {
            //datagramsocket()
            // The root page of your application
            //MainPage = new ContentPage
            //{
            //    Content = new StackLayout
            //    {
            //        VerticalOptions = LayoutOptions.Center,
            //        Children = {
            //            new Label {
            //                HorizontalTextAlignment = TextAlignment.Center,
            //                Text = "Welcome to Xamarin Forms!"
            //            }
            //        }
            //    }
            //};

            IsUserLoggedIn = false;
            if (!IsUserLoggedIn)
            {
                OathoQuery = new OathoQuery();
                // LoginService = new LoginService();
                var nn = OathoQuery.IsExitItems();
                if (nn == false)
                {
                    var loginpage = new LoginPage();

                    var nav = new NavigationPage(loginpage);

                    NavigationPage.SetHasNavigationBar(this, false);

                    // nav.BarBackgroundColor = Color.White;

                    nav.BarBackgroundColor = Color.FromRgb(255, 224, 170);

                    nav.BarTextColor = Color.White;

                    nav.BackgroundColor = Color.White;

                    // nav.Icon = "logo.png";


                    //var lkk=new ();

                    MainPage = nav;
                    //MainPage = nav;
                    //MainPage = new NavigationPage(new LoginPage())
                    //{

                    //    BarBackgroundColor = Color.FromRgb(255,224,170),
                    //    BarTextColor = Color.White



                    //};

                    // MainPage = new LoginPage();
                }
                else
                {
                    var DefaultLoginPage = new DefaultLoginPage();

                    var nav = new NavigationPage(DefaultLoginPage);

                    NavigationPage.SetHasNavigationBar(this, false);

                    nav.BarBackgroundColor = Color.FromRgb(255, 224, 170);

                    nav.BarTextColor = Color.White;

                    nav.BackgroundColor = Color.White;

                    MainPage = nav;
                }
            }
            else
            {
                // MainPage = new NavigationPage(new MainPage());
                MainPage = new MainPage();
            }
        }