Пример #1
0
        public MainForm()
        {
            InitializeComponent();
            Icon        = Resources.Icon;
            niMain.Icon = Resources.Icon;
            DebugHelper.Init(LogsFilePath);

            networkMonitor = new NetworkMonitor();
            networkMonitor.NetworkStatusChanged += NetworkMonitor_NetworkStatusChanged;
            networkMonitor.StartMonitorThread();
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();
            Text        = Program.Title;
            Icon        = Resources.Icon;
            niMain.Icon = Resources.Icon;

            tsbOpenLogFile.Enabled = Directory.Exists(Program.LogsFolder);

            networkMonitor = new NetworkMonitor();
            networkMonitor.NetworkStatusChanged += NetworkMonitor_NetworkStatusChanged;
            networkMonitor.Start();

            UpdateStatusBar();
        }
        public MainWindow()
        {
            InitializeComponent();
            Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),
                new FrameworkPropertyMetadata { DefaultValue = 20 });

            monitor = new NetworkMonitor.NetworkMonitor();
            monitor.PacketReceived += new PacketReceviedEventHandler((p) =>
            {
                Dispatcher.BeginInvoke(
                    new Action(() =>
                    {
                        this.dataGridPackets.Items.Add(p);
                    }));

            });

            statusBar.DataContext = monitor;
            btnPause.IsEnabled = false;

            this.chartTraffic.Series.Clear();
            InitializeIcon();
        }
        public MainWindow()
        {
            InitializeComponent();
            Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),
                                                               new FrameworkPropertyMetadata {
                DefaultValue = 20
            });

            monitor = new NetworkMonitor.NetworkMonitor();
            monitor.PacketReceived += new PacketReceviedEventHandler((p) =>
            {
                Dispatcher.BeginInvoke(
                    new Action(() =>
                {
                    this.dataGridPackets.Items.Add(p);
                }));
            });

            statusBar.DataContext = monitor;
            btnPause.IsEnabled    = false;

            this.chartTraffic.Series.Clear();
            InitializeIcon();
        }
 static void Main(string[] args)
 {
     NetworkMonitor.NetworkMonitor monitor = new NetworkMonitor.NetworkMonitor();
     monitor.StartListening();
 }
Пример #6
0
 static void Main(string[] args)
 {
     NetworkMonitor.NetworkMonitor monitor = new NetworkMonitor.NetworkMonitor();
     monitor.StartListening();
 }