You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.3 KiB
63 lines
2.3 KiB
<h3>WeaponTable</h3> |
|
|
|
|
|
<MudDataGrid Items="@_entityWeapons" SortMode="SortMode.Multiple" Filterable="true"> |
|
<Columns> |
|
<PropertyColumn Property="x => x.Range" Title="Range"/> |
|
<PropertyColumn Property="x => x.Damage" Title="Damage"/> |
|
<PropertyColumn Property="x => x.AttacksPerSecond" Title="Attacks Per Second"/> |
|
<PropertyColumn Property="x => x.Parent.GetName()" Title="Owner Name"/> |
|
|
|
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/> |
|
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/> |
|
</Columns> |
|
</MudDataGrid> |
|
|
|
@{ |
|
/** |
|
|
|
<MudDataGrid T="Element" MultiSelection="true" Items="@Elements" SortMode="SortMode.Multiple" Filterable="true" QuickFilter="@_quickFilter" |
|
Hideable="true" RowClick="@RowClicked" RowContextMenuClick="RowRightClicked" SelectedItemsChanged="@SelectedItemsChanged"> |
|
<ToolBarContent> |
|
<MudText Typo="Typo.h6">Periodic Elements</MudText> |
|
<MudSpacer /> |
|
<MudTextField @bind-Value="_searchString" Placeholder="Search" Adornment="Adornment.Start" Immediate="true" |
|
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField> |
|
</ToolBarContent> |
|
<Columns> |
|
<SelectColumn T="Element" /> |
|
<PropertyColumn Property="x => x.Number" Title="Nr" Sortable="false" Filterable="false" /> |
|
<PropertyColumn Property="x => x.Sign" /> |
|
<PropertyColumn Property="x => x.Name" SortBy="@_sortBy" /> |
|
<PropertyColumn Property="x => x.Position" /> |
|
<PropertyColumn Property="x => x.Molar" Title="Molar mass" /> |
|
<PropertyColumn Property="x => x.Group" Title="Category" /> |
|
</Columns> |
|
<PagerContent> |
|
<MudDataGridPager T="Element" /> |
|
</PagerContent> |
|
</MudDataGrid> |
|
|
|
|
|
<div class="d-flex flex-wrap mt-4"> |
|
<MudSwitch @bind-Value="@_sortNameByLength" Color="Color.Primary">Sort Name Column By Length</MudSwitch> |
|
</div> |
|
*/ |
|
} |
|
|
|
|
|
|
|
@code { |
|
List<EntityWeaponModel> _entityWeapons; |
|
|
|
protected override void OnInitialized() |
|
{ |
|
base.OnInitialized(); |
|
|
|
_entityWeapons = DATA.Get() |
|
.SelectMany(e => e.Value.EntityParts) |
|
.OfType<EntityWeaponModel>() |
|
.ToList(); |
|
} |
|
|
|
} |