Develop #10
@@ -111,10 +111,10 @@ namespace DoctorApp.Utils
|
|||||||
Console.WriteLine("Set resistance identifier");
|
Console.WriteLine("Set resistance identifier");
|
||||||
break;
|
break;
|
||||||
case DataParser.NEW_CONNECTION:
|
case DataParser.NEW_CONNECTION:
|
||||||
this.MainViewModel.NewConnectedUser(DataParser.getUsernameFromResponseJson(payloadbytes));
|
this.MainViewModel.NewConnectedUser(DataParser.getUsernameFromJson(payloadbytes));
|
||||||
break;
|
break;
|
||||||
case DataParser.DISCONNECT:
|
case DataParser.DISCONNECT:
|
||||||
this.MainViewModel.DisconnectedUser(DataParser.getUsernameFromResponseJson(payloadbytes));
|
this.MainViewModel.DisconnectedUser(DataParser.getUsernameFromJson(payloadbytes));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Console.WriteLine($"Received json with identifier {identifier}:\n{Encoding.ASCII.GetString(payloadbytes)}");
|
Console.WriteLine($"Received json with identifier {identifier}:\n{Encoding.ASCII.GetString(payloadbytes)}");
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<TabControl TabStripPlacement="Left" ItemsSource="{Binding Tabs}" SelectedItem="{Binding Selected}">
|
<TabControl TabStripPlacement="Left" ItemsSource="{Binding Tabs}" SelectedItem="{Binding Selected}">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Username}"/>
|
<TextBlock Text="{Binding PatientInfo.Username}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TabControl.ItemTemplate>
|
</TabControl.ItemTemplate>
|
||||||
<TabControl.ContentTemplate>
|
<TabControl.ContentTemplate>
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ namespace Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ar == null || (!ar.IsCompleted) || (!this.stream.CanRead))
|
||||||
|
return;
|
||||||
this.stream.BeginRead(this.buffer, 0, this.buffer.Length, new AsyncCallback(OnRead), null);
|
this.stream.BeginRead(this.buffer, 0, this.buffer.Length, new AsyncCallback(OnRead), null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user