private void PricingFormWin_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (WindowController.Instance().PricingFormWin.Visibility == Visibility.Hidden) { PricingForm_Closed(); } }
private void PricingForm_Closed() { if (WindowController.Instance().PricingFormWin.ItemId == Item.Id) { EditPriceNote(); } }
private void imgIconUrl_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { var price = Session.Instance().GetShop().GetPrice(Item.Id); if (price != null) { WindowController.Instance().PricingFormWin.SetPrice(price); } else { WindowController.Instance().PricingFormWin.Reset(); } WindowController.Instance().PricingFormWin.SetItemId(Item.Id); WindowController.Instance().PricingFormWin.ShowDialog(); }
private void EditPriceNote() { if (WindowController.Instance().PricingFormWin.Price != null) { itemTooltipControl.AddPriceNote(WindowController.Instance().PricingFormWin.Price.ToString()); txtbPriceAmount.Text = $"{ WindowController.Instance().PricingFormWin.Price.Value}x"; if (WindowController.Instance().PricingFormWin.Price.Value > 999 && Item.Width < 2) { txtbPriceAmount.FontSize = 8; } imgPriceCurrency.Source = new BitmapImage(new Uri(Shop.CurrencyTypeToImageUrl[WindowController.Instance().PricingFormWin.Price.Currency])); } else { itemTooltipControl.RemovePriceNote(); } }
private void SetupEvents() { WindowController.Instance().PricingFormWin.IsVisibleChanged += PricingFormWin_IsVisibleChanged; }