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); } }
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(); }
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); }
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(handleInterfaceEvents); mySelf.Start(); timer1.Start(); }