Пример #1
0
 public void TrayIconChanging(AddonTrayIconEventArgs e)
 {
     if (SystemParameters.HighContrast)
     {
         e.Icon = IconUtils.ColorIcon(e.Icon, e.Kind, SystemColors.WindowTextColor);
     }
 }
Пример #2
0
        public static Icon CreateAndResolveThroughBuiltInAddons(IconKind kind)
        {
            var args = new AddonTrayIconEventArgs {
                Kind = kind, Icon = Create(kind)
            };

            foreach (var addon in BuiltInItems.OrderBy(b => b.Priority))
            {
                addon.TrayIconChanging(args);
            }
            return(args.Icon);
        }
Пример #3
0
 public void TrayIconChanging(AddonTrayIconEventArgs e)
 {
     if (!SystemParameters.HighContrast)
     {
         if (SystemSettings.IsSystemLightTheme)
         {
             e.Icon = IconUtils.ColorIcon(e.Icon, e.Kind, Colors.Black);
         }
         else
         {
             // It's the default so don't bother doing anything.
         }
     }
 }
Пример #4
0
 public void TrayIconChanging(AddonTrayIconEventArgs e)
 {
     if (SettingsService.UseLegacyIcon)
     {
         if (SystemSettings.IsSystemLightTheme)
         {
             e.Icon = new Icon(Application.GetResourceStream(new Uri("pack://application:,,,/EarTrumpet;component/Assets/Application.ico")).Stream);
         }
         else
         {
             e.Icon = TrayIconFactory.Create(IconKind.OriginalIcon);
         }
     }
 }
Пример #5
0
        public static Icon CreateAndResolveAll(IconKind kind)
        {
            var items = BuiltInItems.ToList();

            if (AddonItems != null)
            {
                items.AddRange(AddonItems);
            }
            items = items.OrderBy(b => b.Priority).ToList();
            var args = new AddonTrayIconEventArgs {
                Kind = kind, Icon = Create(kind)
            };

            foreach (var addon in items)
            {
                addon.TrayIconChanging(args);
            }
            return(args.Icon);
        }