Add about dialog and versioning
This commit is contained in:
parent
356dc796c8
commit
7938149c90
@ -1,3 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
|
@ -26,7 +26,7 @@
|
||||
<ImageBrush Stretch="Uniform" ImageSource="/copy-icon.png"/>
|
||||
</Button.OpacityMask>
|
||||
</Button>
|
||||
<Menu x:Name="FileMenu" Margin="22,53,561,527" Background="#FF4B4E5D" MouseLeave="FileMenu_LostMouseFocus" Visibility="Collapsed">
|
||||
<Menu x:Name="FileMenu" Margin="22,53,561,497" Background="#FF4B4E5D" MouseLeave="FileMenu_LostMouseFocus" Visibility="Collapsed">
|
||||
<Menu.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="Vertical"/>
|
||||
@ -35,7 +35,8 @@
|
||||
<Label x:Name="OpenOutputDir" Content="Apri cartella output..." Foreground="White" FontSize="14" MouseDown="OpenOutputDir_MouseDown" Cursor="Hand" Width="160" HorizontalAlignment="Center" Margin="0,6,0,0" >
|
||||
</Label>
|
||||
<Label x:Name="Help" Content="Help" Foreground="White" FontSize="14" MouseDown="Help_MouseDown" Cursor="Hand" Width="161" Margin="0,6,0,0"/>
|
||||
<Label x:Name="Exit" Content="Esci..." Foreground="White" FontSize="14" MouseDown="Exit_MouseDown" Cursor="Hand" Width="163" Margin="0,6,0,10"/>
|
||||
<Label x:Name="About" Content="About" Foreground="White" FontSize="14" MouseDown="About_MouseDown" Cursor="Hand" Width="161" Margin="0,6,0,0"/>
|
||||
<Label x:Name="Exit" Content="Esci..." Foreground="White" FontSize="14" MouseDown="Exit_MouseDown" Cursor="Hand" Width="163" Margin="0,6,0,0"/>
|
||||
</Menu>
|
||||
<Button x:Name="ToggleMenu" Content="" HorizontalAlignment="Left" Margin="12,14,0,0" VerticalAlignment="Top" RenderTransformOrigin="0,0.202" Height="42" Width="47" BorderBrush="{x:Null}" Foreground="{x:Null}" Cursor="Hand" Click="ToggleMenu_Click">
|
||||
<Button.OpacityMask>
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@ -118,11 +119,6 @@ namespace Txt2Bib
|
||||
System.Diagnostics.Process.Start("explorer.exe", OutputDir);
|
||||
}
|
||||
|
||||
private void MenuExec_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
Execute();
|
||||
}
|
||||
|
||||
private void Exit_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
Environment.Exit(0);
|
||||
@ -139,5 +135,11 @@ namespace Txt2Bib
|
||||
{
|
||||
FileMenu.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void About_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
MessageBox.Show($"Txt2Bib version {Assembly.GetExecutingAssembly().GetName().Version}\n" +
|
||||
"Powered by Nicopa", "About", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Version>0.3.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user