Exemple #1
0
        public LoginPage()
        {
            InitializeComponent();

            btnLogin.Clicked   += OnLoginClicked;
            btnSetting.Clicked += (sender, e) =>
            {
                Navigation.PushAsync(new ElsaSettingPage());
            };
            onLoading(false);

            NavigationPage.SetHasNavigationBar(this, false);

            if (LocalPreferences.IsPropertyExists("database"))
            {
                SettingVariable.Database = LocalPreferences.LoadApplicationProperty <string>("database");
            }

            if (LocalPreferences.IsPropertyExists("instance"))
            {
                SettingVariable.Instance = LocalPreferences.LoadApplicationProperty <string>("instance");
            }

            Debug.WriteLine("database instance" + SettingVariable.Database + " " + SettingVariable.Instance);
        }
Exemple #2
0
 bool isLoggedIn()
 {
     if (LocalPreferences.IsPropertyExists("isLoggedIn"))
     {
         return(LocalPreferences.LoadApplicationProperty <bool>("isLoggedIn"));
     }
     return(false);
 }
Exemple #3
0
        void loadSavedSettings()
        {
            string database = "";

            if (LocalPreferences.IsPropertyExists(KEY_DB))
            {
                database = LocalPreferences.LoadApplicationProperty <string>(KEY_DB);
            }

            string instance = "";

            if (LocalPreferences.IsPropertyExists(KEY_INS))
            {
                instance = LocalPreferences.LoadApplicationProperty <string>(KEY_INS);
            }

            entryDatabase.Text = database;
            entryInstance.Text = instance;

            SettingVariable.Database = database;
            SettingVariable.Instance = instance;
        }