Changeset 313 for iTunesPlayCountImporter
- Timestamp:
- 09/13/07 02:09:29 (3 years ago)
- Location:
- iTunesPlayCountImporter/iTunesPlayCountImporter
- Files:
-
- 3 modified
-
MainForm.Designer.cs (modified) (6 diffs)
-
MainForm.cs (modified) (3 diffs)
-
PropertyList.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
iTunesPlayCountImporter/iTunesPlayCountImporter/MainForm.Designer.cs
r312 r313 41 41 // 42 42 this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 43 this.button1.Location = new System.Drawing.Point( 354, 40);43 this.button1.Location = new System.Drawing.Point(410, 40); 44 44 this.button1.Name = "button1"; 45 45 this.button1.Size = new System.Drawing.Size(93, 23); … … 60 60 this.labelStatus.Location = new System.Drawing.Point(4, 77); 61 61 this.labelStatus.Name = "labelStatus"; 62 this.labelStatus.Size = new System.Drawing.Size(4 37, 17);62 this.labelStatus.Size = new System.Drawing.Size(493, 17); 63 63 this.labelStatus.TabIndex = 1; 64 64 // … … 69 69 this.progressBar1.Location = new System.Drawing.Point(6, 11); 70 70 this.progressBar1.Name = "progressBar1"; 71 this.progressBar1.Size = new System.Drawing.Size(4 41, 23);71 this.progressBar1.Size = new System.Drawing.Size(497, 23); 72 72 this.progressBar1.TabIndex = 2; 73 73 // … … 104 104 this.textBoxResults.Name = "textBoxResults"; 105 105 this.textBoxResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 106 this.textBoxResults.Size = new System.Drawing.Size(4 41, 64);106 this.textBoxResults.Size = new System.Drawing.Size(497, 64); 107 107 this.textBoxResults.TabIndex = 5; 108 108 // … … 111 111 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 112 112 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 113 this.ClientSize = new System.Drawing.Size( 453, 184);113 this.ClientSize = new System.Drawing.Size(509, 184); 114 114 this.Controls.Add(this.textBoxResults); 115 115 this.Controls.Add(this.radioButtonAdd); … … 119 119 this.Controls.Add(this.button1); 120 120 this.MaximizeBox = false; 121 this.MinimumSize = new System.Drawing.Size( 459, 211);121 this.MinimumSize = new System.Drawing.Size(525, 211); 122 122 this.Name = "MainForm"; 123 123 this.Text = "iTunes Play Count Importer"; -
iTunesPlayCountImporter/iTunesPlayCountImporter/MainForm.cs
r312 r313 18 18 { 19 19 InitializeComponent(); 20 } 21 22 private T? GetValue<T>(Hashtable hashtable, String key) where T : struct 23 { 24 T? retValue = (hashtable.ContainsKey(key) ? 25 new T?((T)hashtable[key]) : 26 null 27 ); 28 29 return retValue; 20 30 } 21 31 … … 64 74 if (!String.IsNullOrEmpty(location) && tracksByLocation.ContainsKey(location)) 65 75 { 76 DateTime? playedDate = GetValue<DateTime>(tracksByLocation[track2.Location], "Play Date UTC"); 66 77 Int32 playedCount = (tracksByLocation[track2.Location].ContainsKey("Play Count") ? (Int32)(Int64)tracksByLocation[track2.Location]["Play Count"] : 0); 67 78 … … 77 88 track2.PlayedCount += playedCount; 78 89 } 90 91 // PlayedDate 92 if (playedDate != null && track2.PlayedDate < playedDate.Value) 93 { 94 track2.PlayedDate = playedDate.Value; 95 } 96 79 97 updateCount++; 80 98 labelStatus.Text = String.Format("�g���b�N {0} ��V���܂����B", track2.Name); -
iTunesPlayCountImporter/iTunesPlayCountImporter/PropertyList.cs
r312 r313 87 87 value = false; 88 88 break; 89 case "date": 90 DateTime dateTime; 91 if (!DateTime.TryParse(node.InnerText, out dateTime)) 92 { 93 // throw new ApplicationException("date�v�f�ɂ͓��݂̂�ނ��Ƃ��ł��܂��B"); 94 dateTime = new DateTime(); 95 } 96 value = dateTime; 97 break; 89 98 default: 90 99 value = node;
