private Ticker([NotNull] IServiceProvider provider) { if (provider == null) throw new ArgumentNullException(nameof(provider)); _serviceProvider = provider; _forumsAggregatesService = _serviceProvider.GetRequiredService<IForumsAggregatesService>(); _aggregatesChangedSubscription = _forumsAggregatesService.AggregatesChanged.Subscribe(arg => UpdateUnread()); BorderColor = Color.White; // _janusApplication = ApplicationManager.Instance; FormBorderStyle = FormBorderStyle.FixedToolWindow; Size = new Size(160, 32); TopMost = true; ShowInTaskbar = false; StartPosition = FormStartPosition.Manual; SetStyle(ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); _backImage = new Bitmap( Assembly .GetAssembly(GetType()) .GetRequiredResourceStream("Rsdn.Janus.Core.Ticker.tickerbg.png")); BackColor = Color.FromArgb(255, 0, 255); TransparencyKey = BackColor; CustomInitializeComponents(); }
private Ticker([NotNull] IServiceProvider provider) { if (provider == null) { throw new ArgumentNullException("provider"); } _serviceProvider = provider; _forumsAggregatesService = _serviceProvider.GetRequiredService <IForumsAggregatesService>(); _aggregatesChangedSubscription = _forumsAggregatesService.AggregatesChanged.Subscribe(arg => UpdateUnread()); BorderColor = Color.White; // _janusApplication = ApplicationManager.Instance; FormBorderStyle = FormBorderStyle.FixedToolWindow; Size = new Size(160, 32); TopMost = true; ShowInTaskbar = false; StartPosition = FormStartPosition.Manual; SetStyle(ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); _backImage = new Bitmap( Assembly .GetAssembly(GetType()) .GetRequiredResourceStream("Rsdn.Janus.Core.Ticker.tickerbg.png")); BackColor = Color.FromArgb(255, 0, 255); TransparencyKey = BackColor; CustomInitializeComponents(); }
public NotifyIconActivePart([NotNull] IServiceProvider serviceProvider) : base(serviceProvider) { _notifyIconService = ServiceProvider.GetService<INotifyIconService>(); _forumsAggregatesService = ServiceProvider.GetService<IForumsAggregatesService>(); }
public NotifyIconActivePart([NotNull] IServiceProvider serviceProvider) : base(serviceProvider) { _notifyIconService = ServiceProvider.GetService <INotifyIconService>(); _forumsAggregatesService = ServiceProvider.GetService <IForumsAggregatesService>(); }