Added add user (for doctor)
This commit is contained in:
@@ -43,6 +43,9 @@ namespace ErgometerServer
|
|||||||
case NetCommand.CommandType.VALUESET:
|
case NetCommand.CommandType.VALUESET:
|
||||||
server.SendToClient(input);
|
server.SendToClient(input);
|
||||||
break;
|
break;
|
||||||
|
case NetCommand.CommandType.USER:
|
||||||
|
server.AddUser(input.users);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new FormatException("Unknown Command");
|
throw new FormatException("Unknown Command");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ErgometerLibrary, Version=1.0.2.2, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ErgometerLibrary, Version=1.0.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\ErgometerLibrary\ErgometerLibrary\ErgometerLibrary\bin\Debug\ErgometerLibrary.dll</HintPath>
|
<HintPath>..\..\ErgometerLibrary\ErgometerLibrary\bin\Debug\ErgometerLibrary.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace ErgometerServer
|
|||||||
FileHandler.SaveUsers(users);
|
FileHandler.SaveUsers(users);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddUser(Dictionary<string, string> users)
|
public void AddUser(Dictionary<string, string> users)
|
||||||
{
|
{
|
||||||
foreach(KeyValuePair<string, string> user in users)
|
foreach(KeyValuePair<string, string> user in users)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user