Example #1
0
 private void SetupSoftwareTab( )
 {
     AddDataPageToTabControl(@"Software", tcMain, new DataPageControl <DprComputerSoftware>(this)
     {
         CompletionMessage = @"Computer Software Query Complete",
         QueryDataCb       = DprComputerSoftware.Generate,
         SetupColumnsCb    = delegate(DataGridView dgv) {
             DgvHelpers.GenerateAllColumns(dgv, typeof(DprComputerSoftware), new List <string> {
                 @"ConnectionStatus"
             });
             DgvHelpers.ConvertToLinkColumn(DgvHelpers.GetColumn(dgv, @"HelpLink"));
             DgvHelpers.ConvertToLinkColumn(DgvHelpers.GetColumn(dgv, @"UrlInfoAbout"));
             DgvHelpers.SetColumnHeader(DgvHelpers.GetColumn(dgv, @"Guid"), @"GUID");
             DgvHelpers.SetColumnHeader(DgvHelpers.GetColumn(dgv, @"Size"), @"Size(MB)");
             DgvHelpers.SetColumnHeader(DgvHelpers.GetColumn(dgv, @"ConnectionStatusString"), @"Connection Status");
             MoveStatusColumnsFirst(dgv);
             foreach (var actionName in DprComputerSoftware.SetupActions(  ).Keys)
             {
                 DgvHelpers.AddButtonColumn(dgv, actionName);
             }
         }
     });
 }