private void SetupLogFilters() { // setup the export filters LogFilters filterhelper = new LogFilters(); frmLogFilters frmfilters = new frmLogFilters(); LogFilterCollection filters = filterhelper.GetFiltersFromRegistry(); frmfilters.SetFilters(filters); Trionic5Tools.SymbolCollection sc = new Trionic5Tools.SymbolCollection(); foreach (Trionic5Tools.SymbolHelper sh in m_trionicFileInformation.SymbolCollection) { if (!sh.Varname.Contains("!")) sc.Add(sh); } frmfilters.SetSymbols(sc); if (frmfilters.ShowDialog() == DialogResult.OK) { filterhelper.SaveFiltersToRegistry(frmfilters.GetFilters()); } }
private void simpleButton3_Click(object sender, EventArgs e) { // setup the export filters LogFilters filterhelper = new LogFilters(); frmLogFilters frmfilters = new frmLogFilters(); LogFilterCollection filters = filterhelper.GetFiltersFromRegistry(); Console.WriteLine("filters: " + filters.Count); frmfilters.SetFilters(filters); if (gridControl1.DataSource != null) { DataTable dt = (DataTable)gridControl1.DataSource; int[] selrows = gridView1.GetSelectedRows(); foreach (int rowhandle in selrows) { DataRowView dv = (DataRowView)gridView1.GetRow(rowhandle); if (dv != null) { SymbolHelper sh = new SymbolHelper(); sh.Varname = dv.Row["SYMBOLNAME"].ToString(); sh.Color = Color.FromArgb(Convert.ToInt32(dv.Row["COLOR"])); _sc.Add(sh); } } } frmfilters.SetSymbols(_sc); if (frmfilters.ShowDialog() == DialogResult.OK) { DialogResult = DialogResult.None; filterhelper.SaveFiltersToRegistry(frmfilters.GetFilters()); } }