public PlayerListViewModel(ServerViewModel server) : base(false) { ServerVM = server; OpenPlayerCommand = new ParameterCommand <PlayerViewModel>(CmdOpenPlayer, CanOpenPlayer); RefreshCommand = new Command(CmdRefresh, CanRefresh); GetAllCommand = new Command(CmdGetAll, CanGetAll); RefreshTimer = new Timer(5000); RefreshTimer.Elapsed += RefreshTimer_Elapsed; RefreshTimer.AutoReset = false; ServerVM.OpenWorkspace += ServerVM_OpenWorkspace; ServerVM.RequestClose += ServerVM_RequestClose; this.OpenWorkspace += PlayerListViewModel_OpenWorkspace; this.PropertyChanged += PlayerListViewModel_PropertyChanged; }
private void Add(Server s) { ServerViewModel vm = new ServerViewModel(s); Servers.Add(vm); }
private void test(Server s) { ServerViewModel vm = new ServerViewModel(s); Servers.Add(vm); }