修复代码警告:1. 简化对象初始化 2. 设置只读字段
This commit is contained in:
@@ -1129,9 +1129,10 @@ namespace JoyD.Windows.CS.Toprie
|
||||
if (SendCommand(command, out string response))
|
||||
{
|
||||
// 创建默认的ImagePos对象
|
||||
SharedStructures.ImagePos data = new SharedStructures.ImagePos();
|
||||
data.area = new SharedStructures.AreaPos[6];
|
||||
data.spot = new SharedStructures.SpotPos[6];
|
||||
SharedStructures.ImagePos data = new SharedStructures.ImagePos() {
|
||||
area = new SharedStructures.AreaPos[6],
|
||||
spot = new SharedStructures.SpotPos[6]
|
||||
};
|
||||
|
||||
// 这里应该解析完整的响应数据
|
||||
// 简化实现,返回默认值
|
||||
|
||||
Reference in New Issue
Block a user