Exemple #1
0
        private void LoadData() // Load All Data For LoginPage
        {
            txt_UserName.Text = Registery.LoadDataOnRegistry();
            string getConnectionString = "";

            if (Registery.LoadConnectionString(getConnectionString))
            {
                Btn_Login.IsEnabled = true;
            }
            else
            {
                Btn_Login.IsEnabled = false;
                if (MessageBox.Show("Connection Error ,are you repair connection string? ",
                                    "Error",
                                    MessageBoxButton.YesNo,
                                    MessageBoxImage.Error) ==
                    MessageBoxResult.Yes)
                {
                    SettingsDB SettingWindow = new SettingsDB {
                    };
                    SettingWindow.ShowDialog();
                    Btn_Login.IsEnabled = true;
                }
            }
        }