Ejemplo n.º 1
0
        public ServerListViewModelDesignData()
        {
            Servers.Add("net.tcp://localhost:9876/TetriNET");
            Servers.Add("net.tcp://somehost:9876/TetriNET");

            LatestServers.Add("net.tcp://localhost:9876/TetriNET");
        }
Ejemplo n.º 2
0
        public ServerListViewModel()
        {
            IsProgressBarVisible   = false;
            IsScanForServerEnabled = true;

            ScanForServerCommand = new AsyncRelayCommand(ScanForServer);
            //ScanForServerCommand = new AsyncRelayCommand2( async _ => await Task.Run(() => ScanForServer()));
            SelectServerCommand       = new RelayCommand(SelectServer);
            SelectLatestServerCommand = new RelayCommand(SelectLatestServer);

            StringCollection latestServers = Settings.Default.LatestServers;

            if (latestServers != null)
            {
                LatestServers.Clear();
                foreach (string s in latestServers)
                {
                    LatestServers.Add(s);
                }
            }
        }