Пример #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            DBConfigure  form   = new DBConfigure();
            DialogResult result = form.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                SaveInReg(
                    new Dictionary <string, string>()
                {
                    { "server", form.Server },
                    { "uid", form.User },
                    { "passw", form.Password },
                    { "database", form.Database }
                });
                string dbHost  = form.Server;
                string dbUID   = form.User;
                string dbPassw = form.Password;
                string dbName  = form.Database;
                ResetEverything();
                getFlyID(out flyIDCurrent, out flyName, out flyStart);
                ListeningInitAndStart();
                UpdateInfo();
                InitializeConnection(dbHost, dbUID, dbPassw, dbName);
            }
        }
Пример #2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            DBConfigure  form   = new DBConfigure();
            DialogResult result = form.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                SaveInReg(
                    new Dictionary <string, string>()
                {
                    { "server", form.Server },
                    { "uid", form.User },
                    { "passw", form.Password },
                    { "database", form.Database }
                });
                string dbHost  = form.Server;
                string dbUID   = form.User;
                string dbPassw = form.Password;
                string dbName  = form.Database;
                InitializeConnection(dbHost, dbUID, dbPassw, dbName);
            }
        }