/// <summary>
        ///     Crea el modificador de Networking
        /// </summary>
        /// <param name="varName">Identificador del modifier</param>
        /// <param name="serverName">Nombre default que va a usar el servidor</param>
        /// <param name="clientName">Nombre default que va a usar cada cliente</param>
        /// <param name="port">Puerto en el cual se va a crear y buscar conexiones</param>
        public TGCNetworkingModifier(string varName, string serverName, string clientName, int port)
        {
            InitializeComponent();

            Server            = new TgcSocketServer();
            Client            = new TgcSocketClient();
            this.port         = port;
            clientConnected   = false;
            networkingControl = new TgcNetworkingModifierControl(this, serverName, clientName);
            AvaliableServers  = new List <TgcSocketClient.TgcAvaliableServer>();

            newConnectedClients = new Queue <TgcSocketClientInfo>();
            disconnectedClients = new Queue <TgcSocketClientInfo>();

            //FIXME este modifier no fue migrado a la nueva forma.
            //contentPanel.Controls.Add(networkingControl);
        }
Ejemplo n.º 2
0
        public TgcNetworkingModifierControl(TGCNetworkingModifier modifier, string serverName, string clientName)
        {
            InitializeComponent();

            this.modifier          = modifier;
            textBoxServerName.Text = serverName;
            SelectedPlayerId       = -1;

            buttonCloseServer.Enabled      = false;
            buttonConnectedClients.Enabled = false;

            buttonDisconnect.Enabled = false;

            //Cargar IP local
            textBoxIp.Text = TgcSocketServer.getHostAddress().ToString();

            clientsDialog = new TgcNetworkingModifierClientsDialog(this);
            serversDialog = new TgcNetworkingModifierServersDialog(this, clientName);
        }
Ejemplo n.º 3
0
        public TgcNetworkingModifierControl(string modifierName, string serverName, string clientName, int port, TGCExampleViewerNetworking example) : this()
        {
            tgcModifierTitleBar.setModifierName(modifierName);
            tgcModifierTitleBar.setContentPanel(contentPanel);

            this.example           = example;
            textBoxServerName.Text = serverName;
            SelectedPlayerId       = -1;

            buttonCloseServer.Enabled      = false;
            buttonConnectedClients.Enabled = false;

            buttonDisconnect.Enabled = false;

            //Cargar IP local
            textBoxIp.Text = TgcSocketServer.getHostAddress().ToString();

            clientsDialog = new TgcNetworkingModifierClientsDialog(this);
            serversDialog = new TgcNetworkingModifierServersDialog(this, clientName);
        }