Connections shit
This commit is contained in:
@@ -14,6 +14,9 @@
|
|||||||
<views:LoginView />
|
<views:LoginView />
|
||||||
<!-- This is a UserControl -->
|
<!-- This is a UserControl -->
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewModels:ClientInfoViewModel}">
|
||||||
</Application.Resources>
|
<views:ClientInfoView/>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ namespace DoctorApp.Utils
|
|||||||
private bool sessionRunning = false;
|
private bool sessionRunning = false;
|
||||||
private IHandler handler = null;
|
private IHandler handler = null;
|
||||||
private LoginViewModel LoginViewModel;
|
private LoginViewModel LoginViewModel;
|
||||||
|
private MainViewModel MainViewModel;
|
||||||
|
private ClientInfoViewModel ClientInfoViewModel;
|
||||||
|
|
||||||
|
|
||||||
public Client() : this("localhost", 5555)
|
public Client() : this("localhost", 5555)
|
||||||
@@ -119,6 +121,12 @@ namespace DoctorApp.Utils
|
|||||||
sendMessage(DataParser.getSetResistanceResponseJson(true));
|
sendMessage(DataParser.getSetResistanceResponseJson(true));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DataParser.NEW_CONNECTION:
|
||||||
|
this.MainViewModel.NewConnectedUser(DataParser.getUsernameFromResponseJson(payloadbytes));
|
||||||
|
break;
|
||||||
|
case DataParser.DISCONNECT:
|
||||||
|
this.MainViewModel.NewConnectedUser(DataParser.getUsernameFromResponseJson(payloadbytes));
|
||||||
|
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)}");
|
||||||
break;
|
break;
|
||||||
@@ -247,5 +255,15 @@ namespace DoctorApp.Utils
|
|||||||
{
|
{
|
||||||
this.LoginViewModel = loginViewModel;
|
this.LoginViewModel = loginViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void SetMainViewModel(MainViewModel mainViewModel)
|
||||||
|
{
|
||||||
|
this.MainViewModel = mainViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SetClientInfoViewModel(ClientInfoViewModel clientInfoViewModel)
|
||||||
|
{
|
||||||
|
this.ClientInfoViewModel = clientInfoViewModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ namespace DoctorApp.Utils
|
|||||||
public const string START_SESSION = "START SESSION";
|
public const string START_SESSION = "START SESSION";
|
||||||
public const string STOP_SESSION = "STOP SESSION";
|
public const string STOP_SESSION = "STOP SESSION";
|
||||||
public const string SET_RESISTANCE = "SET RESISTANCE";
|
public const string SET_RESISTANCE = "SET RESISTANCE";
|
||||||
|
public const string NEW_CONNECTION = "NEW CONNECTION";
|
||||||
|
public const string DISCONNECT = "DISCONNECT";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// makes the json object with LOGIN identifier and username and password
|
/// makes the json object with LOGIN identifier and username and password
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -191,6 +193,24 @@ namespace DoctorApp.Utils
|
|||||||
return getJsonMessage(SET_RESISTANCE, data);
|
return getJsonMessage(SET_RESISTANCE, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static byte[] getNewConnectionJson(string user)
|
||||||
|
{
|
||||||
|
dynamic data = new
|
||||||
|
{
|
||||||
|
username = user
|
||||||
|
};
|
||||||
|
return getJsonMessage(NEW_CONNECTION, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] getDisconnectJson(string user)
|
||||||
|
{
|
||||||
|
dynamic data = new
|
||||||
|
{
|
||||||
|
username = user
|
||||||
|
};
|
||||||
|
return getJsonMessage(DISCONNECT, data);
|
||||||
|
}
|
||||||
|
|
||||||
public static float getResistanceFromJson(byte[] json)
|
public static float getResistanceFromJson(byte[] json)
|
||||||
{
|
{
|
||||||
return ((dynamic)JsonConvert.DeserializeObject(Encoding.ASCII.GetString(json))).data.resistance;
|
return ((dynamic)JsonConvert.DeserializeObject(Encoding.ASCII.GetString(json))).data.resistance;
|
||||||
@@ -201,6 +221,11 @@ namespace DoctorApp.Utils
|
|||||||
return ((dynamic)JsonConvert.DeserializeObject(Encoding.ASCII.GetString(json))).data.worked;
|
return ((dynamic)JsonConvert.DeserializeObject(Encoding.ASCII.GetString(json))).data.worked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string getUsernameFromResponseJson(byte[] json)
|
||||||
|
{
|
||||||
|
return ((dynamic)JsonConvert.DeserializeObject(Encoding.ASCII.GetString(json))).data.username;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ using System.Text;
|
|||||||
|
|
||||||
namespace DoctorApp.ViewModels
|
namespace DoctorApp.ViewModels
|
||||||
{
|
{
|
||||||
|
|
||||||
class ClientInfoViewModel
|
class ClientInfoViewModel
|
||||||
{
|
{
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string TabName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ namespace DoctorApp.ViewModels
|
|||||||
this.InvertedLoginStatus = !status;
|
this.InvertedLoginStatus = !status;
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
this.mainWindowViewModel.SelectedViewModel = new MainViewModel(mainWindowViewModel);
|
MainViewModel mainViewModel = new MainViewModel(mainWindowViewModel);
|
||||||
|
this.mainWindowViewModel.client.SetMainViewModel(mainViewModel);
|
||||||
|
this.mainWindowViewModel.SelectedViewModel = mainViewModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
using DoctorApp.Utils;
|
using DoctorApp.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace DoctorApp.ViewModels
|
namespace DoctorApp.ViewModels
|
||||||
{
|
{
|
||||||
class MainViewModel : ObservableObject
|
class MainViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
|
public ObservableCollection<object> Tabs { get; set; }
|
||||||
|
public int Selected { get; set; }
|
||||||
public MainWindowViewModel MainWindowViewModel { get; set; }
|
public MainWindowViewModel MainWindowViewModel { get; set; }
|
||||||
|
|
||||||
Client client;
|
Client client;
|
||||||
@@ -15,6 +20,26 @@ namespace DoctorApp.ViewModels
|
|||||||
{
|
{
|
||||||
this.MainWindowViewModel = mainWindowViewModel;
|
this.MainWindowViewModel = mainWindowViewModel;
|
||||||
client = this.MainWindowViewModel.client;
|
client = this.MainWindowViewModel.client;
|
||||||
|
Tabs= new ObservableCollection<object>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NewConnectedUser(string username)
|
||||||
|
{
|
||||||
|
App.Current.Dispatcher.Invoke((Action)delegate
|
||||||
|
{
|
||||||
|
Tabs.Add(new ClientInfoViewModel
|
||||||
|
{
|
||||||
|
Username = username,
|
||||||
|
TabName = username
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DisconnectedUser(string username)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,68 @@
|
|||||||
<Page x:Class="DoctorApp.Views.ClientInfoView"
|
<UserControl x:Class="DoctorApp.Views.ClientInfoView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DoctorApp.Views"
|
xmlns:local="clr-namespace:DoctorApp.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
Title="ClientInfoView">
|
>
|
||||||
|
<Grid Margin="15,5,15,15">
|
||||||
<Grid>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"/>
|
||||||
|
<ColumnDefinition Width="3*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="43*"/>
|
||||||
|
<RowDefinition Height="47*"/>
|
||||||
|
<RowDefinition Height="180*"/>
|
||||||
|
<RowDefinition Height="180*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal" Grid.RowSpan="2" Margin="0,0,0,22">
|
||||||
|
<StackPanel.Resources>
|
||||||
|
<Style TargetType="{x:Type Label}">
|
||||||
|
<Setter Property="Margin" Value="0,0,20,0"/>
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Resources>
|
||||||
|
<Label Content="UserName" Name="Username_Label"/>
|
||||||
|
<Label Content="Status: " Name="Status_Label"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="0,10,0,0" Grid.RowSpan="2" Grid.Row="1">
|
||||||
|
<StackPanel.Resources>
|
||||||
|
<Style TargetType="{x:Type DockPanel}">
|
||||||
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Resources>
|
||||||
|
<DockPanel Height="26" LastChildFill="False" HorizontalAlignment="Stretch">
|
||||||
|
<Label Content="Resistance" Width="110" DockPanel.Dock="Right"/>
|
||||||
|
<Label Content="Current Speed" Width="110" DockPanel.Dock="Left"/>
|
||||||
|
<Label Content="Current BPM" Width="110" DockPanel.Dock="Top"/>
|
||||||
|
</DockPanel>
|
||||||
|
<DockPanel Height="26" LastChildFill="False" HorizontalAlignment="Stretch">
|
||||||
|
<TextBox Name="textBox_Resistance" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Right" IsReadOnly="true"/>
|
||||||
|
<TextBox Name="textBox_CurrentSpeed" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Left" IsReadOnly="true"/>
|
||||||
|
<TextBox Name="textBox_CurrentBPM" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Top" Height="26" IsReadOnly="true"/>
|
||||||
|
</DockPanel>
|
||||||
|
<DockPanel Height="26" LastChildFill="False">
|
||||||
|
<Label Content="Distance Covered" Width="110" DockPanel.Dock="Right"/>
|
||||||
|
<Label Content="Current Power" Width="110" DockPanel.Dock="Left"/>
|
||||||
|
<Label Content="Acc. Power" Width="110" DockPanel.Dock="Top"/>
|
||||||
|
</DockPanel>
|
||||||
|
<DockPanel Height="26" LastChildFill="False">
|
||||||
|
<TextBox Name="textBox_DistanceCovered" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Right" IsReadOnly="true"/>
|
||||||
|
<TextBox Name="textBox_CurrentPower" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Left" IsReadOnly="true"/>
|
||||||
|
<TextBox Name="textBox_AccPower" Text="" TextWrapping="Wrap" Width="110" DockPanel.Dock="Top" Height="26" IsReadOnly="true"/>
|
||||||
|
</DockPanel>
|
||||||
|
</StackPanel>
|
||||||
|
<ListBox Name="ChatBox" Grid.Column="1" Margin="59,41,0,0" Grid.RowSpan="3"/>
|
||||||
|
<TextBox Name="textBox_Chat" Grid.Column="1" HorizontalAlignment="Left" Margin="59,10,0,0" Grid.Row="3" Text="TextBox" TextWrapping="Wrap" VerticalAlignment="Top" Width="235"/>
|
||||||
|
<Button Content="Button" Grid.Column="1" HorizontalAlignment="Left" Margin="59,33,0,0" Grid.Row="3" VerticalAlignment="Top" />
|
||||||
|
<Button Content="Start Session" Grid.Column="1" HorizontalAlignment="Left" Margin="69,86,0,0" Grid.Row="3" VerticalAlignment="Top" Width="97"/>
|
||||||
|
<Button Content="Stop Session" Grid.Column="1" HorizontalAlignment="Left" Margin="187,86,0,0" Grid.Row="3" VerticalAlignment="Top" Width="97" />
|
||||||
|
<TextBox x:Name="textBox_SetResistance" Grid.Column="1" HorizontalAlignment="Left" Margin="69,128,0,0" Grid.Row="3" TextWrapping="Wrap" VerticalAlignment="Top" Width="97"/>
|
||||||
|
<Button Content="Set Resistance" Grid.Column="1" HorizontalAlignment="Left" Margin="187,128,0,0" Grid.Row="3" VerticalAlignment="Top" Width="97" Height="18"/>
|
||||||
|
<Canvas Grid.Row="3" Background="White" Margin="0,33,0,0"/>
|
||||||
|
<ComboBox Name="DropBox" HorizontalAlignment="Left" Margin="0,6,0,0" Grid.Row="3" VerticalAlignment="Top" Width="190"/>
|
||||||
|
<Button Content="Client Info" Grid.Column="1" HorizontalAlignment="Left" Margin="207,6,0,0" VerticalAlignment="Top" Height="26" Width="82"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</UserControl>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace DoctorApp.Views
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for ClientInfoView.xaml
|
/// Interaction logic for ClientInfoView.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ClientInfoView : Page
|
public partial class ClientInfoView : UserControl
|
||||||
{
|
{
|
||||||
public ClientInfoView()
|
public ClientInfoView()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,10 +5,20 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DoctorApp.Views"
|
xmlns:local="clr-namespace:DoctorApp.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
>
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Button Content="Button" HorizontalAlignment="Left" Margin="231,132,0,0" VerticalAlignment="Top"/>
|
<TabControl ItemsSource="{Binding Tabs}" SelectedItem="{Binding Selected}">
|
||||||
|
<TabControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding TabName}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</TabControl.ItemTemplate>
|
||||||
|
<TabControl.ContentTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ContentControl Content="{Binding}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</TabControl.ContentTemplate>
|
||||||
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:DoctorApp"
|
xmlns:local="clr-namespace:DoctorApp"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="450" Width="800">
|
Title="MainWindow" Height="450" Width="800"
|
||||||
<DockPanel>
|
WindowState="Maximized">
|
||||||
<Label Content="gemaakt door: mensen" DockPanel.Dock="Bottom" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontStyle="Italic" Foreground="Gray"/>
|
<Grid>
|
||||||
<ContentControl HorizontalAlignment="Center" VerticalAlignment="Center" Content="{Binding SelectedViewModel}" Focusable="False" />
|
<ContentControl HorizontalAlignment="Center" VerticalAlignment="Center" Content="{Binding SelectedViewModel}" Focusable="False" />
|
||||||
</DockPanel>
|
<Label Content="gemaakt door: mensen" DockPanel.Dock="Bottom" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontStyle="Italic" Foreground="Gray"/>
|
||||||
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -16,14 +16,10 @@ namespace Server
|
|||||||
private byte[] totalBuffer = new byte[1024];
|
private byte[] totalBuffer = new byte[1024];
|
||||||
private int totalBufferReceived = 0;
|
private int totalBufferReceived = 0;
|
||||||
private SaveData saveData;
|
private SaveData saveData;
|
||||||
private string username = null;
|
public string username = null;
|
||||||
private DateTime sessionStart;
|
private DateTime sessionStart;
|
||||||
private string fileName;
|
private string fileName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string Username { get; set; }
|
|
||||||
|
|
||||||
public Client(Communication communication, TcpClient tcpClient)
|
public Client(Communication communication, TcpClient tcpClient)
|
||||||
{
|
{
|
||||||
this.sessionStart = DateTime.Now;
|
this.sessionStart = DateTime.Now;
|
||||||
@@ -39,6 +35,7 @@ namespace Server
|
|||||||
|
|
||||||
int receivedBytes = this.stream.EndRead(ar);
|
int receivedBytes = this.stream.EndRead(ar);
|
||||||
|
|
||||||
|
if (totalBufferReceived + receivedBytes > 1024)
|
||||||
if (totalBufferReceived + receivedBytes > 1024)
|
if (totalBufferReceived + receivedBytes > 1024)
|
||||||
{
|
{
|
||||||
throw new OutOfMemoryException("buffer too small");
|
throw new OutOfMemoryException("buffer too small");
|
||||||
@@ -107,6 +104,7 @@ namespace Server
|
|||||||
this.username = username;
|
this.username = username;
|
||||||
sendMessage(DataParser.getLoginResponse("OK"));
|
sendMessage(DataParser.getLoginResponse("OK"));
|
||||||
sendMessage(DataParser.getStartSessionJson());
|
sendMessage(DataParser.getStartSessionJson());
|
||||||
|
communication.NewLogin(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.IO.Pipes;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using ClientApp.Utils;
|
using DoctorApp.Utils;
|
||||||
|
|
||||||
namespace Server
|
namespace Server
|
||||||
{
|
{
|
||||||
@@ -13,7 +13,6 @@ namespace Server
|
|||||||
private TcpListener listener;
|
private TcpListener listener;
|
||||||
private List<Client> clients;
|
private List<Client> clients;
|
||||||
private Client doctor;
|
private Client doctor;
|
||||||
|
|
||||||
public Communication(TcpListener listener)
|
public Communication(TcpListener listener)
|
||||||
{
|
{
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
@@ -35,15 +34,15 @@ namespace Server
|
|||||||
var tcpClient = listener.EndAcceptTcpClient(ar);
|
var tcpClient = listener.EndAcceptTcpClient(ar);
|
||||||
Console.WriteLine($"Client connected from {tcpClient.Client.RemoteEndPoint}");
|
Console.WriteLine($"Client connected from {tcpClient.Client.RemoteEndPoint}");
|
||||||
clients.Add(new Client(this, tcpClient));
|
clients.Add(new Client(this, tcpClient));
|
||||||
if (doctor == null)
|
/*if (doctor == null)
|
||||||
{
|
{
|
||||||
doctor = clients.ElementAt(0);
|
doctor = clients.ElementAt(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
doctor.sendMessage(DataParser.getLoginResponse("new client"));
|
doctor.sendMessage(DataParser.getNewConnectionJson("jan"));
|
||||||
}
|
}*/
|
||||||
listener.BeginAcceptTcpClient(new AsyncCallback(OnConnect), null);
|
listener.BeginAcceptTcpClient(new AsyncCallback(OnConnect), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,5 +50,18 @@ namespace Server
|
|||||||
{
|
{
|
||||||
clients.Remove(client);
|
clients.Remove(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void NewLogin(Client client)
|
||||||
|
{
|
||||||
|
if (doctor == null)
|
||||||
|
{
|
||||||
|
doctor = client;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
doctor.sendMessage(DataParser.getNewConnectionJson(client.username));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ClientApp\ClientApp.csproj" />
|
<ProjectReference Include="..\ClientApp\ClientApp.csproj" />
|
||||||
|
<ProjectReference Include="..\DoctorApp\DoctorApp.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="..\Hashing\Hashing.projitems" Label="Shared" />
|
<Import Project="..\Hashing\Hashing.projitems" Label="Shared" />
|
||||||
|
|||||||
Reference in New Issue
Block a user