Exemplo n.º 1
0
        public Server()
        {
            InitializeComponent();

            IPAddress[] a = Dns.GetHostByName(Dns.GetHostName()).AddressList;
            _adresse             = a[0];
            labelAdresse.Text    = _adresse.ToString();
            _interfaceClients    = new ModuleServeur(this);
            _interfaceImprimante = new ModuleServeur(this);
        }
Exemplo n.º 2
0
        private void demarrerInterfaceImprimante(int portImprimante)
        {
            indicateurImprimante.BackColor = Color.Orange;
            labelPortImprimante.Text       = portImprimante.ToString();

            if (_interfaceImprimante.IsRunning())
            {
                _interfaceImprimante.StopModule();
            }

            _interfaceImprimante = new ModuleServeur(this);
            _interfaceImprimante.StartServer(_adresse, portImprimante);
            indicateurImprimante.BackColor = Color.Green;
        }
Exemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     moduleServeur = new ModuleServeur(this);
     moduleServeur.StartServer(IPAddress.Parse("192.168.1.12"), 8888);
 }