mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added icons to the supply crate grid
This commit is contained in:
parent
4f5c1ddee6
commit
9ddf8465cb
14 changed files with 266 additions and 126 deletions
|
|
@ -239,9 +239,6 @@
|
|||
<Compile Include="Windows\ServerMonitorWindow.xaml.cs">
|
||||
<DependentUpon>ServerMonitorWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\SupplyCrateOverridesWindow.xaml.cs">
|
||||
<DependentUpon>SupplyCrateOverridesWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\VersionFeedWindow.xaml.cs">
|
||||
<DependentUpon>VersionFeedWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
|
@ -314,6 +311,11 @@
|
|||
<Compile Include="Windows\SettingsWindow.xaml.cs">
|
||||
<DependentUpon>SettingsWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Resource Include="Art\StatusBad.ico" />
|
||||
<Resource Include="Art\StatusGood.ico" />
|
||||
<Resource Include="Art\StatusWarning.ico" />
|
||||
<Resource Include="Art\Collapse.ico" />
|
||||
<Resource Include="Art\Expand.ico" />
|
||||
<Content Include="GameData\Genesis2.gamedata">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
@ -417,10 +419,6 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Windows\SupplyCrateOverridesWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Windows\VersionFeedWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
|||
BIN
src/ARKServerManager/Art/Collapse.ico
Normal file
BIN
src/ARKServerManager/Art/Collapse.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
src/ARKServerManager/Art/Expand.ico
Normal file
BIN
src/ARKServerManager/Art/Expand.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
src/ARKServerManager/Art/StatusBad.ico
Normal file
BIN
src/ARKServerManager/Art/StatusBad.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
src/ARKServerManager/Art/StatusGood.ico
Normal file
BIN
src/ARKServerManager/Art/StatusGood.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
src/ARKServerManager/Art/StatusWarning.ico
Normal file
BIN
src/ARKServerManager/Art/StatusWarning.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
|
|
@ -3,6 +3,10 @@ using ServerManagerTool.Common.Model;
|
|||
using ServerManagerTool.Lib.ViewModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Windows;
|
||||
|
||||
|
|
@ -37,14 +41,16 @@ namespace ServerManagerTool.Lib
|
|||
errors.Add($"Missing Supply Crate Item Weight: Crate '{supplyCrate.SupplyCrateClassString}'; Set '{itemSet.SetName}'; Entry '{itemEntry.ItemEntryName}'; Item '{itemEntry.ItemClassStrings[index]}'.");
|
||||
|
||||
itemEntry.Items.Add(new SupplyCrateItemEntrySettings {
|
||||
ItemClassString = itemEntry.ItemClassStrings[index],
|
||||
ItemWeight = itemsWeight,
|
||||
});
|
||||
ItemClassString = itemEntry.ItemClassStrings[index],
|
||||
ItemWeight = itemsWeight,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Update();
|
||||
|
||||
return errors.ToArray();
|
||||
}
|
||||
|
||||
|
|
@ -72,6 +78,14 @@ namespace ServerManagerTool.Lib
|
|||
public void UpdateForLocalization()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
IsEnabled = this.Count > 0;
|
||||
|
||||
foreach (var supplyCrate in this)
|
||||
supplyCrate.Update(recursive);
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
@ -167,7 +181,10 @@ namespace ServerManagerTool.Lib
|
|||
public override void InitializeFromINIValue(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
Update();
|
||||
return;
|
||||
}
|
||||
|
||||
var kvPair = value.Split(new[] { '=' }, 2);
|
||||
var kvValue = kvPair[1].Trim(' ');
|
||||
|
|
@ -186,7 +203,34 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public string DisplayName => GameData.FriendlySupplyCrateNameForClass(SupplyCrateClassString);
|
||||
|
||||
public bool IsValid => !string.IsNullOrWhiteSpace(SupplyCrateClassString) && ItemSets.Count > 0;
|
||||
public string DisplayNameFull
|
||||
{
|
||||
get
|
||||
{
|
||||
var modName = GameData.FriendlySupplyCrateModNameForClass(SupplyCrateClassString); ;
|
||||
return $"{(string.IsNullOrWhiteSpace(modName) ? string.Empty : $"({modName}) ")}{DisplayName}";
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsViewValid => !string.IsNullOrWhiteSpace(SupplyCrateClassString) && (ItemSets?.Count ?? 0) > 0;
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(SupplyCrateOverride), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
if (recursive && ItemSets != null)
|
||||
{
|
||||
foreach (var itemSet in ItemSets)
|
||||
itemSet.Update(recursive);
|
||||
}
|
||||
|
||||
ValidStatus = IsViewValid ? (ItemSets.Any(i => i.ValidStatus == "N") ? "N" : (ItemSets.Any(i => i.ValidStatus == "W") ? "W" : "Y")) : "N";
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
@ -280,7 +324,27 @@ namespace ServerManagerTool.Lib
|
|||
return base.ToComplexINIValue(false);
|
||||
}
|
||||
|
||||
public bool IsValid => ItemEntries.Count > 0;
|
||||
public string DisplayNameFull => SetName;
|
||||
|
||||
public bool IsViewValid => (ItemEntries?.Count ?? 0) > 0;
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(SupplyCrateItemSet), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
if (recursive && ItemEntries != null)
|
||||
{
|
||||
foreach (var itemEntry in ItemEntries)
|
||||
itemEntry.Update(recursive);
|
||||
}
|
||||
|
||||
ValidStatus = IsViewValid ? (ItemEntries.Any(i => i.ValidStatus == "N") ? "N" : (ItemEntries.Any(i => i.ValidStatus == "W") ? "W" : "Y")) : "N";
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
@ -411,8 +475,30 @@ namespace ServerManagerTool.Lib
|
|||
return base.ToComplexINIValue(false);
|
||||
}
|
||||
|
||||
public string DisplayNameFull => ItemEntryName;
|
||||
|
||||
public float ChanceToBeBlueprint => ForceBlueprint ? 1 : ChanceToBeBlueprintOverride;
|
||||
|
||||
public bool IsModelValid => ItemClassStrings.Count > 0 && ItemClassStrings.Count == ItemsWeights.Count;
|
||||
|
||||
public bool IsViewValid => Items.Count > 0;
|
||||
public bool IsViewValid => (Items?.Count ?? 0) > 0;
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(SupplyCrateItemSetEntry), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
if (recursive && Items != null)
|
||||
{
|
||||
foreach (var item in Items)
|
||||
item.Update();
|
||||
}
|
||||
|
||||
ValidStatus = IsViewValid ? (Items.Any(i => i.ValidStatus == "N") ? "N" : (Items.Any(i => i.ValidStatus == "W") ? "W" : "Y")) : "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,29 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
set { SetValue(ItemWeightProperty, value); }
|
||||
}
|
||||
|
||||
public string DisplayName => GameData.FriendlySupplyCrateNameForClass(ItemClassString);
|
||||
public string DisplayName => GameData.FriendlyItemNameForClass(ItemClassString);
|
||||
|
||||
public bool IsValid => !string.IsNullOrWhiteSpace(ItemClassString);
|
||||
public string DisplayNameFull
|
||||
{
|
||||
get
|
||||
{
|
||||
var modName = GameData.FriendlyItemModNameForClass(ItemClassString); ;
|
||||
return $"{(string.IsNullOrWhiteSpace(modName) ? string.Empty : $"({modName}) ")}{DisplayName}";
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsViewValid => !string.IsNullOrWhiteSpace(ItemClassString);
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(SupplyCrateItemEntrySettings), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
ValidStatus = IsViewValid ? (GameData.HasItemForClass(ItemClassString) ? "Y" : "W") : "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<u style="font-size: .9em;">CHANGES</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Server Settings - Supply Crate Section - Added indicator icons to each grid row, for better troubleshooting of possible issues.</li>
|
||||
<li>ru-RU Translation file updated.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<u style="font-size: .9em;">CHANGES</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Server Settings - Supply Crate Section - Added indicator icons to each grid row, for better troubleshooting of possible issues.</li>
|
||||
<li>ru-RU Translation file updated.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
<vm:DinoLevelIndexToDisplayLevelConverter x:Key="DinoLevelIndexToDisplayLevelConverter" />
|
||||
<vm:ExtinctionEventDateConverter x:Key="ExtinctionEventDateConverter"/>
|
||||
<vm:ExtinctionEventTimeIntervalConverter x:Key="ExtinctionEventTimeIntervalConverter"/>
|
||||
<vm:MapNameValueConverter x:Key="MapNameValueConverter"/>
|
||||
<vm:OfficialDifficultyValueConverter x:Key="OfficialDifficultyValueConverter" />
|
||||
<vm:PlayerLevelIndexToDisplayLevelConverter x:Key="PlayerLevelIndexToDisplayLevelConverter" />
|
||||
<vm:ResourceNameValueConverter x:Key="ResourceNameValueConverter" />
|
||||
|
|
@ -5089,10 +5088,10 @@
|
|||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="200"/>
|
||||
<RowDefinition Height="200"/>
|
||||
<RowDefinition Height="200"/>
|
||||
<RowDefinition Height="200"/>
|
||||
<RowDefinition MinHeight="200"/>
|
||||
<RowDefinition MinHeight="200"/>
|
||||
<RowDefinition MinHeight="200"/>
|
||||
<RowDefinition MinHeight="200"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
|
|
@ -5121,7 +5120,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="SupplyCratesGrid" ItemsSource="{Binding ConfigOverrideSupplyCrateItems}" SelectedItem="{Binding Path=SelectedSupplyCrateOverride, ElementName=SettingsControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="SupplyCratesGrid" ItemsSource="{Binding ConfigOverrideSupplyCrateItems}" SelectedItem="{Binding Path=SelectedSupplyCrateOverride, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="SupplyCratesGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5138,6 +5137,28 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="*" MinWidth="100" CanUserSort="True" SortMemberPath="DisplayName">
|
||||
<DataGridTemplateColumn.Header>
|
||||
|
|
@ -5145,24 +5166,24 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseSupplyCrateList, ElementName=SettingsControl}" SelectedValue="{Binding SupplyCrateClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseSupplyCrateList, ElementName=SettingsControl}" SelectedValue="{Binding SupplyCrateClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnSourceUpdated=True}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinItemSets}">
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinItemSets, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_Crate_MinItemSetsColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_Crate_MinItemSetsColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxItemSets}">
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxItemSets, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_Crate_MaxItemSetsColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_Crate_MaxItemSetsColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding NumItemSetsPower}">
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding NumItemSetsPower, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_Crate_NumItemSetsPowerColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_Crate_NumItemSetsPowerColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
|
@ -5252,7 +5273,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="SupplyCrateItemSetsGrid" ItemsSource="{Binding Path=SelectedSupplyCrateOverride.ItemSets, ElementName=SettingsControl}" SelectedItem="{Binding Path=SelectedSupplyCrateItemSet, ElementName=SettingsControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="SupplyCrateItemSetsGrid" ItemsSource="{Binding Path=SelectedSupplyCrateOverride.ItemSets, ElementName=SettingsControl}" SelectedItem="{Binding Path=SelectedSupplyCrateItemSet, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="SupplyCratesGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5269,32 +5290,54 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="*" MinWidth="100" Binding="{Binding SetName}" >
|
||||
<DataGridTextColumn Width="*" MinWidth="100" Binding="{Binding SetName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSet_NameColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSet_NameColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinNumItems}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinNumItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSet_MinNumItemsColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSet_MinNumItemsColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxNumItems}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxNumItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSet_MaxNumItemsColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSet_MaxNumItemsColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding NumItemsPower}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding NumItemsPower, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSet_NumItemsPowerColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSet_NumItemsPowerColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding SetWeight}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding SetWeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSet_SetWeightColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSet_SetWeightColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
|
@ -5342,7 +5385,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="SupplyCrateItemSetEntriesGrid" ItemsSource="{Binding Path=SelectedSupplyCrateItemSet.ItemEntries, ElementName=SettingsControl}" SelectedItem="{Binding Path=SelectedSupplyCrateItemSetEntry, ElementName=SettingsControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="SupplyCrateItemSetEntriesGrid" ItemsSource="{Binding Path=SelectedSupplyCrateItemSet.ItemEntries, ElementName=SettingsControl}" SelectedItem="{Binding Path=SelectedSupplyCrateItemSetEntry, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="SupplyCratesGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5359,38 +5402,60 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="*" MinWidth="100" Binding="{Binding ItemEntryName}" >
|
||||
<DataGridTextColumn Width="*" MinWidth="100" Binding="{Binding ItemEntryName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_NameColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_NameColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinQuantity}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinQuantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MinQuantityColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MinQuantityColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxQuantity}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxQuantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MaxQuantityColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MaxQuantityColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinQuality}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MinQuality, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MinQualityColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MinQualityColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxQuality}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding MaxQuality, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MaxQualityColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_MaxQualityColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding EntryWeight}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding EntryWeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_EntryWeightColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_EntryWeightColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
|
@ -5411,8 +5476,8 @@
|
|||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding ChanceToBeBlueprintOverride}" >
|
||||
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding ChanceToBeBlueprintOverride, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_ChanceToBeBlueprintOverrideColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_ItemSetEntry_ChanceToBeBlueprintOverrideColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
|
@ -5444,7 +5509,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="SupplyCrateItemsGrid" ItemsSource="{Binding Path=SelectedSupplyCrateItemSetEntry.Items, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="SupplyCrateItemsGrid" ItemsSource="{Binding Path=SelectedSupplyCrateItemSetEntry.Items, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="SupplyCratesGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5461,6 +5526,28 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="*" MinWidth="100" CanUserSort="True" SortMemberPath="DisplayName">
|
||||
<DataGridTemplateColumn.Header>
|
||||
|
|
@ -5468,11 +5555,11 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BasePrimalItemList, ElementName=SettingsControl}" SelectedValue="{Binding ItemClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BasePrimalItemList, ElementName=SettingsControl}" SelectedValue="{Binding ItemClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnSourceUpdated=True}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding ItemWeight}" >
|
||||
<DataGridTextColumn Width="Auto" MinWidth="50" Binding="{Binding ItemWeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" >
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{DynamicResource ServerSettings_SupplyCrate_Item_ItemWeightColumnLabel}" ToolTip="{DynamicResource ServerSettings_SupplyCrate_Item_ItemWeightColumnTooltip}" TextWrapping="Wrap"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
|
|
|||
|
|
@ -1288,6 +1288,11 @@ namespace ServerManagerTool
|
|||
}
|
||||
}
|
||||
|
||||
private void SupplyCratesGrids_SourceUpdated(object sender, DataTransferEventArgs e)
|
||||
{
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
#region Dinos
|
||||
private void DinoCustomization_Reset(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
@ -3003,7 +3008,7 @@ namespace ServerManagerTool
|
|||
private void AddSupplyCrate_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.ConfigOverrideSupplyCrateItems.Add(new SupplyCrateOverride());
|
||||
Settings.ConfigOverrideSupplyCrateItems.IsEnabled = true;
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void AddSupplyCrateItemSet_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3015,6 +3020,7 @@ namespace ServerManagerTool
|
|||
}
|
||||
|
||||
SelectedSupplyCrateOverride.ItemSets.Add(new SupplyCrateItemSet());
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void AddSupplyCrateItemSetEntry_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3026,6 +3032,7 @@ namespace ServerManagerTool
|
|||
}
|
||||
|
||||
SelectedSupplyCrateItemSet.ItemEntries.Add(new SupplyCrateItemSetEntry());
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void AddSupplyCrateItem_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3037,6 +3044,7 @@ namespace ServerManagerTool
|
|||
}
|
||||
|
||||
SelectedSupplyCrateItemSetEntry.Items.Add(new SupplyCrateItemEntrySettings());
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void ClearSupplyCrates_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3048,7 +3056,7 @@ namespace ServerManagerTool
|
|||
SelectedSupplyCrateItemSet = null;
|
||||
SelectedSupplyCrateOverride = null;
|
||||
Settings.ConfigOverrideSupplyCrateItems.Clear();
|
||||
Settings.ConfigOverrideSupplyCrateItems.IsEnabled = false;
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void ClearSupplyCrateItemSets_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3059,6 +3067,7 @@ namespace ServerManagerTool
|
|||
SelectedSupplyCrateItemSetEntry = null;
|
||||
SelectedSupplyCrateItemSet = null;
|
||||
SelectedSupplyCrateOverride?.ItemSets.Clear();
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void ClearSupplyCrateItemSetEntries_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3068,6 +3077,7 @@ namespace ServerManagerTool
|
|||
|
||||
SelectedSupplyCrateItemSetEntry = null;
|
||||
SelectedSupplyCrateItemSet?.ItemEntries.Clear();
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void ClearSupplyCrateItems_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3076,6 +3086,7 @@ namespace ServerManagerTool
|
|||
return;
|
||||
|
||||
SelectedSupplyCrateItemSetEntry?.Items.Clear();
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void PasteSupplyCrate_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3127,7 +3138,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((SupplyCrateOverride)((Button)e.Source).DataContext);
|
||||
Settings.ConfigOverrideSupplyCrateItems.Remove(item);
|
||||
Settings.ConfigOverrideSupplyCrateItems.IsEnabled = Settings.ConfigOverrideSupplyCrateItems.Count > 0;
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void RemoveSupplyCrateItemSet_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3140,6 +3151,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((SupplyCrateItemSet)((Button)e.Source).DataContext);
|
||||
SelectedSupplyCrateOverride.ItemSets.Remove(item);
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void RemoveSupplyCrateItemSetEntry_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3152,6 +3164,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((SupplyCrateItemSetEntry)((Button)e.Source).DataContext);
|
||||
SelectedSupplyCrateItemSet.ItemEntries.Remove(item);
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void RemoveSupplyCrateItem_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3164,6 +3177,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((SupplyCrateItemEntrySettings)((Button)e.Source).DataContext);
|
||||
SelectedSupplyCrateItemSetEntry.Items.Remove(item);
|
||||
Settings.ConfigOverrideSupplyCrateItems.Update();
|
||||
}
|
||||
|
||||
private void SaveSupplyCrates_Click(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<Window x:Class="ServerManagerTool.SupplyCrateOverridesWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Loaded="Window_Loaded" Closing="Window_Closing"
|
||||
MinWidth="600" MinHeight="480" Width="900" Height="480" ResizeMode="CanResize" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
Name="SupplyCrateUI" Icon="../Art/favicon.ico" Title="SupplyCrateOverridesWindow" >
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\Globalization\en-US\en-US.xaml"/>
|
||||
<ResourceDictionary Source="..\Styles\Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Background="{StaticResource BeigeGradient}">
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
using NLog;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using ServerManagerTool.Lib;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using WPFSharp.Globalizer;
|
||||
|
||||
namespace ServerManagerTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SupplyCrateOverridesWindow.xaml
|
||||
/// </summary>
|
||||
public partial class SupplyCrateOverridesWindow : Window
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public EventHandler<ProfileEventArgs> SavePerformed;
|
||||
|
||||
private readonly GlobalizedApplication _globalizer = GlobalizedApplication.Instance;
|
||||
private readonly ServerProfile _profile = null;
|
||||
|
||||
public SupplyCrateOverridesWindow(ServerProfile profile)
|
||||
{
|
||||
InitializeComponent();
|
||||
WindowUtils.RemoveDefaultResourceDictionary(this, Config.Default.DefaultGlobalizationFile);
|
||||
|
||||
_profile = profile;
|
||||
this.Title = $"{this.Title} - {_profile?.ProfileName}"; // string.Format(_globalizer.GetResourceString("SupplyCrateOverridesWindow_ProfileTitle"), _profile?.ProfileName);
|
||||
|
||||
this.DataContext = this;
|
||||
}
|
||||
|
||||
private async void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void OnSavePerformed()
|
||||
{
|
||||
SavePerformed?.Invoke(this, new ProfileEventArgs(_profile));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue