Skip to content

Commit

Permalink
updates to 0.3.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ojemineh committed Jun 9, 2021
1 parent 7b67567 commit 33fdea0
Show file tree
Hide file tree
Showing 13 changed files with 284 additions and 155 deletions.
14 changes: 12 additions & 2 deletions DayZLootEdit/DayZLootEdit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.2.1.%2a</ApplicationVersion>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>0.3.12.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down Expand Up @@ -69,6 +69,7 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
Expand Down Expand Up @@ -157,5 +158,14 @@
<ItemGroup>
<Resource Include="dayz_types.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\checkbox_null.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="checkbox_null.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="checkbox_mixed.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
12 changes: 6 additions & 6 deletions DayZLootEdit/InfoWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DayZLootEdit"
mc:Ignorable="d"
Title="Info" Height="400" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="dayz_types.ico">
Title="Info" Height="460" Width="360" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="dayz_types.ico">
<Grid>
<Button x:Name="CloseBtn" Content="Close" HorizontalAlignment="Center" Margin="0,0,0,10" VerticalAlignment="Bottom" Width="75" Click="CloseBtn_Click"/>
<Label Content="DayZ" Margin="0,30,0,0" VerticalAlignment="Top" FontSize="48" FontWeight="Bold" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<Label Content="Loot Editor" Margin="0,90,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" FontSize="22" FontWeight="Bold" VerticalContentAlignment="Center"/>
<Label x:Name="lblVersion" Content="Version" Margin="0,130,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<Label x:Name="lblCopyright" Content="Copyright" Margin="0,150,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<RichTextBox x:Name="rtbCredits" Height="140" Margin="10,185,10,0" VerticalAlignment="Top" Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" AllowDrop="False" IsReadOnly="True" IsUndoEnabled="False" VerticalScrollBarVisibility="Visible" AutoWordSelection="False" TextOptions.TextFormattingMode="Display" AcceptsReturn="False"/>
<Label Content="DayZ" Margin="0,10,0,0" VerticalAlignment="Top" FontSize="48" FontWeight="Bold" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<Label Content="Loot Editor" Margin="0,70,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" FontSize="22" FontWeight="Bold" VerticalContentAlignment="Center"/>
<Label x:Name="lblVersion" Content="Version" Margin="0,110,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<Label x:Name="lblCopyright" Content="Copyright" Margin="0,130,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<RichTextBox x:Name="rtbCredits" Height="215" Margin="10,175,10,0" VerticalAlignment="Top" Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" AllowDrop="False" IsReadOnly="True" IsUndoEnabled="False" VerticalScrollBarVisibility="Visible" AutoWordSelection="False" TextOptions.TextFormattingMode="Display" AcceptsReturn="False"/>
</Grid>
</Window>
180 changes: 42 additions & 138 deletions DayZLootEdit/MainWindow.xaml

Large diffs are not rendered by default.

223 changes: 219 additions & 4 deletions DayZLootEdit/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media.Imaging;

namespace DayZLootEdit
{
Expand Down Expand Up @@ -56,6 +57,8 @@ private void InitializeControls()
MnuEditRestock.IsEnabled = false;
MnuEditQuantity.IsEnabled = false;
MnuEditCost.IsEnabled = false;
MnuEditCount.IsEnabled = false;
MnuEditMark.IsEnabled = false;
MnuEditClear.IsEnabled = false;

ResetPercentControls();
Expand Down Expand Up @@ -125,18 +128,20 @@ private async void OpenLootFile(string lFile)
MnuEditRestock.IsEnabled = false;
MnuEditQuantity.IsEnabled = false;
MnuEditCost.IsEnabled = false;
MnuEditCount.IsEnabled = false;
MnuEditMark.IsEnabled = false;
MnuEditClear.IsEnabled = false;

grpFilter.IsEnabled = true;

Mouse.OverrideCursor = Cursors.Arrow;
Mouse.OverrideCursor = null;
UpdateStatus();

}
catch (Exception err)
{

Mouse.OverrideCursor = Cursors.Arrow;
Mouse.OverrideCursor = null;

string mb_caption = "Error";
string mb_message = "An error occurred!\n\n%1";
Expand Down Expand Up @@ -207,14 +212,14 @@ private async void SaveLootFile(string lFile = "")

this.IsEnabled = true;

Mouse.OverrideCursor = Cursors.Arrow;
Mouse.OverrideCursor = null;
UpdateStatus();

}
catch (Exception err)
{

Mouse.OverrideCursor = Cursors.Arrow;
Mouse.OverrideCursor = null;

string mb_caption = "Error";
string mb_message = "An error occurred!\n\n%1";
Expand Down Expand Up @@ -568,6 +573,72 @@ private void MnuEditCostValue_Click(object sender, RoutedEventArgs e)
LootList.Focus();
}

private void MnuEditCountInCargo_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditCountInCargo.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.InCargo = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditCountInHoarder_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditCountInHoarder.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.InHoarder = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditCountInMap_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditCountInMap.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.InMap = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditCountInPlayer_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditCountInPlayer.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.InPlayer = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditMarkCrafted_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditMarkCrafted.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.Crafted = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditMarkDeloot_Click(object sender, RoutedEventArgs e)
{
bool isChecked = MnuEditMarkDeloot.IsChecked;
foreach (LootType loot in LootList.SelectedItems)
{
loot.Deloot = isChecked;
}
LootList.Items.Refresh();
LootList.Focus();
}

private void MnuEditClearTag_Click(object sender, RoutedEventArgs e)
{
foreach (LootType loot in LootList.SelectedItems)
Expand Down Expand Up @@ -984,8 +1055,152 @@ private void LootList_SelectionChanged(object sender, SelectionChangedEventArgs
MnuEditRestock.IsEnabled = IsLootSelected;
MnuEditQuantity.IsEnabled = IsLootSelected;
MnuEditCost.IsEnabled = IsLootSelected;
MnuEditCount.IsEnabled = IsLootSelected;
MnuEditMark.IsEnabled = IsLootSelected;
MnuEditClear.IsEnabled = IsLootSelected;
grpPercent.IsEnabled = IsLootSelected;
if (LootList.SelectedItems.Count > 0)
{
int cargoChecked = 0;
int cargoUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.InCargo == true)
cargoChecked++;
if (loot.InCargo == false)
cargoUnchecked++;
}
if (cargoChecked == LootList.SelectedItems.Count)
{
MnuEditCountInCargo.IsChecked = true;
}
else if (cargoUnchecked == LootList.SelectedItems.Count)
{
MnuEditCountInCargo.IsChecked = false;
MnuEditCountInCargo.Icon = null;
}
else
{
MnuEditCountInCargo.IsChecked = false;
MnuEditCountInCargo.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
int hoarderChecked = 0;
int hoarderUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.InHoarder == true)
hoarderChecked++;
if (loot.InHoarder == false)
hoarderUnchecked++;
}
if (hoarderChecked == LootList.SelectedItems.Count)
{
MnuEditCountInHoarder.IsChecked = true;
}
else if (hoarderUnchecked == LootList.SelectedItems.Count)
{
MnuEditCountInHoarder.IsChecked = false;
MnuEditCountInPlayer.Icon = null;
}
else
{
MnuEditCountInHoarder.IsChecked = false;
MnuEditCountInHoarder.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
int mapChecked = 0;
int mapUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.InMap == true)
mapChecked++;
if (loot.InMap == false)
mapUnchecked++;
}
if (mapChecked == LootList.SelectedItems.Count)
{
MnuEditCountInMap.IsChecked = true;
}
else if (mapUnchecked == LootList.SelectedItems.Count)
{
MnuEditCountInMap.IsChecked = false;
MnuEditCountInPlayer.Icon = null;
}
else
{
MnuEditCountInMap.IsChecked = false;
MnuEditCountInMap.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
int playerChecked = 0;
int playerUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.InPlayer == true)
playerChecked++;
if (loot.InPlayer == false)
playerUnchecked++;
}
if (playerChecked == LootList.SelectedItems.Count)
{
MnuEditCountInPlayer.IsChecked = true;
}
else if (playerUnchecked == LootList.SelectedItems.Count)
{
MnuEditCountInPlayer.IsChecked = false;
MnuEditCountInPlayer.Icon = null;
}
else
{
MnuEditCountInPlayer.IsChecked = false;
MnuEditCountInPlayer.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
int craftedChecked = 0;
int craftedUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.Crafted == true)
craftedChecked++;
if (loot.Crafted == false)
craftedUnchecked++;
}
if (craftedChecked == LootList.SelectedItems.Count)
{
MnuEditMarkCrafted.IsChecked = true;
}
else if (craftedUnchecked == LootList.SelectedItems.Count)
{
MnuEditMarkCrafted.IsChecked = false;
MnuEditMarkCrafted.Icon = null;
}
else
{
MnuEditMarkCrafted.IsChecked = false;
MnuEditMarkCrafted.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
int delootChecked = 0;
int delootUnchecked = 0;
foreach (LootType loot in LootList.SelectedItems)
{
if (loot.Deloot == true)
delootChecked++;
if (loot.Deloot == false)
delootUnchecked++;
}
if (delootChecked == LootList.SelectedItems.Count)
{
MnuEditMarkDeloot.IsChecked = true;
}
else if (delootUnchecked == LootList.SelectedItems.Count)
{
MnuEditMarkDeloot.IsChecked = false;
MnuEditMarkDeloot.Icon = null;
}
else
{
MnuEditMarkDeloot.IsChecked = false;
MnuEditMarkDeloot.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/DayZLootEdit;component/checkbox_mixed.png")) };
}
}
LootList.Focus();
}

// STATUS
Expand Down
4 changes: 2 additions & 2 deletions DayZLootEdit/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.1.1")]
[assembly: AssemblyFileVersion("0.2.1.1")]
[assembly: AssemblyVersion("0.3.12.2")]
[assembly: AssemblyFileVersion("0.3.12.2")]
6 changes: 3 additions & 3 deletions DayZLootEdit/Properties/Resources.Designer.cs

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

Binary file modified DayZLootEdit/Resources/info.rtf
Binary file not shown.
Binary file added DayZLootEdit/checkbox_mixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DayZLootEdit/checkbox_null.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added checkbox_mixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added checkbox_mixed.xcf
Binary file not shown.
Binary file added checkbox_null.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added checkbox_null.xcf
Binary file not shown.

0 comments on commit 33fdea0

Please sign in to comment.