Skip to content

Commit

Permalink
Add new optional columns to card viewer (hidden by default)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Feb 14, 2023
1 parent e49dacf commit 2e920a9
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 80 deletions.
37 changes: 32 additions & 5 deletions src/KKManager/Windows/Content/CardWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/KKManager/Windows/Content/CardWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public CardWindow()

Details(this, EventArgs.Empty);

((OLVColumn)listView.Columns[listView.Columns.Count - 1]).FillsFreeSpace = true;
//((OLVColumn)listView.Columns[listView.Columns.Count - 1]).FillsFreeSpace = true;

_typedListView = new TypedObjectListView<Card>(listView);

Expand All @@ -65,6 +65,15 @@ public CardWindow()
};

olvColumnRelativeFilename.AspectGetter = rowObject => rowObject is Card card ? card.Location.FullName.Substring(_currentDirectory.FullName.Length).TrimStart('/', '\\') : rowObject;
olvColumnMissingMods.AspectGetter = rowObject => rowObject is Card card ? card.MissingPlugins?.Length ?? 0 + card.MissingZipmods?.Length ?? 0 : 0;

#if DEBUG
foreach (var column in listView.AllColumns)
{
if (string.IsNullOrEmpty(column.ToolTipText))
Debug.Fail(column.ToolTipText);
}
#endif

ListTools.SetUpSearchBox(listView, toolStripTextBoxSearch);
}
Expand Down
Loading

0 comments on commit 2e920a9

Please sign in to comment.