Beispiel #1
0
		public static UserDatabase GetInstance(string filePath) {
			
			if (_SingleObject == null) {
				lock (typeof(UserDatabase)) {
					if (_SingleObject == null) {
						_SingleObject = new UserDatabase(filePath);
					}
				}
			}

			return _SingleObject;
		}
Beispiel #2
0
		public void Dispose()
		{
			_host = null;
			_dataBase.Dispose();
			_dataBase = null;
			_selectedChat = null;
			_selectedUser = null;
			_users = null;
		}
Beispiel #3
0
		public void Initialize(Hal.NCSPlugin.IPluginHost host)
		{
			_host = host;
			_dataBase = UserDatabase.GetInstance("test.sqlite");
			_column = new System.Windows.Forms.DataGridViewTextBoxColumn();
			_column.Name = "nameColumn";
			_column.HeaderText = "Name";
			_column.Width = 50;
			_column.ReadOnly = true;
			_column.Visible = Properties.Settings.Default.IsAlive;

			CreateContextMenu();
		}
Beispiel #4
0
		public void Dispose()
		{
			lock (typeof(UserDatabase)) {
				if (_connection != null) {
					_connection.Close();
					_connection.Dispose();
					_connection = null;
				}

				_SingleObject = null;
			}
		}