Example #1
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;
        }
Example #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;
        }