Exemple #1
0
        private void SaveSettings()
        {
            Document doc = new Document();

            Settings.Settings settings = new Settings.Settings();

            Settings.Login login = new Settings.Login();

            login.Jid = new Jid(txtJid.Text);
            login.Password  = txtPassword.Text;
            login.Resource  = txtResource.Text;
            login.Priority  = (int) numPriority.Value;
            login.Port      = int.Parse(txtPort.Text);
            login.Ssl       = chkSSL.Checked;

            doc.ChildNodes.Add(settings);
            settings.Login = login;

            doc.Save(SettingsFilename);
        }
Exemple #2
0
        private void SaveSettings()
        {
            Document doc = new Document();
            Element Settings = new Element("Settings");

            Element Login = new Element("Login");

            Login.ChildNodes.Add(new Element("Jid", txtJid.Text));
            Login.ChildNodes.Add(new Element("Password", txtPassword.Text));
            Login.ChildNodes.Add(new Element("Resource", txtResource.Text));
            Login.ChildNodes.Add(new Element("Priority", numPriority.Value.ToString()));
            Login.ChildNodes.Add(new Element("Port", txtPort.Text));
            Login.ChildNodes.Add(new Element("Ssl", chkSSL.Checked));

            doc.ChildNodes.Add(Settings);
            Settings.ChildNodes.Add(Login);

            doc.Save(SettingsFilename);
        }
Exemple #3
0
		private void SaveSettings()
		{
			Document doc = new Document();
			Element Settings = new Element("Settings");

			Element Login = new Element("Login");

			Login.ChildNodes.Add(new Element("Jid", txtJid.Text));
			Login.ChildNodes.Add(new Element("Password", txtPassword.Text));
			Login.ChildNodes.Add(new Element("Resource", txtResource.Text));
			Login.ChildNodes.Add(new Element("Priority", numPriority.Value.ToString()));
			Login.ChildNodes.Add(new Element("Port", txtPort.Text));
			Login.ChildNodes.Add(new Element("Ssl", chkSSL.Checked));

			doc.ChildNodes.Add(Settings);
			Settings.ChildNodes.Add(Login);
			
			//string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase );
			//string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
			doc.Save(SettingsFilename);
		}