Ejemplo n.º 1
0
        public void Registry_Get()
        {
            RegistryKey registry = Registry.CurrentUser;
            RegistryKey key      = registry.CreateSubKey("Doc_Stol");

            try
            {
                DS = key.GetValue("DS").ToString();
                IC = key.GetValue("IC").ToString();
                UI = key.GetValue("UI").ToString();
                PW = key.GetValue("PW").ToString();
            }
            catch
            {
                ConnectionForm conFrm = new ConnectionForm();
                conFrm.ShowDialog();
            }
            finally
            {
                sql.ConnectionString = "Data Source = " + DS + "; Initial Catalog = " + IC + "; Persist Security Info = true" + "; User ID = " + UI + "; Password = \"" + PW + "\"";
            }
        }
Ejemplo n.º 2
0
        private void конфигурацияПодключенияToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConnectionForm conFrm = new ConnectionForm();

            conFrm.ShowDialog();
        }