private void NationTree_AfterSelect(object sender, TreeViewEventArgs e) { if (this.m_bExpress) { if (this.m_Tick >= 3) { MessageBox.Show("试用用户只能查看3次信息", "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand); return; } this.m_Tick++; } if (e.Node is NationTreeNode) { if (this.m_Tab.TabPages.Count == 3) { this.m_Tab.TabPages.Remove(this.m_PageArmy); this.m_Tab.TabPages.Remove(this.m_PageManor); } GNation nation = (e.Node as NationTreeNode).Nation; string str = string.Format("国家名称:{0}\r\n内部公告:{1}\r\n对外公告:{2}\r\n城池数:{3}", new object[] { nation.NationName, nation.NationBulletinInside, nation.NationBulletinOutside, nation.NationCityAmount }); this.m_CityInfo.Text = str; } else if (e.Node is CityTreeNode) { if (this.m_Tab.TabPages.Count == 1) { this.m_Tab.TabPages.Add(this.m_PageArmy); this.m_Tab.TabPages.Add(this.m_PageManor); } this.m_Tab.SelectedTab = this.m_PageInfo; this.m_User.UpdateCity((e.Node as CityTreeNode).City, false); } }
public NationTreeNode(GNation Nation) { this.m_Nation = Nation; base.Text = this.m_Nation.NationName; }