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