public NotifyIconPresenter(INotifyIconView view, IVolumeMonitor volumeMonitor, ISettingsManager settings, IInjector injector) { this.settings = settings; this.injector = injector; this.volumeMonitor = volumeMonitor; this.view = view; this.view.ExitClick += view_ExitClick; this.view.StartStopClick += view_NotifyIconClick; this.view.OptionsClick += view_OptionsClick; this.view.UpdateStatus(this.volumeMonitor.Enabled); }
public OptionsPresenter(IOptionsView view, IVolumeMonitor volumeMonitor, ISettingsManager settings) { this.settings = settings; this.view = view; this.volumeMonitor = volumeMonitor; volumeStatusTimer = new Timer { Interval = 100, Enabled = true }; volumeStatusTimer.Tick += volumeStatusTimer_Tick; view.MaxVolume = volumeMonitor.MaxVolume; view.MaxLoudness = volumeMonitor.MaxLoudness; view.CultureCode = GetCurrentCultureCode(); RefreshSoundMetrics(); this.view.MaxVolumeChanged += view_MaxVolumeChanged; this.view.MaxLoudnessChanged += view_MaxLoudnessChanged; this.view.CultureCodeChanged += view_CultureCodeChanged; this.view.Closed += view_Closed; }