[ADDED] the inlog screen and a data singleton for the client

This commit is contained in:
Lars
2020-10-20 16:36:34 +02:00
parent 55425bbec4
commit 84bf1b3e64
9 changed files with 142 additions and 9 deletions

59
Client/ClientData.cs Normal file
View File

@@ -0,0 +1,59 @@
using SharedClientServer;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
namespace Client
{
class ClientData
{
private static ClientData _instance;
private static readonly object padlock = new object();
public static ClientData Instance
{
get
{
lock (padlock)
{
if (_instance == null)
{
_instance = new ClientData();
}
return _instance;
}
}
}
private User _user;
private Client _client;
private Lobby _lobby;
private ClientData()
{
}
public User User
{
get { return _user; }
set { _user = value; }
}
public Client Client
{
get { return _client; }
set { _client = value; }
}
public Lobby Lobby
{
get { return _lobby; }
set { _lobby = value; }
}
}
}