Esempio n. 1
0
 public void SaveUsersConfiguration(string path, System.Xml.XmlNode document)
 {
     Zip zip = new Zip();
     string content = document.InnerXml;
     zip.Save(path, usercfg, content, _Password);
 }
Esempio n. 2
0
 public void SaveUserConfiguration(string path, string username, string email, string password, string privatekey, string publickey, string salt)
 {
     Zip zip = new Zip();
     string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><users><user><username>" + username + "</username><email>" + email + "</email><password><![CDATA[" + password + "]]></password><privatekey><![CDATA[" + privatekey + "]]></privatekey><publickey><![CDATA[" + publickey + "]]></publickey><salt><![CDATA[" + salt + "]]></salt></user></users></root>";
     zip.Save(path, usercfg, content, _Password);
 }
Esempio n. 3
0
 public void SaveUserConfiguration(string path, string content)
 {
     Zip zip = new Zip();
     zip.Save(path, usercfg, content, _Password);
 }
Esempio n. 4
0
 public void SaveMailConfiguration(string path, string content)
 {
     Zip zip = new Zip();
     zip.Save(path, mailcfg, content, _Password);
 }
Esempio n. 5
0
 public void SaveRoleConfiguration(string path, string role, string description)
 {
     Zip zip = new Zip();
     string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><roles><role><name>" + role + "</name><description>" + description + "</description></role></roles></root>";
     zip.Save(path, rolecfg, content, _Password);
 }
Esempio n. 6
0
 public void SaveConnectionConfiguration(string path, string content)
 {
     Zip zip = new Zip();
     zip.Save(path, connectioncfg, content, _Password);
 }
Esempio n. 7
0
 public void SaveMailConfiguration(string path, string mailname, string server, int port, string user, string password)
 {
     Zip zip = new Zip();
     string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><mails><mail><name>" + mailname + "</name><server>" + server + "</server><port>" + port + "</port><user>" + user + "</user><password>" + password + "</password></mail></mails></root>";
     zip.Save(path, mailcfg, content, _Password);
 }
Esempio n. 8
0
 public void SaveConnectionConfiguration(string path, string connectionName, string server, string dbname, string dbuser, string dbpassword, string provider)
 {
     Zip zip = new Zip();
     string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><connections><connection><name>" + connectionName + "</name><server>" + server + "</server><dbname>" + dbname + "</dbname><dbuser>" + dbuser + "</dbuser><dbpass>" + dbpassword + "</dbpass><provider>" + provider + "</provider></connection></connections></root>";
     zip.Save(path, connectioncfg, content, _Password);
 }
Esempio n. 9
0
 public void SaveConnection(string path, System.Xml.XmlNode document)
 {
     Zip zip = new Zip();
     string content = document.InnerXml;
     zip.Save(path, connectioncfg, content, _Password);
 }
Esempio n. 10
0
 public void SaveAccountsConfiguration(string path, string name, string username, string password, string description)
 {
     Zip zip = new Zip();
     string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><accounts><account><name>" + name + "</name><username>" + username + "</username><password>" + password + "</password><description>" + description + "</description></account></accounts></root>";
     zip.Save(path, accountcfg, content, _Password);
 }
Esempio n. 11
0
        public XmlDocument ReadUserConfiguration(string path)
        {
            XmlDocument result = new XmlDocument();

            Zip zip = new Zip();
            result = zip.ReadXML(path, usercfg, _Password);

            return result;
        }
Esempio n. 12
0
        public XmlDocument ReadRoleConfiguration(string path)
        {
            XmlDocument result = new XmlDocument();

            if (User.Current != null)
            {
                Zip zip = new Zip();
                result = zip.ReadXML(path, rolecfg, _Password);
            }
            else
            {
                result = null;
            }

            return result;
        }