예제 #1
0
        public Login()
        {
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();
            jugadoresConectados = new ObservableCollection <Jugador>();

            contexto = new InstanceContext(this);
            servidor = new ProxyLogin.LoginServiceClient(contexto);
        }
예제 #2
0
        /// <summary>
        /// Constructor de la clase
        /// </summary>
        public Login()
        {
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();
            jugadoresConectados = new ObservableCollection <Jugador>();

            this.recurso = new ResourceManager("Memorama.Properties.Idiomas.Idioma", Assembly.GetExecutingAssembly());

            contexto = new InstanceContext(this);
            servidor = new ProxyLogin.LoginServiceClient(contexto);
        }
예제 #3
0
        public Lobby(ObservableCollection <Jugador> jugadores, Jugador jugador)
        {
            this.jugador          = jugador;
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();
            //jugadoresConectados = new ObservableCollection<Jugador>(); Creo que no se usa
            TxtJugador.Text = jugador.nickName;

            jugadoresEnLinea.Items.Clear();
            jugadoresEnLinea.ItemsSource = jugadores;

            contexto = new InstanceContext(this);
            servidor = new ProxyLogin.LoginServiceClient(contexto);
        }
예제 #4
0
        /// <summary>
        /// Constructor de la clase
        /// </summary>
        /// <param name="jugadores">Jugadores conectados</param>
        /// <param name="jugador">Jugador actual</param>
        public Lobby(ObservableCollection <Jugador> jugadores, Jugador jugador)
        {
            this.jugador          = jugador;
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();
            TxtJugador.Text = jugador.nickName;

            contexto = new InstanceContext(this);
            servidor = new ProxyLogin.LoginServiceClient(contexto);

            if (!servidor.BuscarClientePorNombre(jugador.nickName))
            {
                servidor.Conectarse(jugador);
            }

            jugadoresConectados = new ObservableCollection <Jugador>();
            jugadoresConectados = jugadores;
            jugadoresEnLinea.Items.Clear();
            jugadoresEnLinea.ItemsSource = jugadoresConectados;
        }