public virtual void Read(BinaryReader br, List <RvDat> parentDirDats) { Name = br.ReadString(); FileName = br.ReadString(); TimeStamp = br.ReadInt64(); bool foundDat = br.ReadBoolean(); if (foundDat) { int index = br.ReadInt32(); if (index == -1) { ReportError.SendAndShow(Resources.RvBase_Read_Dat_found_without_an_index); } else { Dat = parentDirDats[index]; } } else { Dat = null; } _datStatus = (DatStatus)br.ReadByte(); _gotStatus = (GotStatus)br.ReadByte(); RepStatusReset(); }
private void ProcessMessage(Message msg) { Log.Debug($"Enter ProcessMessage, with a {msg.MessageType}, {msg.GetType()}"); Message reply = null; try { switch (msg.MessageType) { case Message.PossibleMessageTypes.Status: Log.Debug("Process Status Message"); GotStatus?.Invoke(msg); break; default: reply = new ErrorMessage(msg.GameId, $"Monitor does not accept a message of type {msg.MessageType}"); break; } } catch (Exception err) { reply = new ErrorMessage(msg.GameId, err.Message); } if (reply != null) { _comm.Send(reply, msg.SenderEndPoint); } Log.Debug("Leaving ProcessMessage"); }
public virtual void Read(BinaryReader br, List<RvDat> parentDirDats) { Name = br.ReadString(); FileName = br.ReadString(); TimeStamp = br.ReadInt64(); bool foundDat = br.ReadBoolean(); if (foundDat) { int index = br.ReadInt32(); if (index == -1) ReportError.SendAndShow(Resources.RvBase_Read_Dat_found_without_an_index); else Dat = parentDirDats[index]; } else { Dat = null; } _datStatus = (DatStatus)br.ReadByte(); _gotStatus = (GotStatus)br.ReadByte(); RepStatusReset(); }
public void SetStatus(DatStatus dt, GotStatus flag) { _datStatus = dt; _gotStatus = flag; RepStatusReset(); }
public void SetStatus(DatStatus dt, GotStatus flag) { _datStatus = dt; _gotStatus = flag; RepStatusReset(); }