public Form1(ILogger <Form1> logger, IBindLogData logDataBinder) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _bindingSource = logDataBinder.Source; _trayIcon = new TrayIcon(this.SetIcon); InitializeComponent(); _muteButtonFactory = new MuteButtonFactory(_logger); _audioController = new AudioController(); this.Icon = Properties.Resources.microphone_black; notifyIcon1.Icon = Muffle.Properties.Resources.microphone_black; InitializeSettings(); InitializeButton(); CheckMuteStatus(); timer1.Interval = (int)TimeSpan.FromSeconds(5).TotalMilliseconds; timer1.Tick += CheckMuteStatusEventHandler; timer1.Enabled = true; }
public static LoggerConfiguration WinformsLoggingSink(this LoggerSinkConfiguration loggerConfiguration, IBindLogData logDataBinder, IFormatProvider formatProvider = null) { return(loggerConfiguration.Sink(new WinformsLoggingSink(logDataBinder))); }
public WinformsLoggingSink(IBindLogData logDataBinder) { _logDataBinder = logDataBinder; }