wpf sucks v2

This commit is contained in:
Sem van der Hoeven
2020-10-13 14:15:38 +02:00
parent fd3b926316
commit 245130a648
5 changed files with 18 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ namespace Server.ViewModels
{
class MainViewModel : ObservableObject
{
private ServerCommunication serverCommunication;
public ServerCommunication serverCommunication { get; set; }
public ICommand ServerStartCommand { get; set; }
public Information InformationModel { get; set; }
private MainWindow mainWindow;
@@ -28,6 +28,11 @@ namespace Server.ViewModels
InformationModel = new Information();
InformationModel.CanStartServer = true;
InformationModel.ServerOnline = false;
InformationModel.ClientsConnected = 0;
serverCommunication.newClientAction = () =>
{
InformationModel.ClientsConnected++;
};
//BitmapImage onlineImg = new BitmapImage(new Uri(@"/img/online.png",UriKind.Relative));
//BitmapImage offlineImg = new BitmapImage(new Uri(@"/img/offline.png", UriKind.Relative));