예제 #1
0
        public static void Preloading()
        {
            Log.WriteAppStart("SocketInboundAdapter");

            string FileName = Application.StartupPath + "\\" + SocketInboundAdapterConfigMgt.FileName;

            //SocketInboundAdapterConfigMgt.SocketInAdapterConfig = SocketInboundAdapterConfigMgt.BuildSampleConfig();
            //SocketInboundAdapterConfigMgt.Save(FileName);

            if (!SocketInboundAdapterConfigMgt.Load(FileName))
            {
                Log.Write(LogType.Error, "Load configuration failed. \r\n" + FileName + "\r\n" + SocketInboundAdapterConfigMgt.LastException.Message);
            }
        }
예제 #2
0
        public static void PreLoading()
        {
            //LoadConfigXMLFile();
            string FileName = Application.StartupPath + "\\" + SocketInboundAdapterConfigMgt.FileName;

            if (!SocketInboundAdapterConfigMgt.Load(FileName))
            {
                log.Write(LogType.Error, "Cannot Load Configuration file: " + FileName);
                if (MessageBox.Show("Cannot load configuration file. Do you want to create an empty configuration file?",
                                    "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                {
                    SocketInboundAdapterConfigMgt.Save(FileName);
                }
            }
            else
            {
                //log.LogLevel = SocketInboundAdapterConfigMgt.SocketInAdapterConfig.InGeneralParams.LogLevel;
            }
        }