public MainPresenter(MainWindow mainWindow) { //initialize models packetModel = new PacketModel(); //initialize presenters and pass model and view to presenter packetPresenter = new PacketPresenter(packetModel, mainWindow.PacketView); //bind presenters to models packetModel.newPacket += new EventHandler(packetPresenter.OnNewPacket); }
private void SelectedCaptureDeviceOnPacketReceived(object sender, IPacketModel packetModel) { Application.Current.Dispatcher.Invoke(() => this.Packets.Insert(0, packetModel), DispatcherPriority.Background); }
public PacketPresenter(IPacketModel packetModel, IPacketView packetView) { this.packetModel = packetModel; }