Example #1
0
        /// <summary>
        /// Savves system general settings.
        /// </summary>
        /// <param name="confirmSave">Specifies is save confirmation UI is showed.</param>
        private void SaveData(bool confirmSave)
        {
            try{
                System_Settings settings = m_pVirtualServer.SystemSettings;

                List <IPAddress> dnsServers = new List <IPAddress>();
                foreach (ListViewItem item in m_pTabGeneral_DnsServers.Items)
                {
                    dnsServers.Add(IPAddress.Parse(item.Text));
                }
                settings.DnsServers = dnsServers.ToArray();

                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);
            }
        }
Example #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="authType">Specifies authentication type.</param>
 /// <param name="winDomain">Windows domain.</param>
 /// <param name="ldapServer">LDAP server.</param>
 /// <param name="ldapDN">LDAP base DN value.</param>
 internal Auth_Settings(System_Settings sysSettings, ServerAuthenticationType_enum authType, string winDomain, string ldapServer, string ldapDN)
 {
     m_pSysSettings = sysSettings;
     m_AuthType     = authType;
     m_WinDomain    = winDomain;
     m_LdapServer   = ldapServer;
     m_LdapDn       = ldapDN;
 }
Example #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="enabled">Specifies if SIP service is enabled.</param>
 /// <param name="proxyMode">Specifies SIP proxy server opearion mode.</param>
 /// <param name="minExpires">SIP minimum content expire time in seconds.</param>
 /// <param name="bindings">Specifies SIP listening info.</param>
 /// <param name="gateways">SIP gateways.</param>
 internal SIP_Settings(System_Settings sysSettings, bool enabled, SIP_ProxyMode proxyMode, int minExpires, IPBindInfo[] bindings, SIP_GatewayCollection gateways)
 {
     m_pSysSettings = sysSettings;
     m_Enabled      = enabled;
     m_ProxyMode    = proxyMode;
     m_MinExpires   = minExpires;
     m_pBinds       = bindings;
     m_pGateways    = gateways;
 }
Example #4
0
 public ActionResult Edit([Bind(Include = "system_settings_id,system_settings_academy_ip,system_settings_qr_code_available_minute")] System_Settings system_Settings)
 {
     if (ModelState.IsValid)
     {
         db.Entry(system_Settings).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Edit"));
     }
     return(View(system_Settings));
 }
Example #5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="enabled">Specifies if POP3 service is enabled.</param>
 /// <param name="greeting">Greeting text.</param>
 /// <param name="idleTimeout">Session idle timeout seconds.</param>
 /// <param name="maxConnections">Maximum conncurent connections.</param>
 /// <param name="maxConnectionsPerIP">Maximum conncurent connections fro 1 IP address.</param>
 /// <param name="maxBadCommands">Maximum bad commands per session.</param>
 /// <param name="bindings">Specifies POP3 listening info.</param>
 internal POP3_Settings(System_Settings sysSettings, bool enabled, string greeting, int idleTimeout, int maxConnections, int maxConnectionsPerIP, int maxBadCommands, IPBindInfo[] bindings)
 {
     m_pSysSettings   = sysSettings;
     m_Enabled        = enabled;
     m_GreetingText   = greeting;
     m_IdleTimeout    = idleTimeout;
     m_MaxConnections = maxConnections;
     m_MaxConnsPerIP  = maxConnectionsPerIP;
     m_MaxBadCommands = maxBadCommands;
     m_pBinds         = bindings;
 }
Example #6
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="logSMTP">Specifies if SMTP is logged.</param>
 /// <param name="smtpLogsPath">SMTP logs path.</param>
 /// <param name="logPOP3">Specifies if POP3 is logged.</param>
 /// <param name="pop3LogsPath">POP3 logs path.</param>
 /// <param name="logIMAP">Specifies if IMAP is logged.</param>
 /// <param name="imapLogsPath">IMAP logs path.</param>
 /// <param name="logRelay">Specifies if Relay is logged.</param>
 /// <param name="relayLogsPath">Relay logs path.</param>
 /// <param name="logFetchMessages">Specifies if fetch messages is logged.</param>
 /// <param name="fetchMessagesLogsPath">Fetch messages logs path.</param>
 internal Logging_Settings(System_Settings sysSettings, bool logSMTP, string smtpLogsPath, bool logPOP3, string pop3LogsPath, bool logIMAP, string imapLogsPath, bool logRelay, string relayLogsPath, bool logFetchMessages, string fetchMessagesLogsPath)
 {
     m_pSysSettings          = sysSettings;
     m_LogSMTP               = logSMTP;
     m_SmtpLogsPath          = smtpLogsPath;
     m_LogPOP3               = logPOP3;
     m_Pop3LogsPath          = pop3LogsPath;
     m_LogIMAP               = logIMAP;
     m_ImapLogsPath          = imapLogsPath;
     m_LogRelay              = logRelay;
     m_RelayLogsPath         = relayLogsPath;
     m_LogFetchMessages      = logFetchMessages;
     m_FetchMessagesLogsPath = fetchMessagesLogsPath;
 }
Example #7
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            System_Settings system_Settings = db.System_Settings.Find(id);

            if (system_Settings == null)
            {
                return(HttpNotFound());
            }
            return(View(system_Settings));
        }
Example #8
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="enabled">Specifies if SMTP service is enabled.</param>
 /// <param name="greeting">Greeting text.</param>
 /// <param name="defaultDomain">Default domain.</param>
 /// <param name="idleTimeOut">Session idle timeout seconds.</param>
 /// <param name="maxConnections">Maximum conncurent connections.</param>
 /// <param name="maxConnectionsPerIP">Maximum conncurent connections fro 1 IP address.</param>
 /// <param name="maxBadCommands">Maximum bad commands per session.</param>
 /// <param name="maxRecipients">Maximum recipients per message.</param>
 /// <param name="maxMessageSize">Maximum allowed message size.</param>
 /// <param name="maxTransactions">Maximum mail transactions per session.</param>
 /// <param name="requireAuth">Specifies if SMTP server is private server and requires authentication.</param>
 /// <param name="bindings">Specifies SMTP listening info.</param>
 internal SMTP_Settings(System_Settings sysSettings, bool enabled, string greeting, string defaultDomain, int idleTimeOut, int maxConnections, int maxConnectionsPerIP, int maxBadCommands, int maxRecipients, int maxMessageSize, int maxTransactions, bool requireAuth, IPBindInfo[] bindings)
 {
     m_pSysSettings       = sysSettings;
     m_Enabled            = enabled;
     m_GreetingText       = greeting;
     m_DefaultDomain      = defaultDomain;
     m_SessionIdleTimeOut = idleTimeOut;
     m_MaxConnections     = maxConnections;
     m_MaxConnsPerIP      = maxConnectionsPerIP;
     m_MaxBadCommnads     = maxBadCommands;
     m_MaxRecipientPerMsg = maxRecipients;
     m_MaxMessageSize     = maxMessageSize;
     m_MaxTransactions    = maxTransactions;
     m_RequireAuth        = requireAuth;
     m_pBinds             = bindings;
 }
Example #9
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="relayMode">Relay mode.</param>
 /// <param name="smartHostBalanceMode">Specifies how smart hosts will balance.</param>
 /// <param name="smartHosts">Smart hosts.</param>
 /// <param name="idleTimeout">Session idle timeout seconds.</param>
 /// <param name="maxConnections">Maximum conncurent conncetions.</param>
 /// <param name="maxConnectionsPerIP">Maximum conncurent conncetions to one IP address.</param>
 /// <param name="relayInterval">Relay messages interval seconds.</param>
 /// <param name="relayRetryInterval">Relay retry messages interval seconds.</param>
 /// <param name="undeliveredWarning">Specifies after how many minutes delayed delivery message is sent.</param>
 /// <param name="undelivered">Specifies after how many hours undelivered notification message is sent.</param>
 /// <param name="storeUndelivered">Specifies if undelivered messages are stored to "Undelivered" folder in mail store.</param>
 /// <param name="bindings">Specifies SMTP listening info.</param>
 internal Relay_Settings(System_Settings sysSettings, Relay_Mode relayMode, BalanceMode smartHostBalanceMode, Relay_SmartHost[] smartHosts, int idleTimeout, int maxConnections, int maxConnectionsPerIP, int relayInterval, int relayRetryInterval, int undeliveredWarning, int undelivered, bool storeUndelivered, IPBindInfo[] bindings)
 {
     m_pSysSettings          = sysSettings;
     m_RelayMode             = relayMode;
     m_SmartHostsBalanceMode = smartHostBalanceMode;
     m_pSmartHosts           = smartHosts;
     m_IdleTimeout           = idleTimeout;
     m_MaxConnections        = maxConnections;
     m_MaxConnectionsPerIP   = maxConnectionsPerIP;
     m_RelayInterval         = relayInterval;
     m_RelayRetryInterval    = relayRetryInterval;
     m_SendUndelWaringAfter  = undeliveredWarning;
     m_SendUndeliveredAfter  = undelivered;
     m_StoreUndeliveredMsgs  = storeUndelivered;
     m_pBinds = bindings;
 }
Example #10
0
        /// <summary>
        /// Loads system general settings to UI.
        /// </summary>
        private void LoadData()
        {
            try{
                System_Settings settings = m_pVirtualServer.SystemSettings;

                foreach (IPAddress ip in settings.DnsServers)
                {
                    ListViewItem it = new ListViewItem(ip.ToString());
                    m_pTabGeneral_DnsServers.Items.Add(it);
                }

                AddNotifications();
            }
            catch (Exception x) {
                wfrm_sys_Error frm = new wfrm_sys_Error(x, new System.Diagnostics.StackTrace());
                frm.ShowDialog(this);
            }
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="enabled">Specifies if remote messages fetching service is enabled.</param>
 /// <param name="fetchInterval">Messages fetching inteval seconds.</param>
 internal FetchMessages_Settings(System_Settings sysSettings, bool enabled, int fetchInterval)
 {
     m_pSysSettings  = sysSettings;
     m_Enabled       = enabled;
     m_FetchInterval = fetchInterval;
 }
Example #12
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="sysSettings">Reference to system settings.</param>
 /// <param name="delayedDeliveryWarning">Delayed delivery warning message template.</param>
 /// <param name="undelivered">Undelivered notice message template</param>
 internal ServerReturnMessages(System_Settings sysSettings, ServerReturnMessage delayedDeliveryWarning, ServerReturnMessage undelivered)
 {
     m_pSysSettings            = sysSettings;
     m_pDelayedDeliveryWarning = delayedDeliveryWarning;
     m_pUndelivered            = undelivered;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="owner">Owner system settings.</param>
 internal SIP_GatewayCollection(System_Settings owner)
 {
     m_pOwner      = owner;
     m_pCollection = new List <SIP_Gateway>();
 }