示例#1
0
文件: Presets.cs 项目: RH-Code/GAPP
 private void initDatabase(Utils.DBCon dbcon)
 {
     object o = dbcon.ExecuteScalar("SELECT name FROM sqlite_master WHERE type='table' AND name='preset'");
     if (o == null || o.GetType() == typeof(DBNull))
     {
         dbcon.ExecuteNonQuery("create table 'preset' (name text)");
     }
     o = dbcon.ExecuteScalar("SELECT name FROM sqlite_master WHERE type='table' AND name='forms'");
     if (o == null || o.GetType() == typeof(DBNull))
     {
         dbcon.ExecuteNonQuery("create table 'forms' (preset text, plugintype text, x integer, y integer, w integer, h integer, visible integer, customtag text)");
     }
     else if (!dbcon.ColumnExists("forms", "customtag"))
     {
         dbcon.ExecuteNonQuery("alter table 'forms' add customtag text");
     }
 }