private void ButtonAddClick(object sender, EventArgs e)
 {
     using(var edit = new Edit(null, this.baseFolder))
     {
         edit.ShowDialog(this);
         this.listBoxResults.Items.Clear();
         this.listBoxResults.Items.AddRange(RemoteConnection.getAll().ToArray());
     }
 }
        private void ButtonEditClick(object sender, EventArgs e)
        {
            var selectedItem = this.listBoxResults.SelectedItem;
            if(selectedItem == null)
            {
                return;
            }

            var remoteConnection = selectedItem as RemoteConnection;
            using(var edit = new Edit(remoteConnection, this.baseFolder))
            {
                edit.ShowDialog(this);
                this.TextBoxSearchKeyUp(null, null);
            }
        }