Skip to content

Commit

Permalink
Update Ship Catalog columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed Apr 15, 2017
1 parent e41c424 commit b410909
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public class ShipCatalogSortWorker : ViewModel
public static readonly SortableColumn HPColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_MaxHP, KeySelector = x => x.HP.Maximum, DefaultIsDescending = true, };
public static readonly SortableColumn ViewRangeColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ViewRange, KeySelector = x => x.ViewRange, DefaultIsDescending = true, };
public static readonly SortableColumn EvasionColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Evasion, KeySelector = x => x.Evasion.Current, DefaultIsDescending = true, };
public static readonly SortableColumn AntiSubColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ASW, KeySelector = x => x.AntiSub.Current, DefaultIsDescending = true, };
/* public static readonly SortableColumn ASWColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ASW, KeySelector = x => x.ASW, DefaultIsDescending = true, }; */
public static readonly SortableColumn ASWColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ASW, KeySelector = x => x.AntiSub.Current, DefaultIsDescending = true, };
public static readonly SortableColumn SpeedColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Speed, KeySelector = x => x.Speed, DefaultIsDescending = true, };
public static readonly SortableColumn TimeToRepairColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_TTR, KeySelector = x => x.TimeToRepair.Ticks, DefaultIsDescending = true, };

public static SortableColumn[] Columns { get; set; }
Expand All @@ -55,8 +56,8 @@ static ShipCatalogSortWorker()
HPColumn,
ViewRangeColumn,
EvasionColumn,
AntiSubColumn,
/* ASWColumn, */
SpeedColumn,
ASWColumn,
TimeToRepairColumn,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@
<controls:CollapsibleGridViewColumn Width="64" Visibility="{Binding ShowAdditionalStats, Converter={StaticResource BooleanToVisibilityConverterKey}}">
<GridViewColumnHeader>
<metro2:SortButton MethodName="Sort"
MethodParameter="{x:Static viewModels:ShipCatalogSortWorker.AntiSubColumn}">
MethodParameter="{x:Static viewModels:ShipCatalogSortWorker.ASWColumn}">
<TextBlock Text="{Binding Resources.ShipCatalog_Column_ASW, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</metro2:SortButton>
</GridViewColumnHeader>
Expand Down Expand Up @@ -899,7 +899,7 @@
<GridViewColumn Width="45">
<GridViewColumn.Header>
<metro2:SortButton MethodName="Sort"
MethodParameter="{x:Static viewModels:ShipCatalogSortWorker.ASWColumn}">
MethodParameter="{x:Static viewModels:ShipCatalogSortWorker.SpeedColumn}">
<TextBlock Text="{Binding Resources.ShipCatalog_Column_Speed, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
ToolTip="{Binding Resources.ShipCatalog_Column_Speed_ToolTip, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</metro2:SortButton>
Expand Down

0 comments on commit b410909

Please sign in to comment.