Beispiel #1
0
        private void mnuConnect_Click(object sender, EventArgs e)
        {
            _mysettings = _mysettings.load();
            _userData   = new utils.UserData(_mysettings.ExchangeDomainname, _mysettings.ExchangeUsername, "", _mysettings.UseWebProxy);
            Helpers.GetLogonData dlg = new Helpers.GetLogonData(ref _userData);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _ews = new ews(ref _licenseMail);
                _ews.StateChanged += new StateChangedEventHandler(_ews_stateChanged1);
                _ews.start();

                if (_ews.logon(_userData.sDomain, _userData.sUser, _userData.sPassword,
                               _mysettings.UseWebProxy,
                               _mysettings.ExchangeWebProxy,
                               _mysettings.EchangeWebProxyPort))
                {// "Global", "E841719", ""))
                    Cursor.Current = Cursors.WaitCursor;
                    Application.DoEvents();
                    _ews.getMailsAsync();
                }
            }
            mnuConnect.Enabled    = false;
            mnuDisconnect.Enabled = true;
        }
Beispiel #2
0
        private void mnuConnect_Click(object sender, EventArgs e)
        {
            _mysettings = _mysettings.load();
            _userData = new utils.UserData(_mysettings.ExchangeDomainname, _mysettings.ExchangeUsername, "", _mysettings.UseWebProxy);
            Helpers.GetLogonData dlg = new Helpers.GetLogonData(ref _userData);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _ews = new ews(ref _licenseMail);
                _ews.StateChanged += new StateChangedEventHandler(_ews_stateChanged1);
                _ews.start();

                if (_ews.logon(_userData.sDomain, _userData.sUser, _userData.sPassword,
                    _mysettings.UseWebProxy,
                    _mysettings.ExchangeWebProxy,
                    _mysettings.EchangeWebProxyPort))
                {// "Global", "E841719", ""))
                    Cursor.Current = Cursors.WaitCursor;
                    Application.DoEvents();
                    _ews.getMailsAsync();
                }
            }
            mnuConnect.Enabled = false;
            mnuDisconnect.Enabled = true;
        }