/// <summary> /// Constructs an animator /// </summary> /// <param name="trayIcon">Tray icon to work with</param> /// <param name="restStateIcon">Icon to use when not animating</param> /// <param name="animationFrames">Frames to use during animation</param> public TrayIconAnimator( ITrayIcon trayIcon, Icon restStateIcon, params Icon[] animationFrames) { _trayIcon = trayIcon; _restStateIcon = restStateIcon; _animationFrames = animationFrames; }
private void SetIconInstance(object rootModel, ITrayIcon icon) { var instance = rootModel as ISetTrayIconInstance; if (instance != null) { instance.Icon = icon; } }
public LastLayoutUtility( IINIFile config, ILayoutRestorer layoutRestorer, IEventAggregator eventAggregator, ITrayIcon trayIcon ) { _config = config; _layoutRestorer = layoutRestorer; _trayIcon = trayIcon; eventAggregator .GetEvent <LayoutRestoredEvent>() .Subscribe(OnLayoutRestored); }
public App() { _container = new WindsorContainer(); _container.Install(FromAssembly.This()); _trayIcon = _container.Resolve <ITrayIcon>(); _logger = _container.Resolve <ILogger>(); SquirrelAwareApp.HandleEvents( onInitialInstall: InitialInstall, onAppUpdate: AppUpdate, onAppUninstall: AppUninstall); }
public WindowService(IAppSettingsService appSettingsService, IUserSettingsService userSettingsService, ITrayIcon trayIcon, [ImportMany] IEnumerable <ExportFactory <IShell, IShellMetaData> > shellFactories, MeasureProvider measureProvider) { this.appSettingsService = appSettingsService; this.userSettingsService = userSettingsService; this.trayIcon = trayIcon; this.shellFactories = shellFactories; this.measureProvider = measureProvider; limitNotifyWindow = GetShell("Limit toast window"); limitNotifyWindow.Show(); }
public LayoutRestorer( IINIFile config, IApplicationRestarter applicationRestarter, ISectionNameHelper sectionNameHelper, IDesktopWindowUtil desktopWindowUtil, IEventAggregator eventAggregator, ITrayIcon trayIcon, IDeviceReenumerator deviceReenumerator ) { _config = config; _applicationRestarter = applicationRestarter; _sectionNameHelper = sectionNameHelper; _desktopWindowUtil = desktopWindowUtil; _eventAggregator = eventAggregator; _trayIcon = trayIcon; _deviceReenumerator = deviceReenumerator; }
public TrayIcon() { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { _InternalTrayIcon = new MacOsTrayIcon(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _InternalTrayIcon = new WindowsTrayIcon(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { _InternalTrayIcon = new LinuxTrayIcon(); } else { throw new PlatformNotSupportedException(); } }
static NotifyIconImpl() { if (PlatformUtils.IsWindows) { #if WindowsNoARM Instance = new ThePBone.Interop.Win32.TrayIcon.TrayIcon(); #else Instance = new Dummy.TrayIcon(); /* No ARM support */ #endif } else if (PlatformUtils.IsLinux) { Instance = new ThePBone.Interop.Linux.TrayIcon.TrayIcon(); } else { throw new PlatformNotSupportedException(); } Instance.PreferDarkMode = SettingsProvider.Instance.DarkMode == DarkModes.Dark; ThemeUtils.ThemeReloaded += OnThemeReloaded; }
public static void Main(string[] args) { var processValidator = new ProcessValidator(); processValidator.CheckProcessExisting(); var app = new App(); var container = new IocContainer(); container.BuildContainer(); app.Resources["Container"] = container; ITrayIcon trayIcon = container.Container.Resolve <ITrayIcon>(); Program program = new Program(trayIcon); Process.Start("TEK.Updater.exe"); loginWindow = new LoginWindowView(); app.Run(loginWindow); }
public Program(ITrayIcon trayIcon) { this.trayIcon = trayIcon; Messenger.Default.Register <NotificationMessage>(this, NotificationMessageReceived); }
public TrayModule(ITrayIcon trayIcon) { _trayIcon = trayIcon; }