Exemplo n.º 1
0
        void loadSettings()
        {
            _mysettings = _mysettings.load();

            txtUser.Text            = _mysettings.Username;
            txtProfile.Text         = _mysettings.OutlookProfile;
            chkNewSession.Checked   = _mysettings.NewSession;
            chkEnableDialog.Checked = _mysettings.ShowDialog;

            txtDatabaseFile.Text = _mysettings.SQLiteDataBaseFilename;
        }
Exemplo n.º 2
0
        private void mnuConnect_Click(object sender, EventArgs e)
        {
            _mysettings = _mysettings.load();
            _userData   = new utils.UserData(_mysettings.ShowDialog, _mysettings.OutlookProfile, _mysettings.Username, "");
            Helpers.GetLogonDataOutlook dlg = new Helpers.GetLogonDataOutlook(ref _userData);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _olk = new OutlookMail.OutlookMail(ref _licenseMail);
                _olk.StateChanged += new StateChangedEventHandler(_olk_stateChanged);

                //_olk.StateChanged += new StateChangedEventHandler(_olk_StateChanged);
                _olk.start();

                if (_olk.logon(_userData.sOutlookProfile, _userData.sUser, _userData.sPassword, _userData.bShowOutlookDialog))
                {// "Global", "E841719", ""))
                    Cursor.Current = Cursors.WaitCursor;
                    Application.DoEvents();
                    _olk.getMailsAsync();
                }
            }
            mnuConnect.Enabled    = false;
            mnuDisconnect.Enabled = true;
        }