Пример #1
0
 public void SetAppIcon(IntPtr window, string filename)
 {
     try
     {
         filename = IconHandler.IconFullPath(filename);
         if (string.IsNullOrWhiteSpace(filename))
         {
             IntPtr error = IntPtr.Zero;
             NativeMethods.gtk_window_set_icon_from_file(window, filename, out error);
             if (error != IntPtr.Zero)
             {
                 Log.Error("Icon handle not successfully freed.");
             }
         }
     }
     catch (Exception exception)
     {
         Log.Error(exception);
     }
 }
Пример #2
0
 protected virtual void SetAppIcon(IntPtr window, string filename)
 {
     try
     {
         filename = IconHandler.IconFullPath(filename);
         if (!string.IsNullOrWhiteSpace(filename))
         {
             IntPtr error = IntPtr.Zero;
             gtk_window_set_icon_from_file(window, filename, out error);
             if (error != IntPtr.Zero)
             {
                 Logger.Instance.Log.Error("Icon handle not successfully freed.");
             }
         }
     }
     catch (Exception exception)
     {
         Logger.Instance.Log.Error(exception);
     }
 }