Auto stash before checking out "HEAD"

This commit is contained in:
shinichi
2020-10-19 12:07:00 +02:00
parent 31be096b94
commit 4a238d9207
3 changed files with 5 additions and 3 deletions

View File

@@ -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)}");

View File

@@ -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>

View File

@@ -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);
} }