示例#1
0
 internal void RemoveFromMachineList(SlaveInfo Slave)
 {
     lock (MasterServer.Connections)
         try
         {
             Invoke(new Action(() => CheLisBox_ConnectedMachines.Items.Remove(Slave.ToString())));
         }
         catch { }
 }
示例#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 { }
 }
示例#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);
        }
示例#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 { }
 }