separated Display settings in SendReceiveView
implemented Send Data Textbox not cleared when sending was not successful,
worked on formatting,
removed selector in MultiFormatDataView,
cleanup
if(this.CommunicationProtocol==null){thrownewNullReferenceException($"'{nameof(SendToCommunicationProtocol)}()' was called but {nameof(CommunicationProtocol)} is null.");}
if(this.CommunicationProtocol==null){thrownewNullReferenceException($"'{nameof(SendToCommunicationProtocol)}()' was called but {nameof(CommunicationProtocol)} is null.");}
@ -164,7 +165,7 @@ public abstract partial class TerminalViewModel : ObservableObject, ITerminalVie
// guard is not connected => log warning. user of this function shall only use SendBytes if IsConnected is true
// guard is not connected => log warning. user of this function shall only use SendBytes if IsConnected is true
if(this.IsConnected==false){this.logger.LogWarn($"'{nameof(SendBytes)}()' was reached with {nameof(IsConnected)} being false",nameof(CommunicationProtocol));}
if(this.IsConnected==false)
{
this.logger.LogWarn($"'{nameof(SendBytes)}()' was reached with {nameof(IsConnected)} being false",nameof(CommunicationProtocol));
returnfalse;// return and do not send
}
// send bytes and if the sending was cancelled report error
// send bytes
if(this.InternalSendBytes(bytes)==false)
success=this.InternalSendBytes(bytes);
// if the sending was cancelled report error
if(success==false)
{
{
this.logger.LogError($"'{nameof(SendBytes)}()' failed to send during {nameof(InternalSendBytes)}.",nameof(CommunicationProtocol));
this.logger.LogError($"'{nameof(SendBytes)}()' failed to send during {nameof(InternalSendBytes)}.",nameof(CommunicationProtocol));
this.messenger.Send<IUserInterfaceMessage>(newGenericUserInterfaceMessage("Failed to send message",MessageImportance.High));
this.messenger.Send<IUserInterfaceMessage>(newGenericUserInterfaceMessage("Failed to send message",MessageImportance.High));