private async void btnSaveSettins_Click(object sender, EventArgs e) { Settings.AddUpdateAppSettings("server", txtServer.Text); Settings.AddUpdateAppSettings("db_name", txtDbName.Text); Settings.AddUpdateAppSettings("port", txtPort.Text); Settings.AddUpdateAppSettings("user", txtDbUser.Text); Settings.AddUpdateAppSettings("password", txtDbPassword.Text); Settings.AddUpdateAppSettings("appuser", txtAppUser.Text); db = new ServerDatabase(); await OpenConnection(); }
private void Init() { InitializeComponent(); // Settings tab txtServer.Text = Settings.ReadSetting("server"); txtDbName.Text = Settings.ReadSetting("db_name"); txtPort.Text = Settings.ReadSetting("port"); txtDbUser.Text = Settings.ReadSetting("user"); txtDbPassword.Text = Settings.ReadSetting("password"); txtAppUser.Text = Settings.ReadSetting("appuser"); // Initialize private components sc = new SerialCode(); stopWatch = new Stopwatch(); db = new ServerDatabase(); Passwords = new List <Code>(); ActualRow = new Dictionary <string, int>() { }; }
public xml_importer() { InitializeComponent(); XmlContent = new List <object>(); connection = new ServerDatabase(); }