Пример #1
0
        public static bool WriteModel(ConfigModel model)
        {
            XMLHelper xml = new XMLHelper(Application.StartupPath + "\\Config.xml");

            xml.SetItem("LocalIP", model.LocalIP);
            xml.SetItem("DBServer", model.DBServer);
            xml.SetItem("DBName", model.DBName);
            xml.SetItem("DBUserName", model.DBUserName);
            xml.SetItem("DBPassword", model.DBPassword);
            xml.SetItem("LastUser", model.LastUser);
            xml.SetItem("SortByDepartment", model.SortByDepartment.ToString());
            xml.SetItem("SortByName", model.SortByName.ToString());
            xml.SetItem("SortByNumber", model.SortByNumber.ToString());
            xml.SetItem("SortByOnline", model.SortByOnline.ToString());
            xml.SetItem("ShowColums", model.ShowColums.ToString());
            xml.SetItem("ShowRows", model.ShowRows.ToString());
            xml.SetItem("BoxIP", model.BoxIP);
            xml.SetItem("VideoSize", model.VideoSize.ToString());
            return true;
        }