Exemplo n.º 1
0
        public static ServiceMainSettings GetConfig()
        {
            ServiceMainSettings result = (ServiceMainSettings)ConfigurationBroker.GetSection(ServiceMainConfigName);

            if (result == null)
            {
                result = new ServiceMainSettings();
            }

            return(result);
        }
Exemplo n.º 2
0
        private void CreateAddIns()
        {
            TypeConfigurationCollection addIns = ServiceMainSettings.GetConfig().AddIns;

            foreach (TypeConfigurationElement ele in addIns)
            {
                TabPage page = new TabPage(ele.Description);

                page.Tag = new TabPageTag(ele);

                this.tabControlClient.TabPages.Add(page);
            }
        }
Exemplo n.º 3
0
        private void WriteDebugString(string strMessage, EventLogEntryType eventType, int eventId)
        {
            try
            {
                if (ServiceMainSettings.GetConfig().OutputDebugString)
                {
                    Trace.WriteLine(strMessage);
                }

                EventLog.WriteEntry(ServiceMainSettings.SERVICE_NAME, strMessage, eventType, eventId);
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 4
0
 private ThreadParamCollection GetAllThreadParams()
 {
     return(ServiceMainSettings.GetConfig().ThreadParams);
 }