예제 #1
0
        public App()
        {
            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("OTkzNTJAMzEzNzJlMzEyZTMwbHYrZmduam1yNHRhQUhjSlpPSUZJTmpvZXc4b0VpZVdQNzNWcFNaamQxaz0=");

            InitializeComponent();

            Init();

            AppSettings.ReloadSetting();

            AssetsExtension.InitAssetsExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            ImageResourceExtension.InitImageResourceExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            TranslateExtension.InitTranslateExtension("AppResources.Localization.Resources", CultureInfo.CurrentCulture, typeof(App).GetTypeInfo().Assembly);

            RegisterDependency();

            if (Settings.LoggedIn)
            {
                MainPage = ViewModelResolver.ResolveViewModel <ViewModels.SyncViewModel>();
            }
            else
            {
                MainPage = new NavigationContainer(ViewModelResolver.ResolveViewModel <ViewModels.Login.LoginViewModel>())
                {
                    BarBackgroundColor = Color.FromHex("#2196F3"),
                    BarTextColor       = Color.White
                };
            }
        }
예제 #2
0
        public App()
        {
            InitializeComponent();

            Init();

            AppSettings.ReloadSetting();

            AssetsExtension.InitAssetsExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            ImageResourceExtension.InitImageResourceExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            TranslateExtension.InitTranslateExtension("AppResources.Localization.Resources", CultureInfo.CurrentCulture, typeof(App).GetTypeInfo().Assembly);

            RegisterDependency();

            if (Settings.LoggedIn)
            {
                MainPage = ViewModelResolver.ResolveViewModel <ViewModels.SyncViewModel>();
            }
            else
            {
                MainPage = new NavigationContainer(ViewModelResolver.ResolveViewModel <ViewModels.Login.LoginViewModel>())
                {
                    BarBackgroundColor = Color.FromHex("#2196F3"),
                    BarTextColor       = Color.White
                };
            }
        }
예제 #3
0
        public App()
        {
            InitializeComponent();

            #region Init ImageResourceExtension
            ImageResourceExtension.InitImageResourceExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            #endregion

            #region Init TranslateExtension
            TranslateExtension.InitTranslateExtension("AppResources.Localization.Resources", CultureInfo.CurrentCulture, typeof(App).GetTypeInfo().Assembly);
            #endregion

            InitMainPage();
        }
예제 #4
0
        public App()
        {
            InitializeComponent();

            #region Init ImageResourceExtension
            ImageResourceExtension.InitImageResourceExtension("AppResources.Assets", typeof(App).GetTypeInfo().Assembly);
            #endregion

            #region Init TranslateExtension
            TranslateExtension.InitTranslateExtension("AppResources.Localization.Resources", CultureInfo.CurrentCulture, typeof(App).GetTypeInfo().Assembly);
            #endregion

            /* NavigationPage navigationPage = new NavigationPage(new LoginView());
             * navigationPage.BarBackgroundColor = Color.FromHex("#8BC34A");
             * navigationPage.BarTextColor = Color.White; */
            MainPage = new LoginView();
        }