Skip to content

Commit

Permalink
GFE launch
Browse files Browse the repository at this point in the history
  • Loading branch information
NateShoffner committed Jul 15, 2018
1 parent 5bd7d6f commit f543490
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 14 deletions.
21 changes: 12 additions & 9 deletions DisableNvidiaTelemetry/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</Style>
</fa5:SvgAwesome.Style>
</fa5:SvgAwesome>
<TextBlock Text="Telemetry" TextAlignment="Center" FontSize="18">
<TextBlock Text="{x:Static properties:Resources.Telemetry}" TextAlignment="Center" FontSize="18">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
Expand Down Expand Up @@ -132,7 +132,7 @@
</Style>
</fa5:SvgAwesome.Style>
</fa5:SvgAwesome>
<TextBlock Text="Settings" TextAlignment="Center" FontSize="18">
<TextBlock Text="{x:Static properties:Resources.Settings}" TextAlignment="Center" FontSize="18">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
Expand Down Expand Up @@ -175,9 +175,12 @@
<ComboBoxItem>After Windows Startup</ComboBoxItem>
</ComboBox>

<Button Content="Check For Updates" Height="40" Width="200" HorizontalAlignment="Left"
<Button Content="{x:Static properties:Resources.Check_for_updates}" Height="40" Width="200" HorizontalAlignment="Left"
VerticalAlignment="Top" Margin="10,157,0,0" Name="btnUpdateCheck"
Click="btnUpdatecheck_Click" />
<Button Content="{x:Static properties:Resources.Open_geforce_experience}" Height="40" Width="200" HorizontalAlignment="Left"
VerticalAlignment="Top" Margin="10,215,0,0" x:Name="btnUpdateCheck_Copy"
Click="btnGeforce_Click" />

</Grid>
</TabItem>
Expand Down Expand Up @@ -205,7 +208,7 @@
</Style>
</fa5:SvgAwesome.Style>
</fa5:SvgAwesome>
<TextBlock Text="Event Log" TextAlignment="Center" FontSize="18">
<TextBlock Text="{x:Static properties:Resources.Event_log}" TextAlignment="Center" FontSize="18">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
Expand All @@ -232,7 +235,7 @@
<ListView Name="lvLogs" SelectionMode="Single">
<ListView.Resources>
<ContextMenu x:Key="LogContextMenu">
<MenuItem Header="Copy" Name="menuCopy" Click="MenuItem_OnClick" />
<MenuItem Header="{x:Static properties:Resources.Copy}" Name="menuCopy" Click="MenuItem_OnClick" />
</ContextMenu>
</ListView.Resources>
<ListView.ItemContainerStyle>
Expand All @@ -242,9 +245,9 @@
</ListView.ItemContainerStyle>
<ListView.View>
<GridView>
<GridViewColumn Header="Time" Width="Auto"
<GridViewColumn Header="{x:Static properties:Resources.Time}" Width="Auto"
DisplayMemberBinding="{Binding Date, StringFormat='T'}" />
<GridViewColumn Header="Details" Width="Auto" DisplayMemberBinding="{Binding Message}" />
<GridViewColumn Header="{x:Static properties:Resources.Details}" Width="Auto" DisplayMemberBinding="{Binding Message}" />
</GridView>

</ListView.View>
Expand Down Expand Up @@ -278,7 +281,7 @@
</Style>
</fa5:SvgAwesome.Style>
</fa5:SvgAwesome>
<TextBlock Text="About" TextAlignment="Center" FontSize="18">
<TextBlock Text="{x:Static properties:Resources.About}" TextAlignment="Center" FontSize="18">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
Expand Down Expand Up @@ -339,7 +342,7 @@
<Hyperlink NavigateUri="https://github.com/NateShoffner/Disable-Nvidia-Telemetry"
RequestNavigate="Hyperlink_OnRequestNavigate">
<Hyperlink.Inlines>
<Run Text="View on GitHub" />
<Run Text="{x:Static properties:Resources.View_on_github}" />
</Hyperlink.Inlines>
</Hyperlink>
</TextBlock>
Expand Down
10 changes: 8 additions & 2 deletions DisableNvidiaTelemetry/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ private void UpdaterUtilities_UpdateResponse(object sender, UpdaterUtilities.Upd
Logging.GetFileLogger().Log(Level.Error, e.Error, suppressEvents: true);

if (showDialog)
{
CustomMessageBox.Show(
Properties.Resources.Update_error_messsage,
Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
}
}

btnUpdateCheck.IsEnabled = true;
Expand Down Expand Up @@ -531,5 +529,13 @@ private static void PromptRestart()
if (result == MessageBoxResult.Yes)
WindowsUtils.Restart();
}

private void btnGeforce_Click(object sender, RoutedEventArgs e)
{
var path = GeforceUtilities.GetGeforceExperiencePath();

if (path != null)
Process.Start(path);
}
}
}
117 changes: 117 additions & 0 deletions DisableNvidiaTelemetry/Properties/Resources.Designer.cs

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

39 changes: 39 additions & 0 deletions DisableNvidiaTelemetry/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,43 @@ Redistribution of this software is allowed, but the origin of this software must
<data name="Run_in_background" xml:space="preserve">
<value>Run in background and disable Nvidia telemetry services and tasks:</value>
</data>
<data name="About" xml:space="preserve">
<value>About</value>
</data>
<data name="Check_for_updates" xml:space="preserve">
<value>Check For Updates</value>
</data>
<data name="Copy" xml:space="preserve">
<value>Copy</value>
</data>
<data name="Default" xml:space="preserve">
<value>Default</value>
</data>
<data name="Details" xml:space="preserve">
<value>Details</value>
</data>
<data name="Event_log" xml:space="preserve">
<value>Event Log</value>
</data>
<data name="Open_geforce_experience" xml:space="preserve">
<value>Open GeForce Experience</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="Telemetry" xml:space="preserve">
<value>Telemetry</value>
</data>
<data name="Telemetry_placeholder" xml:space="preserve">
<value>No telemetry items found for this category</value>
</data>
<data name="Time" xml:space="preserve">
<value>Time</value>
</data>
<data name="View_on_github" xml:space="preserve">
<value>View on GitHub</value>
</data>
</root>
18 changes: 18 additions & 0 deletions DisableNvidiaTelemetry/Utilities/GeforceUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ namespace DisableNvidiaTelemetry.Utilities
{
internal class GeforceUtilities
{
public static string GetGeforceExperiencePath()
{
using (var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64))

using (var key = hklm.OpenSubKey(@"SOFTWARE\NVIDIA Corporation\Global\GFExperience"))
{
if (key != null)
{
var path = key.GetValue("FullPath");

if (path != null)
return path.ToString();
}
}

return null;
}

public static ExtendedVersion.ExtendedVersion GetGeForceExperienceVersion()
{
return GetApplicationVersion("NVIDIA GeForce Experience");
Expand Down
7 changes: 4 additions & 3 deletions DisableNvidiaTelemetry/View/TelemetryControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DisableNvidiaTelemetry"
xmlns:fa5="http://schemas.fontawesome.com/icons/"
xmlns:properties="clr-namespace:DisableNvidiaTelemetry.Properties"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="550">
<Grid Margin="0, 0, 0, 0">
Expand All @@ -16,19 +17,19 @@
<fa5:SvgAwesome Icon="Solid_Undo" Width="16" Height="16" VerticalAlignment="Top" HorizontalAlignment="right"
Margin="0, 5, 140, 0" Foreground="#76B900" Cursor="Hand" Name="btnDefault" Visibility="Hidden" />

<Label Name="lblDefault" Content="Default" HorizontalAlignment="Right" VerticalAlignment="Top"
<Label Name="lblDefault" Content="{x:Static properties:Resources.Default}" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0, 0, 90, 0"
FontWeight="Bold" FontSize="12" Cursor="Hand" Visibility="Hidden" />


<fa5:SvgAwesome Icon="Solid_SyncAlt" Width="16" Height="16" VerticalAlignment="Top" HorizontalAlignment="right"
Margin="0, 5, 60, 0" Foreground="#76B900" Cursor="Hand" Name="btnRefresh" />

<Label Name="lblRefresh" Content="Refresh" HorizontalAlignment="Right" VerticalAlignment="Top"
<Label Name="lblRefresh" Content="{x:Static properties:Resources.Refresh}" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0, 0, 10, 0"
FontWeight="Bold" FontSize="12" Cursor="Hand" />

<Label Name="lblPlaceholder" HorizontalAlignment="Center" Content="No telemetry items found for this category."
<Label Name="lblPlaceholder" HorizontalAlignment="Center" Content="{x:Static properties:Resources.Telemetry_placeholder}"
Margin="0, 40, 0, 40" />

<StackPanel Name="containerPanel" Orientation="Vertical" HorizontalAlignment="Stretch" Margin="15,30,5,15"
Expand Down

0 comments on commit f543490

Please sign in to comment.