private void btn_stop_Click(object sender, EventArgs e) { mySelf.Stop(); mySelf = null; btn_start.Enabled = true; btn_stop.Enabled = false; }
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_stop_Click(object sender, EventArgs e) { mySelfServer.Stop(); mySelfServer = null; unregister(); btn_start.Enabled = true; btn_stop.Enabled = false; }
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_stop_Click(object sender, EventArgs e) { mySelf.Stop(); mySelf = null; btn_start.Enabled = true; btn_stop.Enabled = false; timer1.Start(); }