Skip to content

Commit

Permalink
updates 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Decimation committed Jul 7, 2021
1 parent 966a713 commit 67ea537
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions SmartImage.Lib/Searching/ImageResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void FindDirectImages()
}
else {
try {

var directImages = ImageHelper.FindDirectImages(Url.ToString(), out var images);

string? direct = directImages?.FirstOrDefault();
Expand All @@ -214,8 +214,8 @@ public void FindDirectImages()

}
}
catch (Exception e) {
Debug.WriteLine(e);
catch {
//
}
}

Expand Down
10 changes: 6 additions & 4 deletions SmartImage.Lib/Utilities/ImageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public static DisplayResolutionType GetDisplayResolution(int w, int h)
}


/*
* Direct images are URIs that point to a binary image file
*/


/// <summary>
/// Determines whether <paramref name="url"/> is a direct image link
/// </summary>
Expand Down Expand Up @@ -133,10 +138,7 @@ public static List<string> FindDirectImages(string url, out List<Image> images,
images = new List<Image>();

var directImages = new List<string>();

// Trace.WriteLine($"{url} | {directType} | {pingTime} | " +
// $"{fragmentSize} | {readImage} | " +
// $"{imageFilter} | {count}");


IHtmlDocument document;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace SmartImage.Core
{
public static class LocalConfig
public static class AppConfig
{
public static string ConfigFile
{
Expand Down
14 changes: 7 additions & 7 deletions SmartImage/Core/AppIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace SmartImage.Core
{
internal enum IntegrationOption
public enum IntegrationOption
{
Add,
Remove
Expand All @@ -27,7 +27,7 @@ internal enum IntegrationOption
/// <summary>
/// Program OS integrations
/// </summary>
internal static class AppIntegration
public static class AppIntegration
{
/*
* HKEY_CLASSES_ROOT is an alias, a merging, of two other locations:
Expand All @@ -37,7 +37,7 @@ internal static class AppIntegration


/// <returns><c>true</c> if operation succeeded; <c>false</c> otherwise</returns>
internal static bool HandleContextMenu(IntegrationOption option)
public static bool HandleContextMenu(IntegrationOption option)
{
/*
* New context menu
Expand Down Expand Up @@ -103,7 +103,7 @@ internal static bool HandleContextMenu(IntegrationOption option)

}

internal static void HandlePath(IntegrationOption option)
public static void HandlePath(IntegrationOption option)
{
switch (option) {
case IntegrationOption.Add:
Expand Down Expand Up @@ -138,7 +138,7 @@ internal static void HandlePath(IntegrationOption option)
}


internal static void ResetIntegrations()
public static void ResetIntegrations()
{
// Computer\HKEY_CLASSES_ROOT\*\shell\SmartImage

Expand All @@ -150,7 +150,7 @@ internal static void ResetIntegrations()
}

[DoesNotReturn]
internal static void Uninstall()
public static void Uninstall()
{
// autonomous uninstall routine

Expand Down Expand Up @@ -185,7 +185,7 @@ internal static void Uninstall()

private const string REG_SHELL_CMD = "SOFTWARE\\Classes\\*\\shell\\SmartImage\\command";

internal static bool IsContextMenuAdded
public static bool IsContextMenuAdded
{
get
{
Expand Down
2 changes: 1 addition & 1 deletion SmartImage/Core/AppInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ internal static class AppInterface
private static void UpdateConfig()
{
Program.Client.Reload();
LocalConfig.SaveConfigFile();
AppConfig.SaveConfigFile();
}

private static TEnum ReadEnum<TEnum>() where TEnum : Enum
Expand Down
2 changes: 1 addition & 1 deletion SmartImage/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static async Task Main(string[] args)

// Update

LocalConfig.ReadConfigFile();
AppConfig.ReadConfigFile();

if (!args.Any()) {
var options = NConsole.ReadOptions(AppInterface.MainMenuDialog);
Expand Down

0 comments on commit 67ea537

Please sign in to comment.