예제 #1
0
 private void FillList()
 {
     Programs.RefreshCache();
     _listPrograms = Programs.GetListDeep();
     if (!PrefC.IsODHQ)
     {
         _listPrograms.RemoveAll(x => x.ProgName == ProgramName.AvaTax.ToString());
     }
     gridProgram.BeginUpdate();
     gridProgram.ListGridColumns.Clear();
     gridProgram.ListGridColumns.Add(new GridColumn("Enabled", 55, HorizontalAlignment.Center));
     gridProgram.ListGridColumns.Add(new GridColumn("Program Name", -1));
     gridProgram.ListGridRows.Clear();
     foreach (Program prog in _listPrograms)
     {
         GridRow row = new GridRow()
         {
             Tag = prog
         };
         Color color = Color.FromArgb(230, 255, 238);
         row.ColorBackG = prog.Enabled ? color : row.ColorBackG;
         GridCell cell = new GridCell(prog.Enabled ? "X" : "");
         row.Cells.Add(cell);
         row.Cells.Add(prog.ProgDesc);
         gridProgram.ListGridRows.Add(row);
     }
     gridProgram.EndUpdate();
 }
예제 #2
0
 private void FillList()
 {
     Programs.RefreshCache();
     _listPrograms = Programs.GetListDeep();
     gridProgram.BeginUpdate();
     gridProgram.Columns.Clear();
     gridProgram.Columns.Add(new ODGridColumn("Enabled", 55, HorizontalAlignment.Center));
     gridProgram.Columns.Add(new ODGridColumn("Program Name", -1));
     gridProgram.Rows.Clear();
     foreach (Program prog in _listPrograms)
     {
         ODGridRow row = new ODGridRow()
         {
             Tag = prog
         };
         Color color = Color.FromArgb(230, 255, 238);
         row.ColorBackG = prog.Enabled ? color : row.ColorBackG;
         ODGridCell cell = new ODGridCell(prog.Enabled ? "X" : "");
         row.Cells.Add(cell);
         row.Cells.Add(prog.ProgDesc);
         gridProgram.Rows.Add(row);
     }
     gridProgram.EndUpdate();
 }