コード例 #1
0
 public DCSRadioSyncManager(SendRadioUpdate clientRadioUpdate, ClientSideUpdate clientSideUpdate,
                            string guid, DCSRadioSyncHandler.NewAircraft _newAircraftCallback)
 {
     IsListening          = false;
     _lineOfSightHandler  = new DCSLineOfSightHandler(guid);
     _udpCommandHandler   = new UDPCommandHandler();
     _dcsGameGuiHandler   = new DCSGameGuiHandler(clientSideUpdate);
     _dcsRadioSyncHandler = new DCSRadioSyncHandler(clientRadioUpdate, _newAircraftCallback);
 }
コード例 #2
0
 public DCSRadioSyncManager(SendRadioUpdate clientRadioUpdate, ClientSideUpdate clientSideUpdate,
                            ConcurrentDictionary <string, SRClient> clients, string guid, DCSRadioSyncHandler.NewAircraft _newAircraftCallback)
 {
     this._clients        = clients;
     IsListening          = false;
     _lineOfSightHandler  = new DCSLineOfSightHandler(clients, guid);
     _udpCommandHandler   = new UDPCommandHandler();
     _dcsGameGuiHandler   = new DCSGameGuiHandler(clientSideUpdate);
     _dcsRadioSyncHandler = new DCSRadioSyncHandler(clientRadioUpdate, _clients, _newAircraftCallback);
 }
コード例 #3
0
        public DCSRadioSyncManager(SendRadioUpdate clientRadioUpdate, ClientSideUpdate clientSideUpdate,
                                   string guid, DCSRadioSyncHandler.NewAircraft _newAircraftCallback)
        {
            _clientRadioUpdate   = clientRadioUpdate;
            _clientSideUpdate    = clientSideUpdate;
            IsListening          = false;
            _lineOfSightHandler  = new DCSLineOfSightHandler(guid);
            _udpCommandHandler   = new UDPCommandHandler();
            _dcsGameGuiHandler   = new DCSGameGuiHandler(clientSideUpdate);
            _dcsRadioSyncHandler = new DCSRadioSyncHandler(clientRadioUpdate, _newAircraftCallback);

            _clearRadio = new DispatcherTimer(DispatcherPriority.Background, Application.Current.Dispatcher)
            {
                Interval = TimeSpan.FromSeconds(1)
            };
            _clearRadio.Tick += CheckIfRadioIsStale;
        }