Beispiel #1
0
        // display info of a building
        public void DisplayClickedFieldInfo(Building Building)
        {
            HideClickedFieldInfo();

            if (Building == null) return;

            Image_Info_Building.Source = new BitmapImage(new Uri("Resources/Buildings/" + ((Building.Look == Fraction.Saracens) ? "S" : "C") + "_" + Building.GetName() + ".png", UriKind.Relative)); ;
            Image_Info_BuildingBasement.Visibility = Visibility.Visible;

            this.ShownBuilding = Building;

            Label_Info_Name.Content = R.String(Building.GetName());

            // taxes
            Label_TaxesPerRound.Content = R.String("TaxesPerRound") + ": " + Building.GetPaymentPerRound().ToString();
            Label_TaxesPerRound.Visibility = Visibility.Visible;
            Image_TaxesPerRoundMoney.Visibility = Visibility.Visible;

            /*ListBox_Info_GeneralInformation_Description.Visibility = Visibility.Hidden;
            StackPanel_UnitInfoIcons.Visibility = Visibility.Hidden;
            ListBox_Info_GeneralInformation_Value.Items.Clear();
            HideUnitTypeInformationPopup();       */
        }
Beispiel #2
0
        // hide info
        public void HideClickedFieldInfo()
        {
            this.ShownUnit = null;
            this.ShownBuilding = null;

            Label_Info_Name.Content = null;
            Label_Info_Type.Content = null;

            Label_TaxesPerRound.Visibility = Visibility.Hidden;
            Image_TaxesPerRoundMoney.Visibility = Visibility.Hidden;

            Image_Info_Unit.Source = null;
            Image_Info_Building.Source = null;
            Image_Info_BuildingBasement.Visibility = Visibility.Hidden;

            ListBox_Info_GeneralInformation_Description.Visibility = Visibility.Hidden;
            StackPanel_UnitInfoIcons.Visibility = Visibility.Hidden;
            ListBox_Info_GeneralInformation_Value.Items.Clear();
            HideUnitTypeInformationPopup();
        }