diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs new file mode 100644 index 0000000..3b4d7f0 --- /dev/null +++ b/EnvyUpdate/Debug.cs @@ -0,0 +1,49 @@ +using System; +using System.Linq; + +namespace EnvyUpdate +{ + class Debug + { + readonly static string debugFilePath = GlobalVars.exepath + "debug.txt"; + public static int LoadFakeIDs(string idType) + { + /* + * Usage: + * Create debug.txt file. + * Fill in variables: + * Line 1: psid + * Line 2: pfid + * Line 3: osid + * Line 4: dtcid + * Line 5: Local driver version + * + * Supply /debug flag to exe. + */ + string line = null; + switch (idType) + { + case "psid": + line = File.ReadLines(debugFilePath).Take(1).First(); + break; + case "pfid": + line = File.ReadLines(debugFilePath).Skip(1).Take(1).First(); + break; + case "osid": + line = File.ReadLines(debugFilePath).Skip(2).Take(1).First(); + break; + case "dtcid": + line = File.ReadLines(debugFilePath).Skip(3).Take(1).First(); + break; + default: + break; + } + + return int.Parse(line); + } + public static string LocalDriv() + { + return File.ReadLines(debugFilePath).Skip(4).Take(1).First(); + } + } +} diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj index edc0a08..4d0512f 100644 --- a/EnvyUpdate/EnvyUpdate.csproj +++ b/EnvyUpdate/EnvyUpdate.csproj @@ -95,6 +95,7 @@ MSBuild:Compile Designer + InfoWindow.xaml diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs index 402384c..352f9cb 100644 --- a/EnvyUpdate/GlobalVars.cs +++ b/EnvyUpdate/GlobalVars.cs @@ -9,7 +9,7 @@ namespace EnvyUpdate public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location; public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\"; public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); - public static readonly float version = 2.3F; + public static readonly float version = 2.4F; public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\"; public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); public static readonly string desktopOverride = exepath + "desktop.envy"; diff --git a/EnvyUpdate/InfoWindow.xaml b/EnvyUpdate/InfoWindow.xaml index 9987dc9..66d475f 100644 --- a/EnvyUpdate/InfoWindow.xaml +++ b/EnvyUpdate/InfoWindow.xaml @@ -6,19 +6,19 @@ xmlns:local="clr-namespace:EnvyUpdate" xmlns:p="clr-namespace:EnvyUpdate.Properties" mc:Ignorable="d" - Title="" Height="274" Width="286" ResizeMode="NoResize" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight"> + Title="" Height="290" Width="286" ResizeMode="NoResize" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">