protected override void PrepareExecution() { base.PrepareExecution(); interactiveBB84 = InteractiveBB84Factory.generateInteractiveBB84(UIManager.MainWindow, true); IQuantumChannel quantumChannel = QuantumChannelFactory.generateP2PChannel(); IClassicChannel classicChannel = ClassicChannelFactory.generateP2PChannel(); stationMQ = QuantumChannelFactory.generateStation(quantumChannel); stationSQ = QuantumChannelFactory.generateStation(quantumChannel); stationMC = ClassicChannelFactory.generateStation(classicChannel); stationSC = ClassicChannelFactory.generateStation(classicChannel); channelClassicExplorer = new ExplorerChannelForm(UIManager.MainWindow, true); channelClassicExplorer.Channel = interactiveBB84.ChannelClassic; channelClassicExplorer.Description = "Classic Channel"; channelQuantumExplorer = new ExplorerChannelForm(UIManager.MainWindow, true); channelQuantumExplorer.Channel = interactiveBB84.ChannelQuantum; channelQuantumExplorer.Description = "Quantum Channel"; interactiveBB84.OnInteractiveClosed += new EventHandlerInteractive(InteractiveBB84Closed); interactiveBB84.Protocol.OnBurstLogStart += new EventHandlerProtocol(DefaultLoggerBurstLogStart); interactiveBB84.Protocol.OnBurstLogFinish += new EventHandlerProtocol(DefaultLoggerBurstLogFinish); int margin = 20; interactiveBB84.Location = new System.Drawing.Point( margin, margin ); channelClassicExplorer.Location = new System.Drawing.Point(interactiveBB84.Location.X + interactiveBB84.Size.Width, interactiveBB84.Location.Y); channelClassicExplorer.Size = new System.Drawing.Size(interactiveBB84.Size.Width, interactiveBB84.Size.Height / 2); channelQuantumExplorer.Location = new System.Drawing.Point(channelClassicExplorer.Location.X, channelClassicExplorer.Location.Y + channelClassicExplorer.Size.Height); channelQuantumExplorer.Size = new System.Drawing.Size(channelClassicExplorer.Size.Width, channelClassicExplorer.Size.Height); }
// CONSTRUCTOR public DualChannelStationBasic() : base() { _defaultType = InformationType.UndefinedInformation; _ClassicStation = ClassicChannelFactory.generateStation(); _ClassicStation.OnTransmit += new EventHandlerStationData(PropagateOnTransmit); _ClassicStation.OnReceive += new EventHandlerStationData(PropagateOnReceive); _quantumStation = QuantumChannelFactory.generateStation(); _quantumStation.OnTransmit += new EventHandlerStationData(PropagateOnTransmit); _quantumStation.OnReceive += new EventHandlerStationData(PropagateOnReceive); }
// TRANSMISSOR //static public IClassicChannelTransmissor generateTransmissor(IClassicChannelStation station, IClassicChannel channel) //{ // return new ClassicChannelTransmissorBasic(station, channel); //} public static IClassicChannelTransmissor generateTransmissor(IClassicChannelStation station) { return new ClassicChannelTransmissorBasic(station); }
// RECEIVER //static public IClassicChannelReceiver generateReceiver(IClassicChannelStation station, IClassicChannel channel) //{ // return new ClassicChannelReceiverBasic(station, channel); //} public static IClassicChannelReceiver generateReceiver(IClassicChannelStation station) { return new ClassicChannelReceiverBasic(station); }