Exemple #1
0
 internal void RemoveFromMachineList(SlaveInfo Slave)
 {
     lock (MasterServer.Connections)
         try
         {
             Invoke(new Action(() => CheLisBox_ConnectedMachines.Items.Remove(Slave.ToString())));
         }
         catch { }
 }
Exemple #2
0
 internal void MarkGameAsStoped(SlaveInfo Slave)
 {
     lock (MasterServer.Connections)
         try
         {
             Invoke(new Action(() =>
             {
                 RunningMachines.Remove(Slave.ToString());
                 LisBox_RunningMachines.Items.Remove(Slave.ToString());
                 if (RunningMachines.Count == 0)
                 {
                     Bu_Start.Enabled = true;
                     Bu_Stop.Enabled  = false;
                 }
             }));
         }
         catch { }
 }
Exemple #3
0
        private void NewConnection(JSONServerSocket e)
        {
            JSONResponse <SlaveInfo> NewConnectionInfo = e.TransmitJSONCommand <PlayGameModel, SlaveInfo>(new JSONAction <PlayGameModel> {
                ActionName = "GetSlaveInfo", ActionData = new PlayGameModel {
                    GUID = AttendantConsole.GUIDGameSelection
                }
            });

            Thread.Sleep(100);
            SlaveInfo Info = NewConnectionInfo.ActionData;

            Info.Connection = e;
            lock (Connections)
                Connections.Add(Info.ToString(), Info);
            AttendantConsole.Log($"{Info} Has Connected.");
            AttendantConsole.AddToMachineList(Info);
        }
Exemple #4
0
 internal void ActivateForTappedCard(SlaveInfo Slave)
 {
     lock (MasterServer.Connections)
         try
         {
             Invoke(new Action(() => CheLisBox_ConnectedMachines.SetItemChecked(CheLisBox_ConnectedMachines.Items.IndexOf(Slave.ToString()), true)));
         }
         catch { }
 }