Beispiel #1
0
 public static SingletonForSqlConnection getInstance()
 {
     if (instance == null)
     {
         instance = new SingletonForSqlConnection();
     }
     return(instance);
 }
 public MainWindow()
 {
     InitializeComponent();
     if (flag)
     {
         SingletonForSqlConnection.getInstance();
         flag = false;
     }
     DataContext = new UserViewModel(this);
     Password.getInstance();
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     SingletonForSqlConnection.Close();
 }