public override void OnShow(object msg) { base.OnShow(msg); MsgOpenProduce msgOpenProduce = (MsgOpenProduce)msg; m_CurrentType = msgOpenProduce.CurrentProduceType; }
/// <summary> /// 填充数据(标题和类型) /// </summary> public void SetData() { ProduceDialogBasePanel produceDialogBasePanel = OwnerView as ProduceDialogBasePanel; if (produceDialogBasePanel != null) { switch (produceDialogBasePanel.CurrentProduceType) { case ProduceType.HeavyWeapon: m_ToggleCount = 4; m_TitleDescribes = new string[] { "production_text_1001", "production_text_1002", "production_text_1003", "production_text_1015" }; m_TypeNames = new string[] { "production_title_1006", "production_title_1007", "production_title_1008", "production_title_1020" }; m_ImageIcons = new int[] { 40106, 40107, 40108, 40104 }; m_ImageBaseIcons = new int[] { 40109, 40109, 40109, 40105 }; m_CurrentProduceType = ProduceType.HeavyWeapon; break; case ProduceType.Reformer: m_ToggleCount = 4; m_TitleDescribes = new string[] { "production_text_1010", "production_text_1011", "production_text_1012", "production_text_1015" }; m_TypeNames = new string[] { "production_title_1015", "production_title_1016", "production_title_1017", "production_title_1020" }; m_ImageIcons = new int[] { 40100, 40101, 40102, 40104 }; m_ImageBaseIcons = new int[] { 40103, 40103, 40103, 40105 }; m_CurrentProduceType = ProduceType.Reformer; break; case ProduceType.Chip: m_ToggleCount = 3; m_TitleDescribes = new string[] { "production_text_1013", "production_text_1014", "production_text_1015" }; m_TypeNames = new string[] { "production_title_1018", "production_title_1019", "production_title_1020" }; m_ImageIcons = new int[] { 40110, 40111, 40104 }; m_ImageBaseIcons = new int[] { 40113, 40113, 40105 }; m_CurrentProduceType = ProduceType.Chip; break; case ProduceType.Device: m_ToggleCount = 4; m_TitleDescribes = new string[] { "production_text_1007", "production_text_1008", "production_text_1009", "production_text_1015" }; m_TypeNames = new string[] { "production_title_1012", "production_title_1013", "production_title_1014", "production_title_1020" }; m_ImageIcons = new int[] { 40114, 40115, 40116, 40104 }; m_ImageBaseIcons = new int[] { 40117, 40117, 40117, 40105 }; m_CurrentProduceType = ProduceType.Device; break; case ProduceType.Ship: m_ToggleCount = 4; m_TitleDescribes = new string[] { "production_text_1042", "production_text_1043", "production_text_1044", "production_text_1015" }; m_TypeNames = new string[] { "production_title_1062", "production_title_1063", "production_title_1064", "production_title_1020" }; m_ImageIcons = new int[] { 40118, 40119, 40120, 40104 }; m_ImageBaseIcons = new int[] { 40121, 40121, 40121, 40105 }; m_CurrentProduceType = ProduceType.Ship; break; default: break; } } }