コード例 #1
0
 public void LoadIngredientImage()
 {
     if (craftingIngedient.imagePath.Equals("archane.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.archane);
     }
     else if (craftingIngedient.imagePath.Equals("beast.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.beast);
     }
     else if (craftingIngedient.imagePath.Equals("cloth.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.cloth);
     }
     else if (craftingIngedient.imagePath.Equals("eagleegg.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.eagleegg);
     }
     else if (craftingIngedient.imagePath.Equals("feather.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.feather);
     }
     else if (craftingIngedient.imagePath.Equals("fish.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.fish);
     }
     else if (craftingIngedient.imagePath.Equals("humanoid.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.humanoid);
     }
     else if (craftingIngedient.imagePath.Equals("insect.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.insect);
     }
     else if (craftingIngedient.imagePath.Equals("liquid.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.liquid);
     }
     else if (craftingIngedient.imagePath.Equals("plant.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.plant);
     }
     else if (craftingIngedient.imagePath.Equals("powder.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.powder);
     }
     else if (craftingIngedient.imagePath.Equals("raven.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.raven);
     }
     else if (craftingIngedient.imagePath.Equals("reptile.png"))
     {
         imgIngredient.Source = ImageUtil.BitmapToImageSource(Resoures.reptile);
     }
 }
コード例 #2
0
 private void btnCraft_Click(object sender, RoutedEventArgs e)
 {
     if (ingB1.CraftingIngredient != null && ingB2.CraftingIngredient != null && ingB3.CraftingIngredient != null)
     {
         pbxPotion.CraftedPotion     = WorldController.table.craftPotion(ingB1.CraftingIngredient, ingB2.CraftingIngredient, ingB3.CraftingIngredient);
         pbxPotion.imgPotion.Source  = ImageUtil.BitmapToImageSource(Resoures.potion);
         pbxPotion.imgPotion.Stretch = Stretch.UniformToFill;
         ingB1.CraftingIngredient    = null;
         ingB2.CraftingIngredient    = null;
         ingB3.CraftingIngredient    = null;
     }
 }
コード例 #3
0
        public AlchymyTableScreen()
        {
            InitializeComponent();
            //btnGold.DataContext = Models.WorldController.player;
            imgBackground.Source = ImageUtil.BitmapToImageSource(Resoures.alchymyTableScreenBackground);
            //idInventory.InventorySource = Models.WorldController.player.getInventory();
            //pbxPotion.imgPotion.Source = ImageUtil.BitmapToImageSource(Resoures.potion);
            pbxPotion.imgPotion.Stretch           = Stretch.UniformToFill;
            pbxPotion.imgPotionBackground.Source  = ImageUtil.BitmapToImageSource(Resoures.emptyBoxFiller_600x800);
            pbxPotion.imgPotionBackground.Stretch = Stretch.UniformToFill;

            lbInventory.ItemsSource  = WorldController.player.getInventory().getIngredients();
            ingB1.CraftingIngredient = null;
            ingB2.CraftingIngredient = null;
            ingB3.CraftingIngredient = null;
        }
コード例 #4
0
 public TravelingMerchantScreen()
 {
     InitializeComponent();
     imgBackground.Source = ImageUtil.BitmapToImageSource(Resoures.buying);
 }
コード例 #5
0
 public PotionBox()
 {
     InitializeComponent();
     imgPotionBackground.Source = ImageUtil.BitmapToImageSource(Resoures.emptyBoxFiller);
 }
コード例 #6
0
 private void LoadPotionImage()
 {
     imgPotion.Source = ImageUtil.BitmapToImageSource(Resoures.potion);
 }
コード例 #7
0
 public AlchymyShoppeScreen()
 {
     InitializeComponent();
     imgBackground.Source = ImageUtil.BitmapToImageSource(Resoures.alchymyTableScreenBackground);
 }
コード例 #8
0
 public PotionIngredientBox()
 {
     InitializeComponent();
     imgIngredientBackground.Source = ImageUtil.BitmapToImageSource(Resoures.emptyBoxFiller_800x800);
 }
コード例 #9
0
 public StartScreen()
 {
     InitializeComponent();
     imgBackground.Source = ImageUtil.BitmapToImageSource(Resoures.startScreenBackground);
 }