Example #1
0
 /// <summary>
 /// HumanList单例模式
 /// </summary>
 /// <returns></returns>
 public static HumanList CreateInstrance()
 {
     if (frm == null || frm.IsDisposed)
     {
         frm = new HumanList();
     }
     return(frm);
 }
Example #2
0
        /// <summary>
        /// 弟子按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (currentSect == null)
            {
                return;
            }
            HumanList humanList = HumanList.CreateInstrance();

            humanList.ShowHumanList(Globle.AllHumansList.FindAll(obj => obj.Sect == currentSect));
            humanList.Show();
        }
Example #3
0
        /// <summary>
        /// 打开任务窗口按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            HumanList humanList = HumanList.CreateInstrance();

            humanList.ShowHumanList(Globle.AllHumansList.FindAll(o => o.SetPlace == p));
            humanList.Show();
            //if (Globle.AllHumansList.FindAll(o => o.SetPlace == p).FindAll(o => o.Mission == null).Count > 0)
            //{
            //    Globle.CurrentSect = p.Sect;//确定当前选择的门派
            //    MissionSelectForm missionForm = MissionSelectForm.CreateInstrance();
            //    missionForm.ShowMissionButton(p.Sect, p, null);
            //    missionForm.Show();
            //}
            //else
            //{
            //    MessageBox.Show("该地区没有无任务弟子!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            //}
        }