Beispiel #1
0
 private void StartServer(int port)
 {
     server.Start(port);
     ServerStartButton.Invoke(new Action(() => { ServerStartButton.Text = "Stop server";
                                                 ClientSettingsPanel.Show();
                                                 selectedClient = GetlocalhostInfo();
                                                 ClientListBox.Show();
                                                 UpdateClientList();
                                                 RedrawClientSettings();
                                                 ReadServerSettings(); }));
 }
Beispiel #2
0
        private void StopServer()
        {
            server.Stop();
            ServerStartButton.Invoke(new Action(() => { ServerStartButton.Text = "Start server";
                                                        ClientListBox.Hide();
                                                        for (int i = 0; i < SettingsCheckedListBox.Items.Count; i++)
                                                        {
                                                            SettingsCheckedListBox.SetItemChecked(i, false);
                                                        }

                                                        UpdateClientList();
                                                        RedrawClientSettings(); }));
        }