예제 #1
0
 private void PricingFormWin_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (WindowController.Instance().PricingFormWin.Visibility == Visibility.Hidden)
     {
         PricingForm_Closed();
     }
 }
예제 #2
0
 private void PricingForm_Closed()
 {
     if (WindowController.Instance().PricingFormWin.ItemId == Item.Id)
     {
         EditPriceNote();
     }
 }
예제 #3
0
        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();
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
 private void SetupEvents()
 {
     WindowController.Instance().PricingFormWin.IsVisibleChanged += PricingFormWin_IsVisibleChanged;
 }