不再预先分配VID
自动分配后自动排序
This commit is contained in:
parent
bbb7804831
commit
417f761e40
@ -284,6 +284,13 @@ namespace Plane.FormationCreator.Formation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ReSort()
|
||||||
|
{
|
||||||
|
SortType = _SortType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int _EnCopterNumber = 0;
|
private int _EnCopterNumber = 0;
|
||||||
|
@ -143,6 +143,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
copter.VirtualId = SingleVirtualId;
|
copter.VirtualId = SingleVirtualId;
|
||||||
Message.Show($"飞机{copter.Name} 设置编号={SingleVirtualId}");
|
Message.Show($"飞机{copter.Name} 设置编号={SingleVirtualId}");
|
||||||
}
|
}
|
||||||
|
_copterManager.ReSort();
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -202,6 +203,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_copterManager.ReSort();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
id: id,
|
id: id,
|
||||||
name: id
|
name: id
|
||||||
);
|
);
|
||||||
copter.VirtualId = _virtualCopterId;
|
//不再预先分配VID
|
||||||
|
// copter.VirtualId = _virtualCopterId;
|
||||||
await copter.ConnectAsync();
|
await copter.ConnectAsync();
|
||||||
await copter.GetCopterDataAsync();
|
await copter.GetCopterDataAsync();
|
||||||
_copterManager.Copters.AddCopter(copter, _copterManager.SortType);
|
_copterManager.Copters.AddCopter(copter, _copterManager.SortType);
|
||||||
|
Loading…
Reference in New Issue
Block a user