Пример #1
0
 public void Start()
 {
     GameListener = new GameBroadcastListener(AppConfig.Instance.BroadcastPort);
     GameListener.StartListening();
     UpdateWebsiteTimer          = new Timer(30000);
     UpdateWebsiteTimer.Elapsed += UpdateWebsiteTimerOnElapsed;
 }
Пример #2
0
 public static void Start()
 {
     _gameListener.StartListening();
     _updateWebsiteTimer.Elapsed += UpdateWebsiteTimerOnElapsed;
     if (EnableUpdateTimer)
     {
         _updateWebsiteTimer.Start();
     }
 }
Пример #3
0
 public void Start()
 {
     GameListener = new GameBroadcastListener(AppConfig.Instance.BroadcastPort);
     GameListener.StartListening();
     UpdateWebsiteTimer          = new System.Timers.Timer(10000);
     UpdateWebsiteTimer.Elapsed += UpdateWebsiteTimerOnElapsed;
     if (!AppConfig.Instance.TestMode)
     {
         UpdateWebsiteTimer.Start();
     }
 }
Пример #4
0
        public CustomGameList()
        {
            InitializeComponent();
            broadcastListener = new GameBroadcastListener();
            broadcastListener.StartListening();
            dragHandler = this.ListViewGameList_OnDragDelta;
            ListViewGameList.AddHandler(Thumb.DragDeltaEvent, dragHandler, true);
            HostedGameList = new ObservableCollection <HostedGameViewModel>();
            Program.LobbyClient.Disconnected += LobbyClient_OnDisconnect;

            Spectate             = Prefs.SpectateGames;
            ShowKillGameButton   = Prefs.IsAdmin;
            ShowUninstalledGames = Prefs.HideUninstalledGamesInList == false;

            _refreshGameListTimer = new Timer(RefreshGamesTask, null, 5000, 15000);
        }
Пример #5
0
        public CustomGameList()
        {
            InitializeComponent();
            broadcastListener = new GameBroadcastListener();
            broadcastListener.StartListening();
            dragHandler = this.ListViewGameList_OnDragDelta;
            ListViewGameList.AddHandler(Thumb.DragDeltaEvent, dragHandler, true);
            HostedGameList = new ObservableCollection <HostedGameViewModel>();
            Program.LobbyClient.OnLoginComplete       += LobbyClient_OnLoginComplete;
            Program.LobbyClient.OnDisconnect          += LobbyClient_OnDisconnect;
            Program.LobbyClient.OnDataReceived        += LobbyClient_OnDataReceived;
            Program.LobbyClient.Chatting.OnCreateRoom += ChattingOnOnCreateRoom;

            _spectate            = Prefs.SpectateGames;
            ShowKillGameButton   = Prefs.IsAdmin;
            ShowUninstalledGames = Prefs.HideUninstalledGamesInList == false;
        }
Пример #6
0
        public async Task Test()
        {
            var game = new HostedGame()
            {
                Id       = Guid.NewGuid(),
                HostUser = new User("id", "name")
            };

            using (var broadcaster = new GameBroadcaster(game, 3456)) {
                using (var listener = new GameBroadcastListener(3456)) {
                    broadcaster.StartBroadcasting();
                    listener.StartListening();

                    var waitedGame = await listener.WaitForGame(game.Id);

                    Assert.AreEqual(game.HostUser.Id, waitedGame.HostUser.Id);
                    Assert.AreEqual(game.HostUser.DisplayName, waitedGame.HostUser.DisplayName);
                }
            }
        }
Пример #7
0
        public CustomGameList()
        {
            InitializeComponent();
            broadcastListener = new GameBroadcastListener();
            broadcastListener.StartListening();
            dragHandler = this.ListViewGameList_OnDragDelta;
            ListViewGameList.AddHandler(Thumb.DragDeltaEvent, dragHandler, true);
            HostedGameList = new ObservableCollection <HostedGameViewModel>();
            Program.LobbyClient.OnLoginComplete       += LobbyClient_OnLoginComplete;
            Program.LobbyClient.OnDisconnect          += LobbyClient_OnDisconnect;
            Program.LobbyClient.OnDataReceived        += LobbyClient_OnDataReceived;
            Program.LobbyClient.Chatting.OnCreateRoom += ChattingOnOnCreateRoom;

            timer = new Timer(10000);
            //timer.Start();
            timer.Elapsed         += this.TimerElapsed;
            refreshVisualListTimer = new Timer(10000);
            refreshVisualListTimer.Start();
            refreshVisualListTimer.Elapsed += RefreshGameList;
            ShowRunningGames     = Prefs.ShowRunningGames;
            ShowUninstalledGames = Prefs.HideUninstalledGamesInList == false;
        }
Пример #8
0
 public void Start()
 {
     GameListener = new GameBroadcastListener(AppConfig.Instance.BroadcastPort);
     GameListener.StartListening();
 }