public static SyncStateCommand ClearOfftracks() { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.ClearOfftracks; return(command); }
public static SyncStateCommand UpdateOfftracks(List <Offtrack> offtracks) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.Offtracks; command.Data = new { Offtracks = offtracks }; return(command); }
public static SyncStateCommand UpdateLiveStatus(bool live) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.LiveStatusChanged; command.Data = new { IsLive = live }; return(command); }
public static SyncStateCommand UpdateWatchedDriver(int carId) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.WatchedDriverChanged; command.Data = new { CarId = carId }; return(command); }
public static SyncStateCommand DeletePenalty(Penalty penalty) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.DeletePenalty; command.Data = new { PenaltyId = penalty.Id }; return(command); }
public static SyncStateCommand EditPenalty(Penalty penalty) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.EditPenalty; command.Data = new { Penalty = penalty }; return(command); }
public static SyncStateCommand DeleteEvent(ReplayEvent @event) { var command = new SyncStateCommand(); command.StateUpdateType = SyncStateCommand.StateUpdateTypes.DeleteEvent; command.Data = new { Event = @event }; return(command); }
public void SendStateUpdate(SyncStateCommand command) { Debug.WriteLine(">> Sending state update: " + command); this.SendCommand(command); this.OnStateUpdated(); }