public MainWindow() { InitializeComponent(); FetchNetworkAdapterStatus(); eventWatcher = new NetworkAdapterEventWatcher(); eventWatcher.NetworkAdapterEventArrived += EventWatcher_NetworkAdapterEventArrived; }
public MainWindow() { InitializeComponent(); notifier_ = new Notifier( config => { config.PositionProvider = new PrimaryScreenPositionProvider(Corner.BottomRight, 5, 5); config.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor( TimeSpan.FromSeconds(5), MaximumNotificationCount.FromCount(5)); //config.Dispatcher = Dispatcher.CurrentDispatcher; config.DisplayOptions.TopMost = true; config.DisplayOptions.Width = 420; }); Application.Current.MainWindow.Closing += MainWindow_Closing; FetchNetworkAdapterStatus(); eventWatcher = new NetworkAdapterEventWatcher(); eventWatcher.NetworkAdapterEventArrived += EventWatcher_NetworkAdapterEventArrived; }