private void Snackboxx_Load(object sender, EventArgs e) { _iniObj = new IniObj(); _userrights = new List <UserRight>(); _wrini = new WriteIni(); try { FileInfo fi = new FileInfo(IniFilePath); if (!fi.Exists) { fi.Create(); } else { _ini = new ReadIni(IniFilePath); _iniObj = _ini.GetIni(); } logfilename = DateTime.Now.Year + "" + DateTime.Now.Month + "" + DateTime.Now.Day; _iniObj.LogFilename = logfilename; if (string.IsNullOrEmpty(_iniObj.ScanLogPath)) { _iniObj.ScanLogPath = Environment.CurrentDirectory + "\\ScanLog\\"; } Config = new Config(_iniObj, this, _dbConn); _dbConn = Config.DBConn; tssinfoFOUR.Text = _dbConn.GetState.ToString(); //after correct connection... _input = new Input(_iniObj, this, _dbConn, _userrights); this.ShowControl(_input); new UnknownCodeSchemaUpdater(_dbConn, _input.WriteInfoLog); } catch (Exception exp) { MessageBox.Show(exp.Message); userToolStripMenuItem.Enabled = false; inputToolStripMenuItem.Enabled = false; } }