public override void Initialization() { XmlDocument doc = GameRoot.gameResource.LoadResource_PublicXmlFile("GameOptions.xml"); XmlNode root = doc.SelectSingleNode("GameOptions"); XmlNode node = root.SelectSingleNode("GameInputMode"); ComPortIndex = (int)FTConvert.AutoToInt32(node.Attribute("iocom")); doc = GameRoot.gameResource.LoadResource_PublicXmlFile("Inputconfig.xml"); root = doc.SelectSingleNode("inputconfig"); Players = Convert.ToInt32(root.Attribute("players")); node = root.SelectSingleNode("IO"); SystemButtonKey = Convert.ToInt32(node.Attribute("sytemValue")); SystemLeftButtonKey = Convert.ToInt32(node.Attribute("systemLeftValue")); SystemRightButtonKey = Convert.ToInt32(node.Attribute("systemRightValue")); XmlNodeList playerNodeList = node.SelectNodes("player"); for (int i = 0; i < playerNodeList.Count; i++) { PlayerList[i].Initialization(playerNodeList[i]); } serialPortInput = null; serialPortInput = new SerialPortInput(); //serialPortInputTrack = new SerialPortInputTrack(); //serialPortInput.traceObject = serialPortInputTrack; if (!serialPortInput.Initialization(SerialPortAccessType.Type_DDR_Android, ComPortIndex, new SerialPortDeviceAccessConstructorJava())) { throw new Exception("Initialization DDR IO Device Err!"); } }