コード例 #1
0
ファイル: MainPresenter.cs プロジェクト: Ferdinand-vW/NetM
        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);
        }
コード例 #2
0
 private void SelectedCaptureDeviceOnPacketReceived(object sender, IPacketModel packetModel)
 {
     Application.Current.Dispatcher.Invoke(() => this.Packets.Insert(0, packetModel), DispatcherPriority.Background);
 }
コード例 #3
0
 public PacketPresenter(IPacketModel packetModel, IPacketView packetView)
 {
     this.packetModel = packetModel;
 }