private async void Close() { try { LBtnClose.Visibility = Visibility.Hidden; ImgMain.Source = remoteInfo.IsAd == true?ImageGetter.Get("ad_close.png") : ImageGetter.Get("potd_close.png"); TBCountDown.Visibility = Visibility.Visible; while (int.Parse(TBCountDown.Text) >= 0) { await Task.Run(() => { Thread.Sleep(1000); }); TBCountDown.Text = (int.Parse(TBCountDown.Text) - 1).ToString(); } this.Visibility = Visibility.Hidden; } catch (Exception e) { Logger.Warn(this, "exception on closing PotdBox", e); } }
private void ImgMin_MouseLeave(object sender, MouseEventArgs e) => ImgMin.Source = ImageGetter.Get("Btn/min_normal.png");
private void ImgMin_MouseEnter(object sender, MouseEventArgs e) => ImgMin.Source = ImageGetter.Get("Btn/min_selected.png");
private void ImgClose_MouseLeave(object sender, MouseEventArgs e) => ImgClose.Source = ImageGetter.Get("Btn/close_normal.png");
private void ImgClose_MouseEnter(object sender, MouseEventArgs e) => ImgClose.Source = ImageGetter.Get("Btn/close_selected.png");