using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SVS_XDWooSync_Isolcasa
{
    public partial class frmSettings : Form
    {
        public frmSettings()
        {
            InitializeComponent();
        }

        private void frmSettings_Load(object sender, EventArgs e)
        {
            this.txtCK.Text = Properties.Settings.Default.woock;
            this.txtCS.Text = Properties.Settings.Default.woocs;
            this.txtsite.Text = Properties.Settings.Default.woourl;

            this.txtMySQLServer.Text = Properties.Settings.Default.xdhost;
            this.txtMySQLUser.Text = Properties.Settings.Default.xduser;
            this.txtMySQLPass.Text = Properties.Settings.Default.xdpass;
            this.txtMySQLPort.Text = Properties.Settings.Default.xdport;
        }

        private void btSave_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.woock = this.txtCK.Text;
            Properties.Settings.Default.woocs = this.txtCS.Text;
            Properties.Settings.Default.woourl= this.txtsite.Text;

            Properties.Settings.Default.xdhost = this.txtMySQLServer.Text;
            Properties.Settings.Default.xduser = this.txtMySQLUser.Text;
            Properties.Settings.Default.xdpass = this.txtMySQLPass.Text;
            Properties.Settings.Default.xdport = this.txtMySQLPort.Text;

            Properties.Settings.Default.Save();
        }

        private void btCancel_Click(object sender, EventArgs e)
        {
            this.Close();

        }
    }
}
