Skip to content

Commit

Permalink
2021-March-3
Browse files Browse the repository at this point in the history
  • Loading branch information
HovKlan-DH committed Mar 3, 2021
1 parent 5f13bbf commit 647cf5b
Show file tree
Hide file tree
Showing 13 changed files with 1,358 additions and 411 deletions.
794 changes: 597 additions & 197 deletions HovText/History.cs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion HovText/HovText.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<RunCodeAnalysis>false</RunCodeAnalysis>
<Prefer32Bit>true</Prefer32Bit>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -158,7 +159,6 @@
<EmbeddedResource Include="Update.resx">
<DependentUpon>Update.cs</DependentUpon>
</EmbeddedResource>
<None Include="HovText_TemporaryKey.pfx" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -174,6 +174,8 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Favorite.png" />
<None Include="Resources\favorite.jpg" />
<None Include="Resources\donate.gif" />
<EmbeddedResource Include="NHotkey.WindowsForms.dll" />
<EmbeddedResource Include="NHotkey.dll" />
Expand Down
20 changes: 11 additions & 9 deletions HovText/Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Management;
using Microsoft.Win32;


namespace HovText
{

Expand Down Expand Up @@ -64,15 +63,18 @@ public static void EndLogging()

public static void Log(string logMessage)
{
if (logMessage == "")
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + Settings.troubleshootLogfile, Environment.NewLine);
}
else
if (Settings.isTroubleshootEnabled)
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + Settings.troubleshootLogfile, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + " " + logMessage + Environment.NewLine);
if (logMessage == "")
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + Settings.troubleshootLogfile, Environment.NewLine);
}
else
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + Settings.troubleshootLogfile, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + " " + logMessage + Environment.NewLine);
}
}

Debug.WriteLine(logMessage);
}

Expand Down Expand Up @@ -148,7 +150,7 @@ private static string CheckFor45DotVersion(int releaseKey)
return "newer than 4.8";
} else
{
return "4 or older";
return "older than 4.5";
}
break;
}
Expand Down
4 changes: 2 additions & 2 deletions HovText/PasteOnHotkey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void PasteOnHotkey_KeyUp(object sender, KeyEventArgs e)
SendKeys.SendWait("^v"); // send "CTRL + v" (paste from clipboard)
StartTimerToRestoreOriginal();

if (Settings.isTroubleshootEnabled) Logging.Log("Pasted cleartext clipboard");
Logging.Log("Pasted cleartext clipboard");
}
}

Expand Down Expand Up @@ -82,7 +82,7 @@ private void OnTimedEvent(object source, ElapsedEventArgs e)
// We do no longer need to paste cleartext
Settings.pasteOnHotkeySetCleartext = false;

if (Settings.isTroubleshootEnabled) Logging.Log("Pasted original clipboard");
Logging.Log("Pasted original clipboard");
}


Expand Down
4 changes: 2 additions & 2 deletions HovText/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static int Main(string[] args)
{
string txt = "HovText is already running and cannot startup one more instance";

if (Settings.isTroubleshootEnabled) Logging.Log("Exception #1 (Program):");
if (Settings.isTroubleshootEnabled) Logging.Log(" "+ txt);
Logging.Log("Exception #1 (Program):");
Logging.Log(" "+ txt);

MessageBox.Show(txt,"HovText is already running", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
Expand Down
4 changes: 2 additions & 2 deletions HovText/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HovText")]
[assembly: AssemblyDescription("An advanced Windows .NET open source clipboard manager")]
[assembly: AssemblyDescription("A simple Windows .NET open source clipboard manager")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCompany("The Hovgaard Klan")]
[assembly: AssemblyProduct("HovText")]
Expand All @@ -17,7 +17,7 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("03fbad69-cd44-4a0c-b4bf-90406561f14f")]
//[assembly: AssemblyVersion("2021.01.23.1")]
[assembly: AssemblyFileVersion("2021.01.27.0")]
[assembly: AssemblyFileVersion("2021.03.03.1")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
10 changes: 10 additions & 0 deletions HovText/Properties/Resources.Designer.cs

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

4 changes: 4 additions & 0 deletions HovText/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@
rEEAAKxBAACsQYABrEHAA6xB4AesQf//rEE=
</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Favorite" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Favorite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Hotkey" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAMDAAAAEAIACoJQAANgAAACAgAAABACAAqBAAAN4lAAAQEAAAAQAgAGgEAACGNgAAKAAAADAA
Expand Down
Binary file added HovText/Resources/Favorite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HovText/Resources/favorite.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 647cf5b

Please sign in to comment.