コード例 #1
0
 private Connection getConnection(Connection c)
 {
     foreach (Connection conn in this.connections) // Loop through List with foreach
     {
         if (conn.name == c.name)
         {
             return conn;
         }
     }
     return null;
 }
コード例 #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            Connection c = new Connection();
            c.Address = txtAddress.Text;
            c.Port = txtPort.Text;
            c.Username = txtUsername.Text;
            c.Password = txtPassword.Text;

            if (parentWindow != null)
                parentWindow.connect(null, c);

            closeWindow();
        }
コード例 #3
0
 internal void removeConnection(Connection currentConnection)
 {
     connections.Remove(getConnection(currentConnection));
 }
コード例 #4
0
 public bool connectionExists(Connection c)
 {
     return connectionExists(c.name);
 }