コード例 #1
0
ファイル: App.xaml.cs プロジェクト: gouravfreedom/FitnessApp
        public App()
        {
            InitializeComponent();

            TodoManager = new TodoItemManager(new HTTPService());

            DatabaseManager = new Service.DatabaseManager(new Service.DatabaseService());

            //MainPage = new HanselmanNavigationPage( new Views.SelectionPage());

            MainPage = new HanselmanNavigationPage(new Views.SelectionPage());

            LoginResponse = new Models.LoginResponse.Member();
            TrainerData   = new Models.LoginResponse.Member();

            FacebookProfile = new Models.FacebookProfile();
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: gouravfreedom/ArkhoFinal
        public App()
        {
            try
            {
                InitializeComponent();
                //var ignore = new CircleTransformation();
                FlowListView.Init();

                TodoManager = new TodoItemManager(new HTTPService());

                DatabaseManager = new Service.DatabaseManager(new DatabaseService());

                MainPage         = new HanselmanNavigationPage(new Views.SelectionPage());
                TrainerStripeUrl = "";

                Initialization = InitializeAsync();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: tousif03raza/Arkho_UI
        public App()
        {
            try
            {
                InitializeComponent();
                var ignore = new CircleTransformation();
                FlowListView.Init();

                TodoManager = new TodoItemManager(new HTTPService());

                DatabaseManager = new Service.DatabaseManager(new DatabaseService());

                MainPage = new HanselmanNavigationPage(new Views.SelectionPage());


                var isExist = CredentialsService.DoCredentialsExist();
                if (isExist)
                {
                    var account = CredentialsService.GetAccount();
                    var data    = JsonConvert.DeserializeObject <Member>(account.Properties["Member"]);
                    App.LoginResponse = data;

                    if (App.LoginResponse == null)
                    {
                        LoginResponse = new Models.LoginResponse.Member();
                        TrainerData   = new Models.LoginResponse.Member();
                        CredentialsService.DeleteCredentials();
                        MainPage = new HanselmanNavigationPage(new Views.SelectionPage());

                        return;
                    }

                    if (App.LoginResponse.Email.Equals(null))
                    {
                        CredentialsService.DeleteCredentials();
                    }

                    App.SelectedView = account.Properties["UserType"];
                    if (account.Properties.ContainsKey("FacebookUser"))
                    {
                        var fbData = JsonConvert.DeserializeObject <FacebookUser>(account.Properties["FacebookUser"]);
                        App.FacebookUser = fbData;
                    }
                    if (account.Properties.ContainsKey("InstagramUser"))
                    {
                        var instaData = JsonConvert.DeserializeObject <InstagramUser>(account.Properties["InstagramUser"]);
                        App.InstagramUser = instaData;
                    }
                    //if (account.Properties.ContainsKey("InstgramMedia"))
                    //{
                    //    var instaMedia = JsonConvert.DeserializeObject<InstagramMedia>(account.Properties["InstgramMedia"]);
                    //    App.InstagramMedia = instaMedia;
                    //}
                    MainPage = new NavigationPage(new RootPage(App.SelectedView));
                }
                else
                {
                    LoginResponse = new Models.LoginResponse.Member();
                    TrainerData   = new Models.LoginResponse.Member();
                }

                //FacebookProfile = new Models.FacebookProfile();
            }
            catch (Exception ex) {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
                CredentialsService.DeleteCredentials();
                MainPage = new HanselmanNavigationPage(new Views.SelectionPage());
            }
        }