Changeset 134

Show
Ignore:
Timestamp:
03/05/07 22:12:07 (2 years ago)
Author:
blunard2
Message:

random things were mucked with

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/BadClient/Form1.Designer.cs

    r117 r134  
    186186            this.button2.Size = new System.Drawing.Size(108, 23); 
    187187            this.button2.TabIndex = 6; 
    188             this.button2.Text = "Refresh From BDB"; 
     188            this.button2.Text = "Songs I'm Conn To"; 
    189189            this.button2.UseVisualStyleBackColor = true; 
    190190            this.button2.Click += new System.EventHandler(this.button2_Click); 
  • dmp/trunk/BadClient/Form1.cs

    r125 r134  
    5858        private void button2_Click(object sender, EventArgs e) 
    5959        { 
    60             DataTable theStuff = this.myBridge.getAvailableSongsInCollection (); 
    61             lblStatus.Text = "Status: This doesn't work yet!"; 
     60            DataTable theStuff = this.myBridge.getAvailableSongsInCollection(); 
     61             
     62             
     63            lblStatus.Text = "Status: This does work!"; 
     64 
     65            dgvSongs.Rows.Clear(); 
     66 
    6267            foreach (DataRow row in theStuff.Rows) { 
    6368                                dgvSongs.Rows.Add(row.ItemArray); 
  • dmp/trunk/Bridge/Bridge.cs

    r131 r134  
    117117                                libraryCount++; 
    118118                        } 
     119 
    119120 
    120121                        DataTable theTable = this.db.getAvailableSongsInCollection(libraries); 
     
    245246                        try { 
    246247 
    247                                 if (!clientList.ContainsKey(newClient.Id)) 
    248                                         this.clientList.Add(newClient.Id, newClient); 
     248                if (!clientList.ContainsKey(newClient.Id)) 
     249                { 
     250                    Console.WriteLine("Added libraryid to client list: " + newClient.Id); 
     251                    this.clientList.Add(newClient.Id, newClient); 
     252                } 
     253                else 
     254                    Console.WriteLine("Following libraryId already in clientlist: " + newClient.Id); 
    249255 
    250256                                newClient.Login(); // Passwords are for wimps 
  • dmp/trunk/daap-sharp/BridgeDatabase.cs

    r125 r134  
    129129            IDbCommand command = this.databaseConnection.CreateCommand(); 
    130130            command.CommandText = @"INSERT INTO libraries  
    131                                   (name, username, password ) values (?, ?, ?); 
     131                                  (address, port, name, username, password ) values (?, ?, ?, ?, ?); 
    132132                                  SELECT last_insert_rowid();"; 
     133            IDataParameter clientAddress = command.CreateParameter(); 
     134            command.Parameters.Add(clientAddress); 
     135            IDataParameter clientPort = command.CreateParameter(); 
     136            command.Parameters.Add(clientPort); 
    133137            IDataParameter clientName = command.CreateParameter(); 
    134138            command.Parameters.Add(clientName); 
     
    141145            clientUsername.Value = theClient.Username; 
    142146            clientPassword.Value = theClient.Password; 
     147            clientAddress.Value = theClient.Address; 
     148            clientPort.Value = theClient.Port; 
    143149             
    144150            //IDbCommand command2 = this.databaseConnection.CreateCommand();