Skip to content

Commit

Permalink
minor changes/adjustments to info window
Browse files Browse the repository at this point in the history
  • Loading branch information
ojemineh committed Jun 8, 2021
1 parent f916887 commit 2946918
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 18 deletions.
1 change: 1 addition & 0 deletions DayZLootEdit/DayZLootEdit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Resources\info.rtf" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
4 changes: 1 addition & 3 deletions DayZLootEdit/InfoWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<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="110" Margin="10,200,10,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" 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">
<FlowDocument TextAlignment="Center" LineHeight="1"/>
</RichTextBox>
<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"/>
</Grid>
</Window>
6 changes: 4 additions & 2 deletions DayZLootEdit/InfoWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
using System.Windows;
Expand Down Expand Up @@ -38,8 +39,9 @@ public InfoWindow()
lblCopyright.Content = copyright.ToString();
}

string credits = "This application is a further development\nof 'DayZ LootEdit' by MrX13415.\n\nIf you have any suggestions for\nimprovement, please contact me\non GitHub.";
rtbCredits.AppendText(credits);
MemoryStream memStream = new MemoryStream(ASCIIEncoding.Default.GetBytes(Properties.Resources.info));
rtbCredits.SelectAll();
rtbCredits.Selection.Load(memStream, DataFormats.Rtf);

}

Expand Down
2 changes: 2 additions & 0 deletions DayZLootEdit/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
</MenuItem>
</MenuItem>
<MenuItem x:Name="MnuHelp" Header="_?" VerticalAlignment="Top" HorizontalAlignment="Left">
<MenuItem x:Name="MnuHelpGitHub" Header="_GitHub" Click="MnuHelpGitHub_Click"/>
<Separator/>
<MenuItem x:Name="MnuHelpInfo" Header="_Info" HorizontalAlignment="Left" Width="140" Click="MnuHelpInfo_Click"/>
</MenuItem>
</Menu>
Expand Down
22 changes: 14 additions & 8 deletions DayZLootEdit/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,6 @@ private void MnuFileExit_Click(object sender, RoutedEventArgs e)

}

private void MnuHelpInfo_Click(object sender, RoutedEventArgs e)
{

InfoWindow iw = new InfoWindow();
iw.ShowDialog();

}

private void MnuEditSelectAll_Click(object sender, RoutedEventArgs e)
{
LootList.SelectAll();
Expand Down Expand Up @@ -606,6 +598,20 @@ private void MnuEditClearValue_Click(object sender, RoutedEventArgs e)
LootList.Focus();
}

private void MnuHelpGitHub_Click(object sender, RoutedEventArgs e)
{
string uriQuery = "https://github.com/ojemineh/DayZLootEdit";
Process.Start(uriQuery);
}

private void MnuHelpInfo_Click(object sender, RoutedEventArgs e)
{

InfoWindow iw = new InfoWindow();
iw.ShowDialog();

}

// PERCENT

private void UpdatePercentControls()
Expand Down
21 changes: 21 additions & 0 deletions DayZLootEdit/Properties/Resources.Designer.cs

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

17 changes: 12 additions & 5 deletions DayZLootEdit/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
Expand All @@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
Expand All @@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
Expand All @@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
Expand All @@ -109,9 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="info" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\info.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>
Binary file added DayZLootEdit/Resources/info.rtf
Binary file not shown.
Binary file modified dayzlootedit.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 info.rtf
Binary file not shown.

0 comments on commit 2946918

Please sign in to comment.