public MotronicTools.LogFilterCollection GetFiltersFromRegistry() { LogFilterCollection filters = new LogFilterCollection(); RegistryKey TempKey = null; TempKey = Registry.CurrentUser.CreateSubKey("Software"); try { RegistryKey testKey = TempKey.OpenSubKey("MotronicSuite"); using (RegistryKey Settings = TempKey.CreateSubKey("MotronicSuite\\LogFilters")) { if (Settings != null) { string[] vals = Settings.GetSubKeyNames(); foreach (string a in vals) { try { LogFilter filter = LoadFilter(a); filters.Add(filter); } catch (Exception E) { Console.WriteLine(E.Message); } } } } } catch (Exception E2) { Console.WriteLine(E2.Message); } return filters; }
public void SaveFiltersToRegistry(LogFilterCollection filters) { foreach (LogFilter filter in filters) { SaveFilter(filter); } }
public LogFilterCollectionPropertyDescriptor(LogFilterCollection coll, int idx) : base("#" + idx.ToString(), null) { this.collection = coll; this.index = idx; }
public MotronicTools.LogFilterCollection GetFiltersFromRegistry() { LogFilterCollection filters = new LogFilterCollection(); RegistryKey TempKey = null; TempKey = Registry.CurrentUser.CreateSubKey("Software"); try { RegistryKey testKey = TempKey.OpenSubKey("MotronicSuite"); using (RegistryKey Settings = TempKey.CreateSubKey("MotronicSuite\\LogFilters")) { if (Settings != null) { string[] vals = Settings.GetSubKeyNames(); foreach (string a in vals) { try { LogFilter filter = LoadFilter(a); filters.Add(filter); } catch (Exception E) { Console.WriteLine(E.Message); } } } } } catch (Exception E2) { Console.WriteLine(E2.Message); } return(filters); }
private void simpleButton1_Click(object sender, EventArgs e) { LogFilterCollection filters = (LogFilterCollection)gridControl1.DataSource; if (filters == null) filters = new LogFilterCollection(); LogFilter newfilter = new LogFilter(); newfilter.Index = filters.Count; filters.Add(newfilter); gridControl1.DataSource = filters; gridView1.RefreshData(); gridView1.BestFitColumns(); //gridView1.AddNewRow(); }
public void SetFilters(LogFilterCollection filters) { _filters = filters; }
public void SetFilters(LogFilterCollection filters) { if (filters == null) Console.WriteLine("setting filters as null"); gridControl1.DataSource = filters; gridView1.BestFitColumns(); }