public void Load(SystemConfig sys_conf, UserConfig user_conf, LanguageConfig lang_conf) { AutoTimeStampTrigger = sys_conf.AutoTimeStamp.Trigger.Value; AutoTimeStampValue_LastRecvPeriod = sys_conf.AutoTimeStamp.Value_LastRecvPeriod.Value; AutoSaveDirectory = sys_conf.AutoPacketSave.SaveDirectory.Value; AutoSavePrefix = sys_conf.AutoPacketSave.SavePrefix.Value; AutoSaveFormat = sys_conf.AutoPacketSave.SaveFormat.Value; AutoSaveTarget = sys_conf.AutoPacketSave.SaveTarget.Value; AutoSaveTimming = sys_conf.AutoPacketSave.SaveTimming.Value; AutoSaveValue_Interval = sys_conf.AutoPacketSave.SaveValue_Interval.Value; AutoSaveValue_FileSize = sys_conf.AutoPacketSave.SaveValue_FileSize.Value; AutoSaveValue_PacketCount = sys_conf.AutoPacketSave.SaveValue_PacketCount.Value; RawPacketCountLimit = sys_conf.ApplicationCore.RawPacketCountLimit.Value; Packet_ViewPacketCountLimit = sys_conf.ApplicationCore.Packet_ViewPacketCountLimit.Value; Packet_MsgColor = user_conf.PacketView_Packet_MsgColor.Value; Packet_RecvColor = user_conf.PacketView_Packet_RecvColor.Value; Packet_SendColor = user_conf.PacketView_Packet_SendColor.Value; Sequential_WinApiMode = sys_conf.ApplicationCore.Sequential_WinApiMode.Value; Sequential_ViewCharCountLimitEnable = sys_conf.ApplicationCore.Sequential_ViewCharCountLimitEnable.Value; Sequential_ViewCharCountLimit = sys_conf.ApplicationCore.Sequential_ViewCharCountLimit.Value; Sequential_LineNoVisible = sys_conf.ApplicationCore.Sequential_LineNoVisible.Value; MailList.Clear(); foreach (var config in sys_conf.MailList.Value) { MailList.Add(ClassUtil.Clone(config)); } }
private PacketLogWriter LoadOutputWriter() { if ((config_format_type_ != ConfigManager.System.AutoPacketSave.SaveFormat.Value) || (output_format_ == null) || (output_writer_ == null) ) { config_format_type_ = ConfigManager.System.AutoPacketSave.SaveFormat.Value; switch (config_format_type_) { case AutoPacketSaveFormatType.Ratatoskr: output_format_ = new FileFormat.PacketLog_Rtcap.FileFormatClassImpl(); break; case AutoPacketSaveFormatType.CSV: output_format_ = new FileFormat.PacketLog_Csv.FileFormatClassImpl(); break; case AutoPacketSaveFormatType.Binary: output_format_ = new FileFormat.PacketLog_Binary.FileFormatClassImpl(); break; } if (output_format_ != null) { output_writer_ = output_format_.CreateWriter() as PacketLogWriter; output_option_ = output_format_.CreateWriterOption(); } } return(output_writer_); }
public CBoxItem_SaveFormat(AutoPacketSaveFormatType value) { Value = value; }