2using System.Collections.Generic;
5using System.Runtime.InteropServices.WindowsRuntime;
6using Windows.Foundation;
7using Windows.Foundation.Collections;
9using Windows.UI.Xaml.Controls;
10using Windows.UI.Xaml.Controls.Primitives;
11using Windows.UI.Xaml.Data;
12using Windows.UI.Xaml.Input;
13using Windows.UI.Xaml.Media.Imaging;
14using Windows.UI.Xaml.Navigation;
17using System.Threading.Tasks;
28 private static MainPage instance =
null;
37 if (eventSink is
null)
46 App.OwnershipChanged += this.App_OwnershipChanged;
49 private Task App_OwnershipChanged(
object Sender, EventArgs e)
51 if (
string.IsNullOrEmpty(
App.OwnerJid))
53 this.OwnerLabel.Visibility = Visibility.Collapsed;
54 this.Owner.Visibility = Visibility.Collapsed;
55 this.QrCodeLabel.Visibility = Visibility.Visible;
56 this.QrCode.Source =
new BitmapImage(
new Uri(
App.QrCodeUrl));
57 this.QrCode.Visibility = Visibility.Visible;
61 this.OwnerLabel.Visibility = Visibility.Visible;
62 this.Owner.Text =
App.OwnerJid;
63 this.Owner.Visibility = Visibility.Visible;
64 this.QrCodeLabel.Visibility = Visibility.Collapsed;
65 this.QrCode.Visibility = Visibility.Collapsed;
68 return Task.CompletedTask;
71 private void Page_Unloaded(
object _, RoutedEventArgs __)
73 if (!(sniffer is
null) && sniffer.ListView ==
this.SnifferListView)
76 if (!(eventSink is
null) && eventSink.
ListView ==
this.EventsListView)
89 get {
return sniffer; }
94 get {
return instance; }
Static class managing the application event log. Applications and services log events on this static ...
static void Register(IEventSink EventSink)
Registers an event sink with the event log. Call Unregister(IEventSink) to unregister it,...
static bool Unregister(IEventSink EventSink)
Unregisters an event sink from the event log.
virtual void Dispose()
IDisposable.Dispose()
Provides application-specific behavior to supplement the default Application class.
An empty page that can be used on its own or navigated to within a Frame.
void InitializeComponent()
InitializeComponent()
Event sink displaying incoming events in a ListView component.
ListView ListView
Component receiving logged events.
Sniffer displaying incoming events in a ListView component.