public void DeletePosition() { // // Delete the co-pilot position for Dickthunder 1 fleet.DeletePosition("4832yufdjn45iua"); Assert.AreEqual(4, fleet.TotalPositions); Assert.IsNull(roster[2].position); }
public void DeletePosition(string uuid) { fleet.DeletePosition(uuid); PushToAll(new ANWI.Messaging.Ops.UpdatePositions( null, null, new List <string>() { uuid })); }
private void ProcessUpdatePositions(ANWI.Messaging.IMessagePayload p) { ANWI.Messaging.Ops.UpdatePositions up = p as ANWI.Messaging.Ops.UpdatePositions; if (up.added != null) { foreach (OpPosition pos in up.added) { fleet.AddPosition(pos); } } if (up.changed != null) { foreach (OpPosition pos in up.changed) { OpPosition old = fleet.GetPosition(pos.uuid); if (old != null) { old.critical = pos.critical; } } } if (up.removed != null) { foreach (string rem in up.removed) { fleet.DeletePosition(rem); } } RebuildC2(); NotifyPropertyChanged(string.Empty); }