Пример #1
0
 private void CreateHost(string hostName)
 {
     TraceRouteCallback?.Invoke(this, new TraceRouteCallbackEventArgs(hostName));
 }
Пример #2
0
        private void OpenTraceRoute()
        {
            var traceRouteVM = new TraceRouteViewModel()
            {
                Host    = Host,
                _pinger = _pinger
            };

            traceRouteVM.TraceRouteCallback += (object s, TraceRouteCallbackEventArgs e) => TraceRouteCallback?.Invoke(s, e);
            var traceRouteWindow = new Views.TraceRouteWindow()
            {
                DataContext = traceRouteVM
            };

            if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
            {
                traceRouteWindow.ShowDialog(desktop.MainWindow);
            }
        }