Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new MainViewModel();

#if DEBUG
            NetworkListener.Log += (string data) =>
            {
                Application.Current.Dispatcher.Invoke(new Action(() => {
                    log.AppendText(data + "\n");
                }));
            };
#else
            logSection.Visibility = Visibility.Collapsed;
#endif

            NetworkListener.Start();
        }
Beispiel #2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     NetworkListener.Stop();
 }