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;
        }
Ejemplo n.º 2
0
        private void Add(Server s)
        {
            ServerViewModel vm = new ServerViewModel(s);

            Servers.Add(vm);
        }
Ejemplo n.º 3
0
 private void test(Server s)
 {
     ServerViewModel vm = new ServerViewModel(s);
     Servers.Add(vm);
 }