Skip to content

Commit

Permalink
Added error dialog on error
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomartino committed Jul 3, 2022
1 parent 4817f12 commit 531c8f9
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 2,282 deletions.
22 changes: 11 additions & 11 deletions Steam Auto Shutdown/Steam Auto Shutdown/MainForm.Designer.cs

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

2,318 changes: 71 additions & 2,247 deletions Steam Auto Shutdown/Steam Auto Shutdown/MainForm.resx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Steam Auto Shutdown")]
[assembly: AssemblyDescription("Shutdown your PC automatically when steam downloads end")]
[assembly: AssemblyDescription("Shutdown your PC automatically when steam downloads finish")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Diogo Martino")]
[assembly: AssemblyProduct("Steam Auto Shutdown")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyProduct("SAS")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -20,7 +20,7 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d3cf5fd4-1902-4f89-a70a-f3f1d49c2003")]
[assembly: Guid("af52f5c4-4567-47cd-8589-d8663d57cc78")]

// Version information for an assembly consists of the following four values:
//
Expand All @@ -32,5 +32,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("1.0.0")]
[assembly: AssemblyFileVersion("4.0.0")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]

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

Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,4 @@
<data name="steam-icon-steam-icon-11553449126dlqnjdi4pi" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\steam-icon-steam-icon-11553449126dlqnjdi4pi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Steam_icon_logo.svg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Steam_icon_logo.svg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>steam_auto_shutdown.ico</ApplicationIcon>
<ApplicationIcon>steam_auto_shutdown_v2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
Expand Down Expand Up @@ -225,11 +225,9 @@
<ItemGroup>
<None Include="Resources\steam-icon-steam-icon-11553449126dlqnjdi4pi.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Steam_icon_logo.svg.png" />
</ItemGroup>
<ItemGroup>
<Content Include="steam_auto_shutdown.ico" />
<Content Include="steam_auto_shutdown_v2.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
8 changes: 7 additions & 1 deletion Steam Auto Shutdown/Steam Auto Shutdown/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Steam_Auto_Shutdown
{
class Util
{
public static void LogToFile(string message)
public static void LogToFile(string message, bool showMessage = true)
{
try
{
File.AppendAllText("logs.txt", String.Format("{0}\n", message));

if(showMessage)
{
MessageBox.Show(String.Format("An error occurred: \"{0}\"", message), "Error");
}
}
catch { }
}
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 531c8f9

Please sign in to comment.