hMailServer.Administrator.Dialogs.formExternalAccount.SaveAccountProperties C# (CSharp) Method

SaveAccountProperties() public method

public SaveAccountProperties ( hMailServer fetchAccount ) : void
fetchAccount hMailServer
return void
        public void SaveAccountProperties(hMailServer.FetchAccount fetchAccount)
        {
            fetchAccount.DaysToKeepMessages = SettingDaysToKeepMessages;
             fetchAccount.Enabled = checkEnabled.Checked;
             fetchAccount.MinutesBetweenFetch = textMinutesBetweenFetch.Number;
             fetchAccount.Name = textName.Text;
             fetchAccount.Port = textPort.Number;
             fetchAccount.ProcessMIMEDate = checkProcessMIMEDate.Checked;
             fetchAccount.ProcessMIMERecipients = checkProcessMIMERecipients.Checked;
             fetchAccount.ServerAddress = textServer.Text;
             fetchAccount.ServerType = (int) comboServerType.SelectedValue;
             fetchAccount.Username = textUsername.Text;
             fetchAccount.UseSSL = checkUseSSL.Checked;
             fetchAccount.UseAntiSpam = checkUseAntiSpam.Checked;
             fetchAccount.UseAntiVirus = checkUseAntiVirus.Checked;
             fetchAccount.EnableRouteRecipients = checkEnableRouteRecipients.Checked;

             if (textPassword.Dirty)
            fetchAccount.Password = textPassword.Password;
        }

Usage Example

Exemplo n.º 1
0
        private void EditSelectedExternalAccount()
        {
            if (listFetchAccounts.SelectedItems.Count < 1)
                return;

            int id = Convert.ToInt32(listFetchAccounts.SelectedItems[0].Tag);

            hMailServer.FetchAccounts fetchAccounts = _representedAccount.FetchAccounts;
            hMailServer.FetchAccount fetchAccount = fetchAccounts.get_ItemByDBID(id);

            formExternalAccount externalAccountDialog = new formExternalAccount();

            externalAccountDialog.LoadAccountProperties(fetchAccount);
            if (externalAccountDialog.ShowDialog() == DialogResult.OK)
            {
                externalAccountDialog.SaveAccountProperties(fetchAccount);
                fetchAccount.Save();
            }

            ListExternalAccounts();

            Marshal.ReleaseComObject(fetchAccounts);
            Marshal.ReleaseComObject(fetchAccount);
        }
All Usage Examples Of hMailServer.Administrator.Dialogs.formExternalAccount::SaveAccountProperties