public static void findbypubl(string value, bool ispart, DataGridView datagrid, data dat, E_library main) { Regex regexp = new Regex(@"\w*" + value + @"\w*"); data finddata = new data(); if (ispart == false) { foreach (Library lb in dat.lbr) { if (lb.publ == value) { ObjArr.Add(lb, datagrid, finddata); } } } else { foreach (Library lb in dat.lbr) { if (/*Regex.IsMatch(lb.publ, value)*/ regexp.Matches(lb.publ).Count != 0) { ObjArr.Add(lb, datagrid, finddata); } } } main.findresult = finddata; }
public static void delete(int index, data dat) { dat.lbr.RemoveAt(index); }
public static void findbydiappages(int firstpos, int secpos, DataGridView datagrid, data dat, E_library main)//complete { data finddata = new data(); int start; int stop; if (firstpos > secpos) { start = secpos; stop = firstpos; } else { start = firstpos; stop = secpos; } foreach (Library lb in dat.lbr) { if (lb.count_of_pages >= start && lb.count_of_pages <= stop) { ObjArr.Add(lb, datagrid, finddata); } } main.findresult = finddata; }
public static void clear(data dat, DataGridView table) { table.Rows.Clear(); dat.lbr.Clear(); }