diff --git a/MainWindow.cs b/MainWindow.cs index 57c0396..653f710 100755 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -418,13 +418,14 @@ namespace Buypeeb { aid.Dispose(); // vry simpl url validation for simpol creachers + // TODO: better. do better. Regex rx = new Regex(@"^http.+yahoo.+"); if (rx.IsMatch(url)) { this.UpdateItem(this.settings.Watch(url, name).id); this.RenderList(); } 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.Dispose(); } @@ -457,7 +458,12 @@ namespace Buypeeb { } 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) {