예제 #1
0
        private CustomSelfDrawPanel.CSDImage addRow(int index, int buildingType, int amount, int resource)
        {
            int num = GFXLibrary.parishwall_tan_bar_01_short.Height + 3;

            CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage {
                Image    = (Image)GFXLibrary.parishwall_tan_bar_01_short,
                Position = new Point(10, 10 + (num * index))
            };
            CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel {
                Text      = VillageBuildingsData.getBuildingName(buildingType),
                Color     = ARGBColors.Black,
                Position  = new Point(10, 0),
                Size      = new Size(image.Width - 20, image.Height),
                Font      = FontManager.GetFont("Arial", 10f, FontStyle.Regular),
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT
            };
            image.addControl(control);
            CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel {
                Text      = amount.ToString(),
                Color     = ARGBColors.Black,
                Position  = new Point(10, 0),
                Size      = new Size(image.Width - 60, image.Height),
                Font      = FontManager.GetFont("Arial", 10f, FontStyle.Regular),
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT
            };
            image.addControl(label2);
            CustomSelfDrawPanel.CSDImage image2 = new CustomSelfDrawPanel.CSDImage {
                Image    = (Image)GFXLibrary.getCommodity32Image(resource),
                Position = new Point(image.Width - 0x2d, 2)
            };
            image.addControl(image2);
            return(image);
        }
        public override void setData(GetReport_ReturnType returnData)
        {
            base.setData(returnData);
            switch (returnData.reportType)
            {
            case 0x49:
                base.lblMainText.Text      = returnData.otherUser + " (" + GameEngine.Instance.World.getVillageName(returnData.attackingVillage) + ")";
                base.lblSubTitle.Text      = SK.Text("Reports_Sent_Resources_To", "Has sent resources to");
                base.lblSecondaryText.Text = base.reportOwner + " (" + GameEngine.Instance.World.getVillageName(returnData.defendingVillage) + ")";
                break;

            case 0x4e:
                base.lblMainText.Text      = GameEngine.Instance.World.getVillageName(returnData.attackingVillage);
                base.lblSubTitle.Text      = SK.Text("Report_Auto_Sent_Resources_To", "Has Auto-Sent resources to");
                base.lblSecondaryText.Text = GameEngine.Instance.World.getVillageName(returnData.defendingVillage);
                break;
            }
            base.imgFurther.Image = (Image)GFXLibrary.getCommodity32Image(base.m_returnData.genericData1);
            base.imgFurther.setSizeToImage();
            base.imgFurther.Position  = new Point((base.Width / 2) - base.imgFurther.Width, base.btnDelete.Position.Y);
            base.lblFurther.Text      = base.m_returnData.genericData2.ToString("N", base.nfi);
            base.lblFurther.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            base.lblFurther.Size      = new Size(base.Width, base.imgFurther.Height);
            base.lblFurther.Position  = new Point(base.imgFurther.Rectangle.Right + 10, base.imgFurther.Position.Y);
            base.showFurtherInfo();
        }
 public void setResources(int resourceType, int amount)
 {
     if (resourceType != -1)
     {
         base.lblFurther.Text  = amount.ToString();
         base.imgFurther.Image = (Image)GFXLibrary.getCommodity32Image(resourceType);
     }
     base.lblDate.Y = base.lblDate.Position.Y - 20;
     base.imgFurther.setSizeToImage();
     base.imgFurther.Position  = new Point((base.Width / 2) - base.imgFurther.Width, base.btnDelete.Rectangle.Bottom - 80);
     base.lblFurther.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     base.lblFurther.Size      = new Size(base.Width, Math.Max(base.imgFurther.Height, 30));
     base.lblFurther.Position  = new Point(base.imgFurther.Rectangle.Right + 10, base.imgFurther.Position.Y);
     base.showFurtherInfo();
 }