i am an idiot
This commit is contained in:
parent
c390a05c61
commit
952f5fbe2c
2 changed files with 17 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
||||||
xmlns:local="clr-namespace:EnvyUpdate"
|
xmlns:local="clr-namespace:EnvyUpdate"
|
||||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
xmlns:tb="http://www.hardcodet.net/taskbar"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="EnvyUpdate" Height="170.864" Width="463.435" Icon="icon.ico" ResizeMode="CanMinimize" StateChanged="Window_StateChanged" Closing="Window_Closing">
|
Title="EnvyUpdate" Height="170" Width="463" Icon="icon.ico" ResizeMode="CanMinimize" StateChanged="Window_StateChanged" Closing="Window_Closing">
|
||||||
<Grid Margin="0,0,0,6">
|
<Grid Margin="0,0,0,6">
|
||||||
<tb:TaskbarIcon IconSource="/icon.ico" ToolTipText="EnvyUpdate" TrayLeftMouseDown="TaskbarIcon_TrayLeftMouseDown" />
|
<tb:TaskbarIcon IconSource="/icon.ico" ToolTipText="EnvyUpdate" TrayLeftMouseDown="TaskbarIcon_TrayLeftMouseDown" />
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontWeight="Bold" Width="151"><Run Text="Local d"/><Run Text="river "/><Run Text="v"/><Run Text="ersion:"/></TextBlock>
|
<TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontWeight="Bold" Width="151"><Run Text="Local d"/><Run Text="river "/><Run Text="v"/><Run Text="ersion:"/></TextBlock>
|
||||||
|
|
|
@ -21,8 +21,7 @@ namespace EnvyUpdate
|
||||||
private readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
|
private readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||||
private readonly string exepath = Path.GetDirectoryName(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 startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
|
||||||
private readonly string version = "1.2";
|
private readonly string version = "1.3";
|
||||||
private readonly string argument = Environment.GetCommandLineArgs()[1];
|
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
@ -55,25 +54,28 @@ namespace EnvyUpdate
|
||||||
//Silently fail.
|
//Silently fail.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try
|
||||||
if (argument == "--ignore-gpu")
|
|
||||||
{
|
{
|
||||||
MessageBox.Show("Skipping GPU check!");
|
if (Environment.GetCommandLineArgs()[1] == "--ignore-gpu")
|
||||||
textblockGPU.Text = "Check skipped.";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Util.GetLocDriv() != null)
|
|
||||||
{
|
{
|
||||||
localDriv = Util.GetLocDriv();
|
MessageBox.Show("Skipping GPU check!");
|
||||||
textblockGPU.Text = localDriv;
|
textblockGPU.Text = "Check skipped.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("No NVIDIA GPU found. Application will exit.");
|
if (Util.GetLocDriv() != null)
|
||||||
Environment.Exit(255);
|
{
|
||||||
|
localDriv = Util.GetLocDriv();
|
||||||
|
textblockGPU.Text = localDriv;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("No NVIDIA GPU found. Application will exit.");
|
||||||
|
Environment.Exit(255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (IndexOutOfRangeException) { }
|
||||||
|
|
||||||
if (File.Exists(appdata + "nvidia-update.txt"))
|
if (File.Exists(appdata + "nvidia-update.txt"))
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue