Changeset 134
- Timestamp:
- 03/05/07 22:12:07 (2 years ago)
- Files:
-
- dmp/trunk/BadClient/Form1.Designer.cs (modified) (1 diff)
- dmp/trunk/BadClient/Form1.cs (modified) (1 diff)
- dmp/trunk/Bridge/Bridge.cs (modified) (2 diffs)
- dmp/trunk/daap-sharp/BridgeDatabase.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/BadClient/Form1.Designer.cs
r117 r134 186 186 this.button2.Size = new System.Drawing.Size(108, 23); 187 187 this.button2.TabIndex = 6; 188 this.button2.Text = " Refresh From BDB";188 this.button2.Text = "Songs I'm Conn To"; 189 189 this.button2.UseVisualStyleBackColor = true; 190 190 this.button2.Click += new System.EventHandler(this.button2_Click); dmp/trunk/BadClient/Form1.cs
r125 r134 58 58 private void button2_Click(object sender, EventArgs e) 59 59 { 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 62 67 foreach (DataRow row in theStuff.Rows) { 63 68 dgvSongs.Rows.Add(row.ItemArray); dmp/trunk/Bridge/Bridge.cs
r131 r134 117 117 libraryCount++; 118 118 } 119 119 120 120 121 DataTable theTable = this.db.getAvailableSongsInCollection(libraries); … … 245 246 try { 246 247 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); 249 255 250 256 newClient.Login(); // Passwords are for wimps dmp/trunk/daap-sharp/BridgeDatabase.cs
r125 r134 129 129 IDbCommand command = this.databaseConnection.CreateCommand(); 130 130 command.CommandText = @"INSERT INTO libraries 131 ( name, username, password ) values (?, ?, ?);131 (address, port, name, username, password ) values (?, ?, ?, ?, ?); 132 132 SELECT last_insert_rowid();"; 133 IDataParameter clientAddress = command.CreateParameter(); 134 command.Parameters.Add(clientAddress); 135 IDataParameter clientPort = command.CreateParameter(); 136 command.Parameters.Add(clientPort); 133 137 IDataParameter clientName = command.CreateParameter(); 134 138 command.Parameters.Add(clientName); … … 141 145 clientUsername.Value = theClient.Username; 142 146 clientPassword.Value = theClient.Password; 147 clientAddress.Value = theClient.Address; 148 clientPort.Value = theClient.Port; 143 149 144 150 //IDbCommand command2 = this.databaseConnection.CreateCommand();
