예제 #1
0
        public void setText(ParishWallDetailInfo_ReturnType returnData, DonatePopup parent)
        {
            base.clearControls();
            int num = 0;

            foreach (WallInfo info in returnData.detailedInfo)
            {
                if (info.detailedInfo.detail1 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail2 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail3 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail4 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail5 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail6 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail7 > 0)
                {
                    num++;
                }
                if (info.detailedInfo.detail8 > 0)
                {
                    num++;
                }
            }
            int num2 = GFXLibrary.parishwall_tan_bar_01_short.Height + 3;

            this.backgroundImage.Size     = new Size(GFXLibrary.parishwall_tan_bar_01_short.Width + 20, ((num2 * num) + 20) - 3);
            this.backgroundImage.Position = new Point(0, 0);
            base.addControl(this.backgroundImage);
            this.backgroundImage.Create((Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_right);
            int index = 0;

            foreach (WallInfo info2 in returnData.detailedInfo)
            {
                if (info2.detailedInfo.detail1 > 0)
                {
                    int resource = VillageBuildingsData.getRequiredResourceType(info2.data1, 0);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail1, resource));
                    index++;
                }
                if (info2.detailedInfo.detail2 > 0)
                {
                    int num5 = VillageBuildingsData.getRequiredResourceType(info2.data1, 1);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail2, num5));
                    index++;
                }
                if (info2.detailedInfo.detail3 > 0)
                {
                    int num6 = VillageBuildingsData.getRequiredResourceType(info2.data1, 2);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail3, num6));
                    index++;
                }
                if (info2.detailedInfo.detail4 > 0)
                {
                    int num7 = VillageBuildingsData.getRequiredResourceType(info2.data1, 3);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail4, num7));
                    index++;
                }
                if (info2.detailedInfo.detail5 > 0)
                {
                    int num8 = VillageBuildingsData.getRequiredResourceType(info2.data1, 4);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail5, num8));
                    index++;
                }
                if (info2.detailedInfo.detail6 > 0)
                {
                    int num9 = VillageBuildingsData.getRequiredResourceType(info2.data1, 5);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail6, num9));
                    index++;
                }
                if (info2.detailedInfo.detail7 > 0)
                {
                    int num10 = VillageBuildingsData.getRequiredResourceType(info2.data1, 6);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail7, num10));
                    index++;
                }
                if (info2.detailedInfo.detail8 > 0)
                {
                    int num11 = VillageBuildingsData.getRequiredResourceType(info2.data1, 7);
                    this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail8, num11));
                    index++;
                }
            }
            parent.Size = this.backgroundImage.Size;
            base.Invalidate();
            parent.Invalidate();
        }
예제 #2
0
 public void setText(ParishWallDetailInfo_ReturnType returnData, DonatePopup parent)
 {
     base.clearControls();
     int num = 0;
     foreach (WallInfo info in returnData.detailedInfo)
     {
         if (info.detailedInfo.detail1 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail2 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail3 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail4 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail5 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail6 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail7 > 0)
         {
             num++;
         }
         if (info.detailedInfo.detail8 > 0)
         {
             num++;
         }
     }
     int num2 = GFXLibrary.parishwall_tan_bar_01_short.Height + 3;
     this.backgroundImage.Size = new Size(GFXLibrary.parishwall_tan_bar_01_short.Width + 20, ((num2 * num) + 20) - 3);
     this.backgroundImage.Position = new Point(0, 0);
     base.addControl(this.backgroundImage);
     this.backgroundImage.Create((Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_left, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_middle, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_upper_right, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_left, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_middle, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_middle_right, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_left, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_middle, (Image) GFXLibrary.parishwall_solid_rounded_rectangle_tan_bottom_right);
     int index = 0;
     foreach (WallInfo info2 in returnData.detailedInfo)
     {
         if (info2.detailedInfo.detail1 > 0)
         {
             int resource = VillageBuildingsData.getRequiredResourceType(info2.data1, 0);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail1, resource));
             index++;
         }
         if (info2.detailedInfo.detail2 > 0)
         {
             int num5 = VillageBuildingsData.getRequiredResourceType(info2.data1, 1);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail2, num5));
             index++;
         }
         if (info2.detailedInfo.detail3 > 0)
         {
             int num6 = VillageBuildingsData.getRequiredResourceType(info2.data1, 2);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail3, num6));
             index++;
         }
         if (info2.detailedInfo.detail4 > 0)
         {
             int num7 = VillageBuildingsData.getRequiredResourceType(info2.data1, 3);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail4, num7));
             index++;
         }
         if (info2.detailedInfo.detail5 > 0)
         {
             int num8 = VillageBuildingsData.getRequiredResourceType(info2.data1, 4);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail5, num8));
             index++;
         }
         if (info2.detailedInfo.detail6 > 0)
         {
             int num9 = VillageBuildingsData.getRequiredResourceType(info2.data1, 5);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail6, num9));
             index++;
         }
         if (info2.detailedInfo.detail7 > 0)
         {
             int num10 = VillageBuildingsData.getRequiredResourceType(info2.data1, 6);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail7, num10));
             index++;
         }
         if (info2.detailedInfo.detail8 > 0)
         {
             int num11 = VillageBuildingsData.getRequiredResourceType(info2.data1, 7);
             this.backgroundImage.addControl(this.addRow(index, info2.data1, info2.detailedInfo.detail8, num11));
             index++;
         }
     }
     parent.Size = this.backgroundImage.Size;
     base.Invalidate();
     parent.Invalidate();
 }