Removed unused usings, and fixed an icon issue.

This commit is contained in:
Robin Krom 2022-04-08 22:24:55 +02:00
commit cfe7d69a29
No known key found for this signature in database
GPG key ID: BCC01364F1371490
6 changed files with 5 additions and 8 deletions

View file

@ -30,7 +30,6 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Dapplo.Windows.Icons;
using Greenshot.Base.Controls;
using Greenshot.Base.Core.Enums;
using Greenshot.Base.Core.FileFormatHandlers;

View file

@ -22,7 +22,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
@ -160,10 +159,13 @@ namespace Greenshot.Base.Core
try
{
var appIcon = IconHelper.ExtractAssociatedIcon<Bitmap>(path, index, CoreConfig.UseLargeIcons);
Debug.Assert(appIcon != null && (appIcon.Width*appIcon.Height > 0), "Invalid icon");
if (appIcon != null)
{
Log.DebugFormat("Loaded icon for {0}, with dimensions {1}x{2}", path, appIcon.Width, appIcon.Height);
return appIcon;
}
return appIcon;
}
catch (Exception exIcon)
{
Log.Error("error retrieving icon: ", exIcon);

View file

@ -22,7 +22,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using Dapplo.Windows.Common.Structs;

View file

@ -19,7 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System.Drawing;
using Dapplo.Windows.Common.Extensions;
using Dapplo.Windows.Common.Structs;

View file

@ -26,7 +26,6 @@ using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using Dapplo.Windows.Common.Structs;
using Dapplo.Windows.Common.TypeConverters;
using Dapplo.Windows.Gdi32.Enums;
using Dapplo.Windows.Gdi32.Structs;
using Greenshot.Base.Core;

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;