Beispiel #1
0
        private void ConnectionDetailsButton_Click(object sender, EventArgs e)
        {
            //Make sure there is at least one connection selected.
            //Well, there will only ever be one because we disabled multi-select but shh its ok.
            if (ConnectionsListView.SelectedIndices.Count == 0)
            {
                MessageBox.Show("Please select a connection to see its details", "n o", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            //Get the connection index
            int ConnectionIndex = ConnectionsListView.SelectedIndices[0];

            //Get the connection.
            Switchboard.SwitchboardServer.SwitchboardConnection Connection = MainServer.GetConnections()[ConnectionIndex];

            //Pass the connection to a connection details form
            new UserDetailsForm(ref Connection).Show();
        }
 public UserDetailsForm(ref Switchboard.SwitchboardServer.SwitchboardConnection MyConnection)
 {
     InitializeComponent();
     this.MyConnection = MyConnection;
     RefreshDetails();
 }