将IOstate和Event修改为枚举