private void UpdateAlbumPage(int equipmentID)
        {
            KCDatabase          db = KCDatabase.Instance;
            EquipmentDataMaster eq = db.MasterEquipments[equipmentID];

            if (eq == null)
            {
                return;
            }


            BasePanelEquipment.SuspendLayout();


            //header
            EquipmentID.Tag  = equipmentID;
            EquipmentID.Text = eq.EquipmentID.ToString();
            ToolTipInfo.SetToolTip(EquipmentID, string.Format("Type: [ {0} ]", string.Join(", ", eq.EquipmentType)));
            AlbumNo.Text = eq.AlbumNo.ToString();


            TableEquipmentName.SuspendLayout();

            EquipmentType.Text = eq.CategoryTypeInstance.Name;

            {
                int eqicon = eq.IconType;
                if (eqicon >= (int)ResourceManager.EquipmentContent.Locked)
                {
                    eqicon = (int)ResourceManager.EquipmentContent.Unknown;
                }
                EquipmentType.ImageIndex = eqicon;

                ToolTipInfo.SetToolTip(EquipmentType, GetEquippableShips(equipmentID));
            }
            EquipmentName.Text = eq.Name;
            ToolTipInfo.SetToolTip(EquipmentName, "(右クリックでコピー)");

            TableEquipmentName.ResumeLayout();


            //main parameter
            TableParameterMain.SuspendLayout();

            SetParameterText(Firepower, eq.Firepower);
            SetParameterText(Torpedo, eq.Torpedo);
            SetParameterText(AA, eq.AA);
            SetParameterText(Armor, eq.Armor);
            SetParameterText(ASW, eq.ASW);
            SetParameterText(Evasion, eq.Evasion);
            SetParameterText(LOS, eq.LOS);
            SetParameterText(Accuracy, eq.Accuracy);
            SetParameterText(Bomber, eq.Bomber);

            if (eq.CategoryType == EquipmentTypes.Interceptor)
            {
                TitleAccuracy.Text       = "対爆";
                TitleAccuracy.ImageIndex = (int)ResourceManager.IconContent.ParameterAntiBomber;
                TitleEvasion.Text        = "迎撃";
                TitleEvasion.ImageIndex  = (int)ResourceManager.IconContent.ParameterInterception;
            }
            else
            {
                TitleAccuracy.Text       = "命中";
                TitleAccuracy.ImageIndex = (int)ResourceManager.IconContent.ParameterAccuracy;
                TitleEvasion.Text        = "回避";
                TitleEvasion.ImageIndex  = (int)ResourceManager.IconContent.ParameterEvasion;
            }

            TableParameterMain.ResumeLayout();


            //sub parameter
            TableParameterSub.SuspendLayout();

            Speed.Text        = "なし";      //Constants.GetSpeed( eq.Speed );
            Range.Text        = Constants.GetRange(eq.Range);
            Rarity.Text       = Constants.GetEquipmentRarity(eq.Rarity);
            Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + Constants.GetEquipmentRarityID(eq.Rarity);                 //checkme

            TableParameterSub.ResumeLayout();


            // aircraft
            if (eq.IsAircraft)
            {
                TableAircraft.SuspendLayout();
                AircraftCost.Text = eq.AircraftCost.ToString();
                ToolTipInfo.SetToolTip(AircraftCost, "配備時のボーキ消費:" + ((eq.IsCombatAircraft ? 18 : 4) * eq.AircraftCost));
                AircraftDistance.Text = eq.AircraftDistance.ToString();
                TableAircraft.ResumeLayout();
                TableAircraft.Visible = true;
            }
            else
            {
                TableAircraft.Visible = false;
            }


            //default equipment
            DefaultSlots.BeginUpdate();
            DefaultSlots.Items.Clear();
            foreach (var ship in KCDatabase.Instance.MasterShips.Values)
            {
                if (ship.DefaultSlot != null && ship.DefaultSlot.Contains(equipmentID))
                {
                    DefaultSlots.Items.Add(ship);
                }
            }
            DefaultSlots.EndUpdate();


            Description.Text = eq.Message;


            //arsenal
            TableArsenal.SuspendLayout();

            MaterialFuel.Text    = eq.Material[0].ToString();
            MaterialAmmo.Text    = eq.Material[1].ToString();
            MaterialSteel.Text   = eq.Material[2].ToString();
            MaterialBauxite.Text = eq.Material[3].ToString();

            TableArsenal.ResumeLayout();



            //装備画像を読み込んでみる
            {
                var img =
                    KCResourceHelper.LoadEquipmentImage(equipmentID, KCResourceHelper.ResourceTypeEquipmentCard) ??
                    KCResourceHelper.LoadEquipmentImage(equipmentID, KCResourceHelper.ResourceTypeEquipmentCardSmall);

                if (img != null)
                {
                    EquipmentImage.Image?.Dispose();
                    EquipmentImage.Image = img;
                }
                else
                {
                    EquipmentImage.Image?.Dispose();
                    EquipmentImage.Image = null;
                }
            }


            BasePanelEquipment.ResumeLayout();
            BasePanelEquipment.Visible = true;


            this.Text = "装備図鑑 - " + eq.Name;
        }
Пример #2
0
		private void UpdateAlbumPage( int shipID ) {

			KCDatabase db = KCDatabase.Instance;
			ShipDataMaster ship = db.MasterShips[shipID];

			if ( ship == null ) return;


			BasePanelShipGirl.SuspendLayout();

			//header
			TableShipName.SuspendLayout();
			_shipID = shipID;
			ShipID.Text = ship.ShipID.ToString();
			AlbumNo.Text = ship.AlbumNo.ToString();
			ResourceName.Text = string.Format( "{0} ver. {1}", ship.ResourceName, ship.ResourceVersion );

			ShipType.Text = ship.IsLandBase ? "陸上基地" : db.ShipTypes[ship.ShipType].Name;
			ShipName.Text = ship.NameWithClass;
			ToolTipInfo.SetToolTip( ShipName, !ship.IsAbyssalShip ? ship.NameReading : null );
			TableShipName.ResumeLayout();


			//main parameter
			TableParameterMain.SuspendLayout();

			if ( !ship.IsAbyssalShip ) {

				TitleParameterMin.Text = "初期値";
				TitleParameterMax.Text = "最大値";

				HPMin.Text = ship.HPMin.ToString();
				HPMax.Text = ship.HPMaxMarried.ToString();

				FirepowerMin.Text = ship.FirepowerMin.ToString();
				FirepowerMax.Text = ship.FirepowerMax.ToString();

				TorpedoMin.Text = ship.TorpedoMin.ToString();
				TorpedoMax.Text = ship.TorpedoMax.ToString();

				AAMin.Text = ship.AAMin.ToString();
				AAMax.Text = ship.AAMax.ToString();

				ArmorMin.Text = ship.ArmorMin.ToString();
				ArmorMax.Text = ship.ArmorMax.ToString();

				ASWMin.Text = GetParameterMinBound( ship.ASW );
				ASWMax.Text = GetParameterMax( ship.ASW );

				EvasionMin.Text = GetParameterMinBound( ship.Evasion );
				EvasionMax.Text = GetParameterMax( ship.Evasion );

				LOSMin.Text = GetParameterMinBound( ship.LOS );
				LOSMax.Text = GetParameterMax( ship.LOS );

				LuckMin.Text = ship.LuckMin.ToString();
				LuckMax.Text = ship.LuckMax.ToString();

			} else {

				int hp = ship.HPMin;
				int firepower = ship.FirepowerMax;
				int torpedo = ship.TorpedoMax;
				int aa = ship.AAMax;
				int armor = ship.ArmorMax;
				int asw = ship.ASW != null && ship.ASW.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.ASW.Maximum : 0;
				int evasion = ship.Evasion != null && ship.Evasion.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.Evasion.Maximum : 0;
				int los = ship.LOS != null && ship.LOS.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.LOS.Maximum : 0;
				int luck = ship.LuckMax;

				if ( ship.DefaultSlot != null ) {
					int count = ship.DefaultSlot.Count;
					for ( int i = 0; i < count; i++ ) {
						EquipmentDataMaster eq = KCDatabase.Instance.MasterEquipments[ship.DefaultSlot[i]];
						if ( eq == null ) continue;

						firepower += eq.Firepower;
						torpedo += eq.Torpedo;
						aa += eq.AA;
						armor += eq.Armor;
						asw += eq.ASW;
						evasion += eq.Evasion;
						los += eq.LOS;
						luck += eq.Luck;
					}
				}

				TitleParameterMin.Text = "基本値";
				TitleParameterMax.Text = "装備込";

				HPMin.Text = ship.HPMin.ToString();
				HPMax.Text = hp.ToString();

				FirepowerMin.Text = ship.FirepowerMax.ToString();
				FirepowerMax.Text = firepower.ToString();

				TorpedoMin.Text = ship.TorpedoMax.ToString();
				TorpedoMax.Text = torpedo.ToString();

				AAMin.Text = ship.AAMax.ToString();
				AAMax.Text = aa.ToString();

				ArmorMin.Text = ship.ArmorMax.ToString();
				ArmorMax.Text = armor.ToString();

				ASWMin.Text = ship.ASW != null && ship.ASW.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.ASW.Maximum.ToString() : "???";
				ASWMax.Text = asw.ToString();

				EvasionMin.Text = ship.Evasion != null && ship.Evasion.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.Evasion.Maximum.ToString() : "???";
				EvasionMax.Text = evasion.ToString();

				LOSMin.Text = ship.LOS != null && ship.LOS.Maximum != ShipParameterRecord.Parameter.MaximumDefault ? ship.LOS.Maximum.ToString() : "???";
				LOSMax.Text = los.ToString();

				LuckMin.Text = ship.LuckMax.ToString();
				LuckMax.Text = luck.ToString();

			}
			UpdateLevelParameter( ship.ShipID );

			TableParameterMain.ResumeLayout();


			//sub parameter
			TableParameterSub.SuspendLayout();

			Speed.Text = Constants.GetSpeed( ship.Speed );
			Range.Text = Constants.GetRange( ship.Range );
			Rarity.Text = Constants.GetShipRarity( ship.Rarity );
			Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + ship.Rarity;		//checkme

			TableParameterSub.ResumeLayout();

			TableConsumption.SuspendLayout();

			Fuel.Text = ship.Fuel.ToString();
			Ammo.Text = ship.Ammo.ToString();

			string tooltiptext = string.Format(
				"入渠時の消費:\r\nHP1あたり: 鋼 {0:F2} / 燃 {1:F2}\r\n最大: 鋼 {2} / 燃 {3}\r\n",
				( ship.Fuel * 0.06 ),
				( ship.Fuel * 0.032 ),
				(int)( ship.Fuel * 0.06 * ( ship.HPMaxMarried - 1 ) ),
				(int)( ship.Fuel * 0.032 * ( ship.HPMaxMarried - 1 ) )
				);

			ToolTipInfo.SetToolTip( TableConsumption, tooltiptext );
			ToolTipInfo.SetToolTip( TitleConsumption, tooltiptext );
			ToolTipInfo.SetToolTip( Fuel, tooltiptext );
			ToolTipInfo.SetToolTip( Ammo, tooltiptext );

			TableConsumption.ResumeLayout();

			Description.Text = ship.MessageAlbum != "" ? ship.MessageAlbum : ship.MessageGet;
			Description.Tag = ship.MessageAlbum != "" ? 1 : 0;


			//equipment
			TableEquipment.SuspendLayout();

			for ( int i = 0; i < Equipments.Length; i++ ) {

				if ( ship.Aircraft[i] > 0 || i < ship.SlotSize )
					Aircrafts[i].Text = ship.Aircraft[i].ToString();
				else
					Aircrafts[i].Text = "";


				ToolTipInfo.SetToolTip( Equipments[i], null );

				if ( ship.DefaultSlot == null ) {
					if ( i < ship.SlotSize ) {
						Equipments[i].Text = "???";
						Equipments[i].ImageIndex = (int)ResourceManager.EquipmentContent.Unknown;
					} else {
						Equipments[i].Text = "";
						Equipments[i].ImageIndex = (int)ResourceManager.EquipmentContent.Locked;
					}

				} else if ( ship.DefaultSlot[i] != -1 ) {
					EquipmentDataMaster eq = db.MasterEquipments[ship.DefaultSlot[i]];
					Equipments[i].Text = eq.Name;

					int eqicon = eq.EquipmentType[3];
					if ( eqicon >= (int)ResourceManager.EquipmentContent.Locked )
						eqicon = (int)ResourceManager.EquipmentContent.Unknown;

					Equipments[i].ImageIndex = eqicon;

					{
						StringBuilder sb = new StringBuilder();

						sb.AppendFormat( "{0} {1}\r\n", eq.CategoryTypeInstance.Name, eq.Name );
						if ( eq.Firepower != 0 ) sb.AppendFormat( "火力 {0}{1}\r\n", eq.Firepower > 0 ? "+" : "", eq.Firepower );
						if ( eq.Torpedo != 0 ) sb.AppendFormat( "雷装 {0}{1}\r\n", eq.Torpedo > 0 ? "+" : "", eq.Torpedo );
						if ( eq.AA != 0 ) sb.AppendFormat( "対空 {0}{1}\r\n", eq.AA > 0 ? "+" : "", eq.AA );
						if ( eq.Armor != 0 ) sb.AppendFormat( "装甲 {0}{1}\r\n", eq.Armor > 0 ? "+" : "", eq.Armor );
						if ( eq.ASW != 0 ) sb.AppendFormat( "対潜 {0}{1}\r\n", eq.ASW > 0 ? "+" : "", eq.ASW );
						if ( eq.Evasion != 0 ) sb.AppendFormat( "回避 {0}{1}\r\n", eq.Evasion > 0 ? "+" : "", eq.Evasion );
						if ( eq.LOS != 0 ) sb.AppendFormat( "索敵 {0}{1}\r\n", eq.LOS > 0 ? "+" : "", eq.LOS );
						if ( eq.Accuracy != 0 ) sb.AppendFormat( "命中 {0}{1}\r\n", eq.Accuracy > 0 ? "+" : "", eq.Accuracy );
						if ( eq.Bomber != 0 ) sb.AppendFormat( "爆装 {0}{1}\r\n", eq.Bomber > 0 ? "+" : "", eq.Bomber );
						sb.AppendLine( "(右クリックで図鑑)" );

						ToolTipInfo.SetToolTip( Equipments[i], sb.ToString() );
					}

				} else if ( i < ship.SlotSize ) {
					Equipments[i].Text = "(なし)";
					Equipments[i].ImageIndex = (int)ResourceManager.EquipmentContent.Nothing;

				} else {
					Equipments[i].Text = "";
					Equipments[i].ImageIndex = (int)ResourceManager.EquipmentContent.Locked;
				}
			}

			TableEquipment.ResumeLayout();


			//arsenal
			TableArsenal.SuspendLayout();
			BuildingTime.Text = DateTimeHelper.ToTimeRemainString( new TimeSpan( 0, ship.BuildingTime, 0 ) );

			MaterialFuel.Text = ship.Material[0].ToString();
			MaterialAmmo.Text = ship.Material[1].ToString();
			MaterialSteel.Text = ship.Material[2].ToString();
			MaterialBauxite.Text = ship.Material[3].ToString();

			PowerUpFirepower.Text = ship.PowerUp[0].ToString();
			PowerUpTorpedo.Text = ship.PowerUp[1].ToString();
			PowerUpAA.Text = ship.PowerUp[2].ToString();
			PowerUpArmor.Text = ship.PowerUp[3].ToString();

			TableArsenal.ResumeLayout();


			//remodel
			if ( !ship.IsAbyssalShip ) {

				TableRemodel.SuspendLayout();

				if ( ship.RemodelBeforeShipID == 0 ) {
					RemodelBeforeShipName.Text = "(なし)";
					RemodelBeforeLevel.Text = "";
					RemodelBeforeLevel.ImageIndex = -1;
					ToolTipInfo.SetToolTip( RemodelBeforeLevel, null );
					RemodelBeforeAmmo.Text = "-";
					RemodelBeforeSteel.Text = "-";
				} else {
					ShipDataMaster sbefore = ship.RemodelBeforeShip;
					RemodelBeforeShipName.Text = sbefore.Name;
					RemodelBeforeLevel.Text = string.Format( "Lv. {0}", sbefore.RemodelAfterLevel );
					RemodelBeforeLevel.ImageIndex = sbefore.NeedCatapult > 0 ? (int)ResourceManager.IconContent.ItemCatapult : sbefore.NeedBlueprint > 0 ? (int)ResourceManager.IconContent.ItemBlueprint : -1;
					ToolTipInfo.SetToolTip( RemodelBeforeLevel, GetRemodelItem( sbefore ) );
					RemodelBeforeAmmo.Text = sbefore.RemodelAmmo.ToString();
					RemodelBeforeSteel.Text = sbefore.RemodelSteel.ToString();
				}

				if ( ship.RemodelAfterShipID == 0 ) {
					RemodelAfterShipName.Text = "(なし)";
					RemodelAfterLevel.Text = "";
					RemodelAfterLevel.ImageIndex = -1;
					ToolTipInfo.SetToolTip( RemodelAfterLevel, null );
					RemodelAfterAmmo.Text = "-";
					RemodelAfterSteel.Text = "-";
				} else {
					RemodelAfterShipName.Text = ship.RemodelAfterShip.Name;
					RemodelAfterLevel.Text = string.Format( "Lv. {0}", ship.RemodelAfterLevel );
					RemodelAfterLevel.ImageIndex = ship.NeedCatapult > 0 ? (int)ResourceManager.IconContent.ItemCatapult : ship.NeedBlueprint > 0 ? (int)ResourceManager.IconContent.ItemBlueprint : -1;
					ToolTipInfo.SetToolTip( RemodelAfterLevel, GetRemodelItem( ship ) );
					RemodelAfterAmmo.Text = ship.RemodelAmmo.ToString();
					RemodelAfterSteel.Text = ship.RemodelSteel.ToString();
				}
				TableRemodel.ResumeLayout();


				TableRemodel.Visible = true;
				TableBattle.Visible = false;


			} else {

				TableBattle.SuspendLayout();

				AirSuperiority.Text = Calculator.GetAirSuperiority( ship ).ToString();
				DayAttack.Text = Constants.GetDayAttackKind( Calculator.GetDayAttackKind( ship.DefaultSlot == null ? null : ship.DefaultSlot.ToArray(), ship.ShipID, -1 ) );
				NightAttack.Text = Constants.GetNightAttackKind( Calculator.GetNightAttackKind( ship.DefaultSlot == null ? null : ship.DefaultSlot.ToArray(), ship.ShipID, -1 ) );

				TableBattle.ResumeLayout();

				TableRemodel.Visible = false;
				TableBattle.Visible = true;

			}




			BasePanelShipGirl.ResumeLayout();
			BasePanelShipGirl.Visible = true;


			this.Text = "艦船図鑑 - " + ship.NameWithClass;

		}
        private void UpdateAlbumPage(int equipmentID)
        {
            KCDatabase          db = KCDatabase.Instance;
            EquipmentDataMaster eq = db.MasterEquipments[equipmentID];

            if (eq == null)
            {
                return;
            }


            BasePanelEquipment.SuspendLayout();


            //header
            EquipmentID.Tag  = equipmentID;
            EquipmentID.Text = eq.EquipmentID.ToString();
            ToolTipInfo.SetToolTip(EquipmentID, string.Format("Type: [ {0} ]", string.Join(", ", eq.EquipmentType)));
            AlbumNo.Text = eq.AlbumNo.ToString();


            TableEquipmentName.SuspendLayout();

            EquipmentType.Text = db.EquipmentTypes[eq.EquipmentType[2]].Name;

            {
                int eqicon = eq.EquipmentType[3];
                if (eqicon >= (int)ResourceManager.EquipmentContent.Locked)
                {
                    eqicon = (int)ResourceManager.EquipmentContent.Unknown;
                }
                EquipmentType.ImageIndex = eqicon;

                StringBuilder sb = new StringBuilder();
                sb.AppendLine("装備可能艦種:");
                foreach (var stype in KCDatabase.Instance.ShipTypes.Values)
                {
                    if (stype.EquipmentType.Contains(eq.EquipmentType[2]))
                    {
                        sb.AppendLine(stype.Name);
                    }
                }
                ToolTipInfo.SetToolTip(EquipmentType, sb.ToString());
            }
            EquipmentName.Text = eq.Name;

            TableEquipmentName.ResumeLayout();


            //main parameter
            TableParameterMain.SuspendLayout();

            SetParameterText(Firepower, eq.Firepower);
            SetParameterText(Torpedo, eq.Torpedo);
            SetParameterText(AA, eq.AA);
            SetParameterText(Armor, eq.Armor);
            SetParameterText(ASW, eq.ASW);
            SetParameterText(Evasion, eq.Evasion);
            SetParameterText(LOS, eq.LOS);
            SetParameterText(Accuracy, eq.Accuracy);
            SetParameterText(Bomber, eq.Bomber);

            if (eq.CategoryType == 48)
            {
                TitleAccuracy.Text = "対爆";
                TitleEvasion.Text  = "迎撃";
            }
            else
            {
                TitleAccuracy.Text = "命中";
                TitleEvasion.Text  = "回避";
            }

            TableParameterMain.ResumeLayout();


            //sub parameter
            TableParameterSub.SuspendLayout();

            Speed.Text        = "なし";      //Constants.GetSpeed( eq.Speed );
            Range.Text        = Constants.GetRange(eq.Range);
            Rarity.Text       = Constants.GetEquipmentRarity(eq.Rarity);
            Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + Constants.GetEquipmentRarityID(eq.Rarity);                         //checkme

            TableParameterSub.ResumeLayout();


            // aircraft
            if (Calculator.IsAircraft(equipmentID, true, true))
            {
                TableAircraft.SuspendLayout();
                AircraftCost.Text = eq.AircraftCost.ToString();
                ToolTipInfo.SetToolTip(AircraftCost, "配備時のボーキ消費:" + ((Calculator.IsAircraft(equipmentID, false) ? 18 : 4) * eq.AircraftCost));
                AircraftDistance.Text = eq.AircraftDistance.ToString();
                TableAircraft.ResumeLayout();
                TableAircraft.Visible = true;
            }
            else
            {
                TableAircraft.Visible = false;
            }


            //default equipment
            DefaultSlots.BeginUpdate();
            DefaultSlots.Items.Clear();
            foreach (var ship in KCDatabase.Instance.MasterShips.Values)
            {
                if (ship.DefaultSlot != null && ship.DefaultSlot.Contains(equipmentID))
                {
                    DefaultSlots.Items.Add(ship);
                }
            }
            DefaultSlots.EndUpdate();


            Description.Text = eq.Message;


            //arsenal
            TableArsenal.SuspendLayout();

            MaterialFuel.Text    = eq.Material[0].ToString();
            MaterialAmmo.Text    = eq.Material[1].ToString();
            MaterialSteel.Text   = eq.Material[2].ToString();
            MaterialBauxite.Text = eq.Material[3].ToString();

            TableArsenal.ResumeLayout();



            //装備画像を読み込んでみる
            {
                string path = string.Format(@"{0}\\resources\\image\\slotitem\\card\\{1:D3}.png", Utility.Configuration.Config.Connection.SaveDataPath, equipmentID);
                if (File.Exists(path))
                {
                    try {
                        EquipmentImage.Image = new Bitmap(path);
                    } catch (Exception) {
                        if (EquipmentImage.Image != null)
                        {
                            EquipmentImage.Image.Dispose();
                        }
                        EquipmentImage.Image = null;
                    }
                }
                else
                {
                    if (EquipmentImage.Image != null)
                    {
                        EquipmentImage.Image.Dispose();
                    }
                    EquipmentImage.Image = null;
                }
            }


            BasePanelEquipment.ResumeLayout();
            BasePanelEquipment.Visible = true;


            this.Text = "装備図鑑 - " + eq.Name;
        }
Пример #4
0
        private void UpdateAlbumPage(int equipmentID)
        {
            KCDatabase          db = KCDatabase.Instance;
            EquipmentDataMaster eq = db.MasterEquipments[equipmentID];

            if (eq == null)
            {
                return;
            }


            BasePanelEquipment.SuspendLayout();


            //header
            EquipmentID.Tag  = equipmentID;
            EquipmentID.Text = eq.EquipmentID.ToString();
            ToolTipInfo.SetToolTip(EquipmentID, string.Format("Type: [{0}, {1}, {2}, {3}]",
                                                              eq.EquipmentType[0], eq.EquipmentType[1], eq.EquipmentType[2], eq.EquipmentType[3]));
            AlbumNo.Text = eq.AlbumNo.ToString();


            TableEquipmentName.SuspendLayout();

            EquipmentType.Text = FormMain.Instance.Translator.GetTranslation(db.EquipmentTypes[eq.EquipmentType[2]].Name, Utility.TranslationType.EquipmentType);

            {
                int eqicon = eq.EquipmentType[3];
                if (eqicon >= (int)ResourceManager.EquipmentContent.Locked)
                {
                    eqicon = (int)ResourceManager.EquipmentContent.Unknown;
                }
                EquipmentType.ImageIndex = eqicon;

                StringBuilder sb = new StringBuilder();
                sb.AppendLine(EncycloRes.EquippableShips);
                foreach (var stype in KCDatabase.Instance.ShipTypes.Values)
                {
                    if (stype.EquipmentType[eq.EquipmentType[2]])
                    {
                        sb.AppendLine(FormMain.Instance.Translator.GetTranslation(stype.Name, Utility.TranslationType.ShipTypes));
                    }
                }
                ToolTipInfo.SetToolTip(EquipmentType, sb.ToString());
            }
            EquipmentName.Text = eq.Name;

            TableEquipmentName.ResumeLayout();


            //main parameter
            TableParameterMain.SuspendLayout();

            SetParameterText(Firepower, eq.Firepower);
            SetParameterText(Torpedo, eq.Torpedo);
            SetParameterText(AA, eq.AA);
            SetParameterText(Armor, eq.Armor);
            SetParameterText(ASW, eq.ASW);
            SetParameterText(Evasion, eq.Evasion);
            SetParameterText(LOS, eq.LOS);
            SetParameterText(Accuracy, eq.Accuracy);
            SetParameterText(Bomber, eq.Bomber);

            TableParameterMain.ResumeLayout();


            //sub parameter
            TableParameterSub.SuspendLayout();

            Speed.Text        = EncycloRes.None;      //Constants.GetSpeed( eq.Speed );
            Range.Text        = Constants.GetRange(eq.Range);
            Rarity.Text       = Constants.GetEquipmentRarity(eq.Rarity);
            Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + Constants.GetEquipmentRarityID(eq.Rarity);                         //checkme

            TableParameterSub.ResumeLayout();


            //default equipment
            DefaultSlots.BeginUpdate();
            DefaultSlots.Items.Clear();
            foreach (var ship in KCDatabase.Instance.MasterShips.Values)
            {
                if (ship.DefaultSlot != null && ship.DefaultSlot.Contains(equipmentID))
                {
                    DefaultSlots.Items.Add(ship);
                }
            }
            DefaultSlots.EndUpdate();


            Description.Text = eq.Message;


            //arsenal
            TableArsenal.SuspendLayout();

            MaterialFuel.Text    = eq.Material[0].ToString();
            MaterialAmmo.Text    = eq.Material[1].ToString();
            MaterialSteel.Text   = eq.Material[2].ToString();
            MaterialBauxite.Text = eq.Material[3].ToString();

            TableArsenal.ResumeLayout();



            //装備画像を読み込んでみる
            {
                string path = string.Format(@"{0}\\resources\\image\\slotitem\\card\\{1:D3}.png", Utility.Configuration.Config.Connection.SaveDataPath, equipmentID);
                if (File.Exists(path))
                {
                    try {
                        EquipmentImage.Image = new Bitmap(path);
                    } catch (Exception) {
                        if (EquipmentImage.Image != null)
                        {
                            EquipmentImage.Image.Dispose();
                        }
                        EquipmentImage.Image = null;
                    }
                }
                else
                {
                    if (EquipmentImage.Image != null)
                    {
                        EquipmentImage.Image.Dispose();
                    }
                    EquipmentImage.Image = null;
                }
            }


            BasePanelEquipment.ResumeLayout();
            BasePanelEquipment.Visible = true;


            this.Text = EncycloRes.EquipmentEncyclopedia + " - " + eq.Name;
        }