private void HandleMessage(MessageRecievedEventArgs message) { switch (message.Status) { case MessageTypeEnum.P_SEND: case MessageTypeEnum.P_SENDALL: GetPhotos?.Invoke(this, message); break; case MessageTypeEnum.P_DELETE: PhotoPackage photo = PhotoPackage.Deserialize(message.Message); OnDeletePhoto(this, photo); break; case MessageTypeEnum.SETTINGS: Settings settings = Settings.Deserialize(message.Message); SetSettings?.Invoke(this, settings); break; case MessageTypeEnum.REMOVE_HANDLER: OnHandelRemove?.Invoke(this, message.Message); break; case MessageTypeEnum.L_FAIL: case MessageTypeEnum.L_INFO: case MessageTypeEnum.L_WARNING: OnLogMessage?.Invoke(this, message); break; default: break; } }
private void HandleMessage(MessageRecievedEventArgs message) { switch (message.Status) { case MessageTypeEnum.SETTINGS: Settings settings = Settings.Deserialize(message.Message); SetSettings?.Invoke(this, settings); break; case MessageTypeEnum.REMOVE_HANDLER: OnHandelRemove?.Invoke(this, message.Message); break; case MessageTypeEnum.L_FAIL: case MessageTypeEnum.L_INFO: case MessageTypeEnum.L_WARNING: OnLogMessage?.Invoke(this, message); break; default: break; } }