public ViewModel() { server = new CCC_Server(); Clients = new ObservableCollection<string>(); Port = 0; LocalAddress = IPUtils.GetLocalAddress(); ; PublicAddress = IPUtils.GetPublicAddress(); startCommand = new RelayCommand(OnStartExecuted, OnStartCanExecute); stopCommand = new RelayCommand(OnStopExecuted, OnStopCanExecute); }
public ViewModel() { server = new CCC_Server(); Clients = new ObservableCollection <PlayerData>(); Port = 63000; LocalAddress = IPUtils.GetLocalAddress(); PublicAddress = IPUtils.GetPublicAddress(); Running = false; LastSync = DateTime.MinValue; startCommand = new RelayCommand(OnStartExecuted, OnStartCanExecute); stopCommand = new RelayCommand(OnStopExecuted, OnStopCanExecute); server.PlayerConnected += OnClientConnect; server.PlayerDisconnected += OnClientDisconnect; server.PlayerMoved += OnPlayerMove; server.PlayerCrouch += OnPlayerCrouch; server.Sync += Server_Sync; }