Пример #1
0
        public CConfigConnection()
        {
            useSqlite = false;
            CConfig cfg = new CConfig();
            if (!cfg.Exist())
                cfg.InitSQLDefaults();

            Server = cfg.Read("Server");
            Database = cfg.Read("Database");
            Database_Manual = cfg.Read("Database_Manual");
            User_Id = cfg.Read("User_Id");
            Password = cfg.Read("Password");
            Table_Manual = cfg.Read("Table_Manual");
            Table_Yieldlabel = cfg.Read("Table_Yieldlabel");
        }
Пример #2
0
        void dgView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Delete)
            {
                CConfig del = new CConfig(xmlfilename);
                String param = dgView.SelectedCells[0].Value.ToString();

                del.DeleteParameter(param);
                dgView.Rows.Clear();
                foreach (CParameter x in del.Read())
                {
                    dgView.Rows.Add();
                    dgView.Rows[dgView.Rows.Count - 2].Cells[0].Value = x.Name;
                    dgView.Rows[dgView.Rows.Count - 2].Cells[1].Value = x.Value;
                }
            }
        }