implemented clear all button
This commit is contained in:
parent
ef75c63aa2
commit
49119fc6dc
1 changed files with 8 additions and 2 deletions
|
@ -418,13 +418,14 @@ namespace Buypeeb {
|
||||||
aid.Dispose();
|
aid.Dispose();
|
||||||
|
|
||||||
// vry simpl url validation for simpol creachers
|
// vry simpl url validation for simpol creachers
|
||||||
|
// TODO: better. do better.
|
||||||
Regex rx = new Regex(@"^http.+yahoo.+");
|
Regex rx = new Regex(@"^http.+yahoo.+");
|
||||||
if (rx.IsMatch(url)) {
|
if (rx.IsMatch(url)) {
|
||||||
this.UpdateItem(this.settings.Watch(url, name).id);
|
this.UpdateItem(this.settings.Watch(url, name).id);
|
||||||
this.RenderList();
|
this.RenderList();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var md = this.MsgBox($"\"{url}\" is not a valid Buyee or Yahoo! Auctions Japan URL.");
|
var md = this.MsgBox($"\"{url}\" is not a valid Buyee or Yahoo! Auctions Japan URL.", ButtonsType.Ok);
|
||||||
md.Run();
|
md.Run();
|
||||||
md.Dispose();
|
md.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -457,7 +458,12 @@ namespace Buypeeb {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonClearAllClicked(object sender, EventArgs a) {
|
private void ButtonClearAllClicked(object sender, EventArgs a) {
|
||||||
Console.WriteLine("ButtonClearAllClicked");
|
var md = this.MsgBox("Are you sure you want to clear ALL items?");
|
||||||
|
if (md.Run() == (int)ResponseType.Ok) {
|
||||||
|
this.settings.watchlist.Clear();
|
||||||
|
this.RenderList();
|
||||||
|
}
|
||||||
|
md.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonOpenClicked(object sender, EventArgs a) {
|
private void ButtonOpenClicked(object sender, EventArgs a) {
|
||||||
|
|
Loading…
Reference in a new issue