Ejemplo n.º 1
0
 private void btn_stop_Click(object sender, EventArgs e)
 {
     mySelf.Stop();
     mySelf            = null;
     btn_start.Enabled = true;
     btn_stop.Enabled  = false;
 }
Ejemplo n.º 2
0
        private void btn_start_Click(object sender, EventArgs e)
        {
            btn_start.Enabled = false;
            btn_stop.Enabled  = true;

            mySelfServer = LibraryInterfaceServer.Utils.createServer(int.Parse(port_local));
            mySelfServer.Subscribe(handleIntefaceEvents);

            if (DataUtils.IsIPAddressCorrect(adresse_catalogue))
            {
                if (mySelfServer.Start())
                {
                    if (connectToCatalogue())
                    {
                        registerService();
                        appendTextToLog("Server registered!" + Environment.NewLine);
                    }
                }
                else
                {
                    MessageBox.Show("Le serveur ne peut pas démarrer. Vérifier votre configuration.",
                                    "Attention",
                                    MessageBoxButtons.OK);
                }
            }
            else
            {
                MessageBox.Show("L'adresse ip " + adresse_catalogue + " du catalogue est mal formée. Veuillez revoir vos paramètres.",
                                "Attention",
                                MessageBoxButtons.OK);
            }
        }
Ejemplo n.º 3
0
 private void btn_stop_Click(object sender, EventArgs e)
 {
     mySelfServer.Stop();
     mySelfServer = null;
     unregister();
     btn_start.Enabled = true;
     btn_stop.Enabled  = false;
 }
Ejemplo n.º 4
0
 private void btn_start_Click(object sender, EventArgs e)
 {
     btn_start.Enabled = false;
     btn_stop.Enabled = true;
     mySelf = Utils.createServer(int.Parse(port_catalogue));
     mySelf.Subscribe(handleIntefaceEvents);
     mySelf.Start();
 }
Ejemplo n.º 5
0
 private void btn_start_Click(object sender, EventArgs e)
 {
     btn_start.Enabled = false;
     btn_stop.Enabled  = true;
     mySelf            = Utils.createServer(int.Parse(port_catalogue));
     mySelf.Subscribe(handleIntefaceEvents);
     mySelf.Start();
 }
Ejemplo n.º 6
0
 private void btn_stop_Click(object sender, EventArgs e)
 {
     mySelfServer.Stop();
     mySelfServer = null;
     unregister();
     btn_start.Enabled = true;
     btn_stop.Enabled = false;
 }
Ejemplo n.º 7
0
        private void btn_start_Click(object sender, EventArgs e)
        {
            btn_start.Enabled = false;
            btn_stop.Enabled = true;

            mySelfServer = LibraryInterfaceServer.Utils.createServer(int.Parse(port_local));
            mySelfServer.Subscribe(handleIntefaceEvents);
            mySelfServer.Start();
            if (LibraryInterfaceClient.Utils.IsIPAddressCorrect(adresse_catalogue)) {
                if (connectToCatalogue()) {
                    registerService();
                    appendTextToLog("Server registered!" + Environment.NewLine);
                }
            }
            else
                MessageBox.Show("L'adresse ip " + adresse_catalogue + " du catalogue est mal formée. Veuillez revoir vos paramètres.",
                                "Attention",
                                MessageBoxButtons.OK);
        }
Ejemplo n.º 8
0
 private void btn_stop_Click(object sender, EventArgs e)
 {
     mySelf.Stop();
     mySelf = null;
     btn_start.Enabled = true;
     btn_stop.Enabled = false;
     timer1.Start();
 }