Made dictionary inline, changed text on ended auctions to say ended, some silliness.
This commit is contained in:
parent
83bdd72bfe
commit
e486bce6de
3 changed files with 33 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ bin/
|
||||||
obj/
|
obj/
|
||||||
out/
|
out/
|
||||||
yahoo.html
|
yahoo.html
|
||||||
|
.vs/
|
|
@ -250,16 +250,18 @@ namespace Buypeeb {
|
||||||
this.selectionViewBox.Sensitive = item.ready;
|
this.selectionViewBox.Sensitive = item.ready;
|
||||||
infobox.Visible = true;
|
infobox.Visible = true;
|
||||||
|
|
||||||
var info = new Dictionary<string, string>();
|
var info = new Dictionary<string, string>
|
||||||
info.Add("Name", item.name);
|
{
|
||||||
info.Add("YahooName", item.originalName);
|
{ "Name", item.name },
|
||||||
info.Add("Price", item.PriceJPY());
|
{ "YahooName", item.originalName },
|
||||||
info.Add("PriceAUD", item.PriceAUD());
|
{ "Price", item.PriceJPY() },
|
||||||
info.Add("Ending", "...");
|
{ "PriceAUD", item.PriceAUD() },
|
||||||
info.Add("Bids", $"{item.bids}");
|
{ "Ending", "..." },
|
||||||
info.Add("BuyItNow", item.winPrice == 0 ? "No" : $"¥{item.PriceJPY(true)} (${item.PriceAUD(true)})");
|
{ "Bids", $"{item.bids}" },
|
||||||
info.Add("AutoExtension", item.autoExtension ? "Yes" : "No");
|
{ "BuyItNow", item.winPrice == 0 ? "No" : $"¥{item.PriceJPY(true)} (${item.PriceAUD(true)})" },
|
||||||
info.Add("LastUpdated", "Last updated: heeeenlo");
|
{ "AutoExtension", item.autoExtension ? "Yes" : "No" },
|
||||||
|
{ "LastUpdated", "Last updated: heeeenlo" }
|
||||||
|
};
|
||||||
|
|
||||||
foreach (var row in info) {
|
foreach (var row in info) {
|
||||||
var l = (Label)this.builder.GetObject($"LabelSelected{row.Key}");
|
var l = (Label)this.builder.GetObject($"LabelSelected{row.Key}");
|
||||||
|
@ -487,19 +489,25 @@ namespace Buypeeb {
|
||||||
YahooAuctionsItem item = (YahooAuctionsItem)model.GetValue(iter, 0);
|
YahooAuctionsItem item = (YahooAuctionsItem)model.GetValue(iter, 0);
|
||||||
string ending = "";
|
string ending = "";
|
||||||
if (item.ready) {
|
if (item.ready) {
|
||||||
|
if (!item.available) {
|
||||||
|
ending = "Ended";
|
||||||
|
} else {
|
||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
var end = item.endDate.ToLocalTime();
|
var end = item.endDate.ToLocalTime();
|
||||||
// TODO: should we show the year if the auction ends next year? 0uo
|
// TODO: should we show the year if the auction ends next year? 0uo
|
||||||
if (end.DayOfYear != now.DayOfYear) {
|
if (end.DayOfYear != now.DayOfYear)
|
||||||
|
{
|
||||||
// the auction isn't ending today, so we should show the day it's ending on for clarity
|
// the auction isn't ending today, so we should show the day it's ending on for clarity
|
||||||
ending += end.ToString("MMM d ");
|
ending += end.ToString("MMM d ");
|
||||||
}
|
}
|
||||||
ending += end.ToString("HH:mm");
|
ending += end.ToString("HH:mm");
|
||||||
if (this.settings.displaySecondsInList) {
|
if (this.settings.displaySecondsInList)
|
||||||
|
{
|
||||||
// add the seconds on to the end
|
// add the seconds on to the end
|
||||||
ending += end.ToString(":ss");
|
ending += end.ToString(":ss");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
(cell as Gtk.CellRendererText).Text = item.ready ? ending : "...";
|
(cell as Gtk.CellRendererText).Text = item.ready ? ending : "...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,7 +355,7 @@
|
||||||
<object class="GtkLabel" id="LabelSelectedName">
|
<object class="GtkLabel" id="LabelSelectedName">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">precious peebus polytonal player</property>
|
<property name="label" translatable="yes">precious peebus polytonal player (paca edition)</property>
|
||||||
<property name="justify">center</property>
|
<property name="justify">center</property>
|
||||||
<property name="wrap">True</property>
|
<property name="wrap">True</property>
|
||||||
<property name="ellipsize">end</property>
|
<property name="ellipsize">end</property>
|
||||||
|
|
Loading…
Reference in a new issue