public static ConfigModel GetModel() { XMLHelper xml = new XMLHelper(Application.StartupPath + "\\Config.xml"); ConfigModel model = new ConfigModel(); //model.ServerIP = xml.GetItem("MBoxIP", "10.20.31.1"); model.LocalIP = xml.GetItem("LocalIP", "127.0.0.1"); model.Title = xml.GetItem("Title", "调度通讯软件"); model.DBServer = xml.GetItem("DBServer", "."); model.DBName = xml.GetItem("DBName", "BW_VoiceDispatch"); model.DBUserName = xml.GetItem("DBUserName", "sa"); model.DBPassword = xml.GetItem("DBPassword", "kj222"); model.LastUser = xml.GetItem("LastUser", ""); model.AlarmMusicUrl = xml.GetItem("AlarmMusicUrl", "alarm.wav"); model.CheckBoxOnLineInterval = int.Parse(xml.GetItem("CheckBoxOnLineInterval", "60")); model.VideoSize = int.Parse(xml.GetItem("VideoSize", "1")); model.SortByDepartment = bool.Parse(xml.GetItem("SortByDepartment", "false")); model.SortByName = bool.Parse(xml.GetItem("SortByName", "false")); model.SortByNumber = bool.Parse(xml.GetItem("SortByNumber", "false")); model.SortByOnline = bool.Parse(xml.GetItem("SortByOnline", "false")); model.SortInterval = int.Parse(xml.GetItem("SortInterval", "10")); model.ShowColums = int.Parse(xml.GetItem("ShowColums", "5")); model.ShowRows = int.Parse(xml.GetItem("ShowRows", "6")); model.IsAutoStartBySystem = bool.Parse(xml.GetItem("IsAutoStartBySystem", "true")); model.IsAutoLogin = bool.Parse(xml.GetItem("IsAutoLogin", "true")); model.IsDefaultRight = bool.Parse(xml.GetItem("IsDefaultRight", "true")); //model.MaxMeetingMember = int.Parse(xml.GetItem("MaxMeetingMember", "15")); model.AutoFilterMember = bool.Parse(xml.GetItem("AutoFilterMember", "false")); model.TalkLogSearchDays = int.Parse(xml.GetItem("TalkLogSearchDays", "30")); // model.IpBrocastSendInterval = int.Parse(xml.GetItem("IpBrocastSendInterval", "60")); model.WriteSDKLog = bool.Parse(xml.GetItem("WriteSDKLog", "false")); model.IsVideoCall = bool.Parse(xml.GetItem("IsVideoCall", "false")); model.IsIpBrocast = bool.Parse(xml.GetItem("IsIpBrocast", "false")); //model.FontSet4 = xml.GetItem("FontSet4", "12,2,2"); //model.FontSet5 = xml.GetItem("FontSet5", "12,2,2"); //model.FontSet6 = xml.GetItem("FontSet6", "12,2,2"); //model.FontSet7 = xml.GetItem("FontSet7", "12,2,2"); //model.FontSet8 = xml.GetItem("FontSet8", "12,2,2"); model.OutsideNumberMaxLength = int.Parse(xml.GetItem("TalkLogSearchDays", "6")); model.BoxIP = xml.GetItem("BoxIP", ""); model.NVRLoadIP = xml.GetItem("NVRLoadIP", "172.0.0.1"); model.NVRLoadPort = Convert.ToInt32(xml.GetItem("NVRLoadPort", "0")); model.NVRLoadName = xml.GetItem("NVRLoadName", ""); model.NVRLoadPassword = xml.GetItem("NVRLoadPassword", ""); return model; }