public static void Del(IWindowEntry win) { TbHideWin db = new TbHideWin(); db.Open(); db.ExeSQL(string.Format("delete from {0} where name='{1}' and title='{2}'", db.TB_HIDEWIN, win.ProcessName, win.Title)); db.Close(); }
public static void Add(IWindowEntry win) { Del(win); TbHideWin db = new TbHideWin(); db.Open(); db.ExeSQL(string.Format("insert into {0} (name,title) values('{1}','{2}')", db.TB_HIDEWIN, win.ProcessName, win.Title)); db.Close(); }
public static List <TbHideWinEntry> GetAll() { List <TbHideWinEntry> list = new List <TbHideWinEntry>(); TbHideWin db = new TbHideWin(); db.Open(); var rd = db.ExeQuerySQL(string.Format("select name,title from {0}", db.TB_HIDEWIN)); while (rd.Read()) { list.Add(new TbHideWinEntry(rd.GetString(0), rd.GetString(1))); } db.Close(); return(list); }