public MainForm() { InitializeComponent(); #if !DEBUG mnuAdmin.Visible = false; #endif OpenDB: //load settings _mysettings = new MySettings(); _mysettings = _mysettings.load(); string appPath = utils.helpers.getAppPath(); _licenseMail = new LicenseMail(); //subscribe to new license mails _licenseMail.StateChanged += on_new_licensemail; addLog("Please select Exchange-Connect to start test"); string dbFile = _mysettings.SQLiteDataBaseFilename; if (!dbFile.Contains('\\')) { //build full file name dbFile = utils.helpers.getAppPath() + dbFile; } _licenseDataBase = new LicenseDataBase(ref this.dataGridView1, dbFile); if (_licenseDataBase.bIsValidDB == false) { MessageBox.Show("Error accessing or creating database file: " + dbFile, "Fatal ERROR"); SettingsForm dlg = new SettingsForm(); if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { goto OpenDB; //try again } else { MessageBox.Show("Cannot run without valid database path and file name", "Exchange License Mail Grabber"); exitApp(); } } else { _licenseDataBase.StateChanged += new StateChangedEventHandler(_licenseDataBase_StateChanged); loadData(); } readDGVlayout(); }
/// <summary> /// initialize a new ExchangeWebService object /// </summary> public ews(ref LicenseMail lm) { _licenseMail = lm; }
public OutlookMail(ref LicenseMail licenseMail) { _licenseMail = licenseMail; _userData = new UserData(); }