Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Added option to delete leftover variables from FrostyFix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dyvinia committed Jun 20, 2021
1 parent 3e275d0 commit 15b6c7f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
30 changes: 27 additions & 3 deletions AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
https://discord.gg/advqsyv
</Hyperlink>
</TextBlock>
<Button Content="Refresh Status on Main Window" HorizontalAlignment="Center" Margin="75,300,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonEnvVar" BorderBrush="#FFB90000" FontSize="14">
<Button Content="Refresh Status on Main Window" HorizontalAlignment="Center" Margin="75,310,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonEnvVar" BorderBrush="#FFB90000" FontSize="14">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#FF323232"/>
Expand All @@ -123,7 +123,7 @@
</ControlTemplate>
</Button.Template>
</Button>
<Button Content="Delete Selected Game ModData" HorizontalAlignment="Center" Margin="75,268,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonDelModData" BorderBrush="#FFB90000" FontSize="14">
<Button Content="Delete Selected Game ModData" HorizontalAlignment="Center" Margin="75,250,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonDelModData" BorderBrush="#FFB90000" FontSize="14">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#FF323232"/>
Expand All @@ -147,7 +147,31 @@
</ControlTemplate>
</Button.Template>
</Button>
<Button Content="Open Selected Game Directory" HorizontalAlignment="Center" Margin="75,236,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonGameDir" BorderBrush="#FFB90000" FontSize="14">
<Button Content="Open Selected Game Directory" HorizontalAlignment="Center" Margin="75,220,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonGameDir" BorderBrush="#FFB90000" FontSize="14">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#FF323232"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="Foreground" Value="#FFF1F1F1"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF6C6C6C"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#FF5A5A5A"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<Button Content="Clear Env. Var. from FrostyFix 2" HorizontalAlignment="Center" Margin="75,280,75,0" VerticalAlignment="Top" Width="210" Height="25" Click="ButtonClearEnvVar" BorderBrush="#FFB90000" FontSize="14">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#FF323232"/>
Expand Down
12 changes: 11 additions & 1 deletion AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System.Diagnostics;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Navigation;

namespace FrostyFix2 {
Expand Down Expand Up @@ -29,5 +32,12 @@ private void ButtonGameDir(object sender, RoutedEventArgs e) {
private void ButtonDelModData(object sender, RoutedEventArgs e) {
(Application.Current.MainWindow as MainWindow).delModData();
}

private async void ButtonClearEnvVar(object sender, RoutedEventArgs e) {
Mouse.OverrideCursor = Cursors.Wait;
Environment.SetEnvironmentVariable("GAME_DATA_DIR", "", EnvironmentVariableTarget.User);
await Task.Delay(10);
Mouse.OverrideCursor = null;
}
}
}
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.0")]
[assembly: AssemblyFileVersion("3.1.0")]
[assembly: AssemblyVersion("3.1.1")]
[assembly: AssemblyFileVersion("3.1.1")]

0 comments on commit 15b6c7f

Please sign in to comment.