Beispiel #1
0
        public bool SaveData()
        {
            hMailServer.Settings        settings = APICreator.Application.Settings;
            hMailServer.Cache           cache    = settings.Cache;
            hMailServer.MessageIndexing indexing = settings.MessageIndexing;

            cache.Enabled = checkEnabled.Checked;

            cache.DomainCacheTTL           = textCacheDomainTTL.Number;
            cache.AccountCacheTTL          = textCacheAccountTTL.Number;
            cache.AliasCacheTTL            = textCacheAliasTTL.Number;
            cache.DistributionListCacheTTL = textCacheDistributionListTTL.Number;

            settings.TCPIPThreads           = textTCPIPThreads.Number;
            settings.MaxDeliveryThreads     = textDeliveryThreads.Number;
            settings.MaxAsynchronousThreads = textMaxAsynchronousThreads.Number;

            settings.WorkerThreadPriority = (int)comboWorkerThreadPriority.SelectedValue;

            indexing.Enabled = checkMessageIndexingEnabled.Checked;

            DirtyChecker.SetClean(this);

            Marshal.ReleaseComObject(settings);
            Marshal.ReleaseComObject(cache);
            Marshal.ReleaseComObject(indexing);

            return(true);
        }
Beispiel #2
0
        public void LoadData()
        {
            hMailServer.Settings settings = APICreator.Application.Settings;
            hMailServer.Cache    cache    = settings.Cache;

            checkEnabled.Checked = cache.Enabled;

            textCacheDomainTTL.Number           = cache.DomainCacheTTL;
            textCacheAccountTTL.Number          = cache.AccountCacheTTL;
            textCacheAliasTTL.Number            = cache.AliasCacheTTL;
            textCacheDistributionListTTL.Number = cache.DistributionListCacheTTL;

            textTCPIPThreads.Number           = settings.TCPIPThreads;
            textDeliveryThreads.Number        = settings.MaxDeliveryThreads;
            textMaxAsynchronousThreads.Number = settings.MaxAsynchronousThreads;

            comboWorkerThreadPriority.SelectedValue = settings.WorkerThreadPriority;

            hMailServer.MessageIndexing indexing = settings.MessageIndexing;

            checkMessageIndexingEnabled.Checked = indexing.Enabled;

            Marshal.ReleaseComObject(indexing);
            Marshal.ReleaseComObject(settings);
            Marshal.ReleaseComObject(cache);

            EnableDisable();
        }
Beispiel #3
0
        private void buttonMessageIndexingClear_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show(Strings.Localize("Are you sure you want to clear the message index?"),
                                EnumStrings.hMailServerAdministrator, MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question) == DialogResult.Yes)
            {
                hMailServer.Settings        settings = APICreator.Application.Settings;
                hMailServer.MessageIndexing indexing = settings.MessageIndexing;

                indexing.Clear();

                Marshal.ReleaseComObject(indexing);
                Marshal.ReleaseComObject(settings);

                DisplayMessageIndexingStatus();
            }
        }
Beispiel #4
0
        private void DisplayMessageIndexingStatus()
        {
            using (new WaitCursor())
            {
                hMailServer.Settings        settings = APICreator.Application.Settings;
                hMailServer.MessageIndexing indexing = settings.MessageIndexing;

                int totalMessageCount = indexing.TotalMessageCount;
                int totalIndexCount   = indexing.TotalIndexedCount;

                if (totalIndexCount > totalMessageCount)
                {
                    totalIndexCount = totalMessageCount;
                }

                messageIndexingProgressBar.Maximum = totalMessageCount;
                messageIndexingProgressBar.Value   = totalIndexCount;

                messageIndexingStatusText.Text = string.Format("{0} / {1}", totalIndexCount, totalMessageCount);

                Marshal.ReleaseComObject(indexing);
                Marshal.ReleaseComObject(settings);
            }
        }
 public new void SetUp()
 {
     _application.Settings.IMAPSortEnabled = true;
      _indexing = _application.Settings.MessageIndexing;
 }
Beispiel #6
0
 public new void SetUp()
 {
     _application.Settings.IMAPSortEnabled = true;
     _indexing = _application.Settings.MessageIndexing;
 }