add debug feature, update icon, add licenses, bump version
This commit is contained in:
parent
9cc8e88698
commit
5c7831b855
8 changed files with 98 additions and 8 deletions
|
@ -74,9 +74,16 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="InfoWindow.xaml.cs">
|
||||
<DependentUpon>InfoWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Notify.cs" />
|
||||
<Compile Include="StringExt.cs" />
|
||||
<Compile Include="Util.cs" />
|
||||
<Page Include="InfoWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
19
EnvyUpdate/InfoWindow.xaml
Normal file
19
EnvyUpdate/InfoWindow.xaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<Window x:Class="EnvyUpdate.InfoWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:EnvyUpdate"
|
||||
mc:Ignorable="d"
|
||||
Title="InfoWindow" Height="224.547" Width="285.714">
|
||||
<Grid>
|
||||
<Button Content="How to use this application?" Margin="10,10,10,0" VerticalAlignment="Top" Height="45" Click="Button_Click"/>
|
||||
<Label Content="Licenses:" HorizontalAlignment="Left" Margin="10,60,0,0" VerticalAlignment="Top" FontWeight="Bold"/>
|
||||
<TextBlock x:Name="textEnvyUpdate" Margin="10,91,10,0" TextWrapping="Wrap" Height="18" VerticalAlignment="Top" MouseEnter="text_MouseEnter" MouseLeave="text_MouseLeave" MouseDown="textEnvyUpdate_MouseDown"><Run Text="EnvyUpdate"/><Run Text=": MIT"/></TextBlock>
|
||||
<TextBlock x:Name="textFody" Margin="10,109,10,0" TextWrapping="Wrap" Text="Fody: MIT" Height="18" VerticalAlignment="Top" MouseEnter="text_MouseEnter" MouseLeave="text_MouseLeave" MouseDown="textFody_MouseDown"/>
|
||||
<TextBlock x:Name="textNotifyIcon" Margin="10,127,10,0" TextWrapping="Wrap" Text="wpf-notifyicon: CPOL" Height="18" VerticalAlignment="Top" MouseEnter="text_MouseEnter" MouseLeave="text_MouseLeave" MouseDown="textNotifyIcon_MouseDown"/>
|
||||
<TextBlock x:Name="textNotifications" Margin="10,145,10,0" TextWrapping="Wrap" Text="Notifications.Wpf: MIT" Height="18" VerticalAlignment="Top" MouseEnter="text_MouseEnter" MouseLeave="text_MouseLeave" MouseDown="textNotifications_MouseDown"/>
|
||||
<TextBlock Margin="10,163,10,0" TextWrapping="Wrap" Text="Icon made by Freepik from www.flaticon.com" Height="18" VerticalAlignment="Top"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
51
EnvyUpdate/InfoWindow.xaml.cs
Normal file
51
EnvyUpdate/InfoWindow.xaml.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace EnvyUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for InfoWindow.xaml
|
||||
/// </summary>
|
||||
public partial class InfoWindow : Window
|
||||
{
|
||||
public InfoWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/fyr77/EnvyUpdate/");
|
||||
}
|
||||
|
||||
private void text_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.Hand;
|
||||
}
|
||||
|
||||
private void text_MouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.Arrow;
|
||||
}
|
||||
|
||||
private void textEnvyUpdate_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/fyr77/EnvyUpdate/blob/master/LICENSE");
|
||||
}
|
||||
|
||||
private void textFody_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/Fody/Fody/blob/master/License.txt");
|
||||
}
|
||||
|
||||
private void textNotifyIcon_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/hardcodet/wpf-notifyicon/blob/master/LICENSE");
|
||||
}
|
||||
|
||||
private void textNotifications_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/Federerer/Notifications.Wpf/blob/master/LICENSE");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,7 +21,8 @@ namespace EnvyUpdate
|
|||
private readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||
private readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\";
|
||||
private readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
|
||||
private readonly string version = "1.1";
|
||||
private readonly string version = "1.2";
|
||||
private readonly string argument = Environment.GetCommandLineArgs()[1];
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
|
@ -55,6 +56,13 @@ namespace EnvyUpdate
|
|||
}
|
||||
}
|
||||
|
||||
if (argument == "--ignore-gpu")
|
||||
{
|
||||
MessageBox.Show("Skipping GPU check!");
|
||||
textblockGPU.Text = "Check skipped.";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Util.GetLocDriv() != null)
|
||||
{
|
||||
localDriv = Util.GetLocDriv();
|
||||
|
@ -65,6 +73,8 @@ namespace EnvyUpdate
|
|||
MessageBox.Show("No NVIDIA GPU found. Application will exit.");
|
||||
Environment.Exit(255);
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(appdata + "nvidia-update.txt"))
|
||||
{
|
||||
chkPortable.IsChecked = false;
|
||||
|
@ -87,7 +97,9 @@ namespace EnvyUpdate
|
|||
|
||||
private void buttonHelp_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://github.com/fyr77/EnvyUpdate/");
|
||||
InfoWindow infoWin = new InfoWindow();
|
||||
infoWin.ShowDialog();
|
||||
//System.Diagnostics.Process.Start("https://github.com/fyr77/EnvyUpdate/");
|
||||
}
|
||||
|
||||
private void Grid_Drop(object sender, DragEventArgs e)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 104 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 14 KiB |
|
@ -34,3 +34,4 @@ The application is compatible with all Nvidia GPUs that have their drivers avail
|
|||
* Fody (for embedding DLLs into the main executable): [MIT](https://github.com/Fody/Fody/blob/master/License.txt)
|
||||
* wpf-notifyicon (for showing an icon in the system tray): [CPOL](https://github.com/hardcodet/wpf-notifyicon/blob/master/LICENSE)
|
||||
* Notifications.Wpf: [MIT](https://github.com/Federerer/Notifications.Wpf/blob/master/LICENSE)
|
||||
* Icon made by Freepik from www.flaticon.com
|
|
@ -1 +1 @@
|
|||
1.1
|
||||
1.2
|
||||
|
|
Reference in a new issue