31 lines
922 B
C#
31 lines
922 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Buypeeb {
|
|
|
|
class Settings {
|
|
public int updateInterval { get; set; } = 10 * 60;
|
|
public int favouriteUpdateInterval { get; set; } = 5 * 60;
|
|
public int updateIntervalCritical { get; set; } = 60;
|
|
public int favouriteUpdateIntervalCritical { get; set; } = 30;
|
|
public bool displaySecondsInList { get; set; } = true;
|
|
|
|
public Dictionary<string, YahooAuctionsItem> watchlist {
|
|
get; set;
|
|
}
|
|
|
|
public Settings() {
|
|
if (this.watchlist == null) {
|
|
// either this is the first time the program has been run, or there's something wrong with userdata.json
|
|
this.watchlist = new Dictionary<string, YahooAuctionsItem>();
|
|
}
|
|
}
|
|
|
|
public YahooAuctionsItem Watch(string url, string name) {
|
|
string id = BuypeebApp.IDFromURL(url);
|
|
Console.WriteLine(id);
|
|
this.watchlist[id] = new YahooAuctionsItem(id, name);
|
|
return this.watchlist[id];
|
|
}
|
|
}
|
|
}
|