public static LibBase getLibBase() { if (instance == null) { instance = new LibBase(); } return(instance); }
private void selectLibButton_Click(object sender, EventArgs e) { if (libUserBase.SelectedIndex != -1) { selectedLib.lib = LibBase.getLibBase().getLib(LoginForm.ourUserName, libUserBase.SelectedItem.ToString()); selectedLib.user = UsersBase.getUserBase().getUser(LoginForm.ourUserName); MainWindow mainWindow = new MainWindow(); mainWindow.Show(); this.Hide(); } else { MessageBox.Show("Вы не выбрали библиотеку"); } }