Skip to content

Commit

Permalink
fix out of range rating issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xantari committed Apr 24, 2021
1 parent 121e23d commit ef52f11
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 51 deletions.
77 changes: 36 additions & 41 deletions PinCab.Configurator/EditDatabaseEntryForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion PinCab.Configurator/EditDatabaseEntryForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void LoadForm()
txtIpdbNumber.Text = _dbEntry.IpdbNumber.HasValue ? _dbEntry.IpdbNumber.Value.ToString() : "";
numericFileBytes.Value = _dbEntry.FileSizeBytes.HasValue ? _dbEntry.FileSizeBytes.Value : 0;
numericDownloadCount.Value = _dbEntry.DownloadCount.HasValue ? _dbEntry.DownloadCount.Value : 0;
numericRating.Value = _dbEntry.Rating.HasValue ? _dbEntry.Rating.Value : 0;
numericRating.Value = _dbEntry.Rating.HasValue ? (_dbEntry.Rating.Value > 10 ? 10 : _dbEntry.Rating.Value) : 0;
dateTimeModified.Value = _dbEntry.LastModifiedDateUtc.HasValue ? _dbEntry.LastModifiedDateUtc.Value : DateTime.UtcNow;

lblReadableFileSize.Text = Convert.ToInt64(numericFileBytes.Value).FileSizeHumanReadable();
Expand Down
9 changes: 0 additions & 9 deletions PinCab.Configurator/EditDatabaseEntryForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,4 @@
<metadata name="Url.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="databaseEntryBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Url.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

0 comments on commit ef52f11

Please sign in to comment.