Beispiel #1
0
        private object ChosseDevice(DEVICED_TYPD deviceType, string[] macOrDevice)
        {
            object _target = null;

            switch (deviceType)
            {
            case DEVICED_TYPD.MACS:
                _target = new Macs(macOrDevice);
                break;

            case DEVICED_TYPD.DEVICE_ONE:
                _target = new DeviceId_1(macOrDevice[0]);
                break;

            case DEVICED_TYPD.DEVICE_TWO:
                _target = new DeviceId_2(macOrDevice[0], macOrDevice[1]);
                break;

            case DEVICED_TYPD.DEVICE_THREE:
                _target = new DeviceId_3(macOrDevice[0], macOrDevice[1], macOrDevice[2]);
                break;
            }
            return(_target);
        }
Beispiel #2
0
 public SndToMasterData(string token_param, string gameId_param, string[] macOrDevice_param, DEVICED_TYPD deviceType)
 {
     try
     {
         m_token      = token_param;
         m_gameId     = gameId_param;
         m_socketType = ((int)SOCKET_TYPE.SOCKET).ToString();
         m_deviceType = ((int)deviceType).ToString();
         m_deviceId   = ChosseDevice(deviceType, macOrDevice_param);
     }
     catch (Exception ee)
     {
         DebugQy.LogWarning("SndToMasterData():There is a wrong operation :" + ee.Message);
     }
 }