Пример #1
0
 private void SaveData(bool confirmSave)
 {
     try
     {
         Logging_Settings logging = this.m_pVirtualServer.SystemSettings.Logging;
         logging.LogSMTP               = this.m_pLogSMTP.Checked;
         logging.SmtpLogsPath          = this.m_pSMTPLogPath.Text;
         logging.LogPOP3               = this.m_pLogPOP3.Checked;
         logging.Pop3LogsPath          = this.m_pPOP3LogPath.Text;
         logging.LogIMAP               = this.m_pLogIMAP.Checked;
         logging.ImapLogsPath          = this.m_pIMAPLogPath.Text;
         logging.LogRelay              = this.m_pLogRelay.Checked;
         logging.RelayLogsPath         = this.m_pRelayLogPath.Text;
         logging.LogFetchMessages      = this.m_pLogFetchPOP3.Checked;
         logging.FetchMessagesLogsPath = this.m_pFetchPOP3LogPath.Text;
         if (this.m_pVirtualServer.SystemSettings.HasChanges && (!confirmSave || MessageBox.Show(this, "You have changes settings, do you want to save them ?", "Confirm:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes))
         {
             this.m_pVirtualServer.SystemSettings.Commit();
         }
     }
     catch (Exception x)
     {
         ErrorForm errorForm = new ErrorForm(x, new StackTrace());
         errorForm.ShowDialog(this);
     }
 }
Пример #2
0
        /// <summary>
        /// Saves data.
        /// </summary>
        /// <param name="confirmSave">Specifies is save confirmation UI is showed.</param>
        private void SaveData(bool confirmSave)
        {
            try{
                Logging_Settings settings = m_pVirtualServer.SystemSettings.Logging;

                settings.LogSMTP               = m_pLogSMTP.Checked;
                settings.SmtpLogsPath          = m_pSMTPLogPath.Text;
                settings.LogPOP3               = m_pLogPOP3.Checked;
                settings.Pop3LogsPath          = m_pPOP3LogPath.Text;
                settings.LogIMAP               = m_pLogIMAP.Checked;
                settings.ImapLogsPath          = m_pIMAPLogPath.Text;
                settings.LogRelay              = m_pLogRelay.Checked;
                settings.RelayLogsPath         = m_pRelayLogPath.Text;
                settings.LogFetchMessages      = m_pLogFetchPOP3.Checked;
                settings.FetchMessagesLogsPath = m_pFetchPOP3LogPath.Text;

                if (m_pVirtualServer.SystemSettings.HasChanges)
                {
                    if (!confirmSave || MessageBox.Show(this, "You have changes settings, do you want to save them ?", "Confirm:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        m_pVirtualServer.SystemSettings.Commit();
                    }
                }
            }
            catch (Exception x) {
                wfrm_sys_Error frm = new wfrm_sys_Error(x, new System.Diagnostics.StackTrace());
                frm.ShowDialog(this);
            }
        }
Пример #3
0
 private void LoadData()
 {
     try
     {
         Logging_Settings logging = this.m_pVirtualServer.SystemSettings.Logging;
         this.m_pLogSMTP.Checked       = logging.LogSMTP;
         this.m_pSMTPLogPath.Text      = logging.SmtpLogsPath;
         this.m_pLogPOP3.Checked       = logging.LogPOP3;
         this.m_pPOP3LogPath.Text      = logging.Pop3LogsPath;
         this.m_pLogIMAP.Checked       = logging.LogIMAP;
         this.m_pIMAPLogPath.Text      = logging.ImapLogsPath;
         this.m_pLogRelay.Checked      = logging.LogRelay;
         this.m_pRelayLogPath.Text     = logging.RelayLogsPath;
         this.m_pLogFetchPOP3.Checked  = logging.LogFetchMessages;
         this.m_pFetchPOP3LogPath.Text = logging.FetchMessagesLogsPath;
     }
     catch (Exception x)
     {
         ErrorForm errorForm = new ErrorForm(x, new StackTrace());
         errorForm.ShowDialog(this);
     }
 }
Пример #4
0
        /// <summary>
        /// Loads data to UI.
        /// </summary>
        private void LoadData()
        {
            try{
                Logging_Settings settings = m_pVirtualServer.SystemSettings.Logging;

                m_pLogSMTP.Checked       = settings.LogSMTP;
                m_pSMTPLogPath.Text      = settings.SmtpLogsPath;
                m_pLogPOP3.Checked       = settings.LogPOP3;
                m_pPOP3LogPath.Text      = settings.Pop3LogsPath;
                m_pLogIMAP.Checked       = settings.LogIMAP;
                m_pIMAPLogPath.Text      = settings.ImapLogsPath;
                m_pLogRelay.Checked      = settings.LogRelay;
                m_pRelayLogPath.Text     = settings.RelayLogsPath;
                m_pLogFetchPOP3.Checked  = settings.LogFetchMessages;
                m_pFetchPOP3LogPath.Text = settings.FetchMessagesLogsPath;
                //m_pServerLogPath.Text    = dr["Server_LogPath"].ToString();
            }
            catch (Exception x) {
                wfrm_sys_Error frm = new wfrm_sys_Error(x, new System.Diagnostics.StackTrace());
                frm.ShowDialog(this);
            }
        }