public static void Preloading() { Log.WriteAppStart("FileOutboundAdapter"); string FileName = Application.StartupPath + "\\" + FileOutboundAdapterConfigMgt.FileName; //FileOutboundAdapterConfigMgt.FileOutAdapterConfig = FileOutboundAdapterConfigMgt.BuildSampleConfig(); //FileOutboundAdapterConfigMgt.Save(FileName); if (!FileOutboundAdapterConfigMgt.Load(FileName)) { Log.Write(LogType.Error, "Load configuration failed. \r\n" + FileName + "\r\n" + FileOutboundAdapterConfigMgt.LastException.Message); } }
public static void PreLoading() { //LoadConfigXMLFile(); string FileName = Application.StartupPath + "\\" + FileOutboundAdapterConfigMgt.FileName; if (!FileOutboundAdapterConfigMgt.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) { FileOutboundAdapterConfigMgt.Save(FileName); } } else { //log.LogLevel = FileOutboundAdapterConfigMgt.FileOutAdapterConfig.OutGeneralParams.LogLevel; } //ConfigMain cm = new ConfigMain(); //IOutboundRule[] rs = cm.GetRules(); }