예제 #1
0
        private void lblBedroom_Click(object sender, EventArgs e)
        {
            BedroomForm bForm = new BedroomForm();
            bForm.StartPosition = FormStartPosition.Manual;    //设置窗体第一次出现的位置
            bForm.Location = new Point(this.Location.X, this.Location.Y);   //设置窗体出现的坐标
            bForm.Show();

            close = true;       //允许关闭本窗体
            this.Close();
        }
예제 #2
0
        private void lblBedroom_Click(object sender, EventArgs e)
        {
            BedroomForm bForm = new BedroomForm();

            bForm.StartPosition = FormStartPosition.Manual;                    //设置窗体第一次出现的位置
            bForm.Location      = new Point(this.Location.X, this.Location.Y); //设置窗体出现的坐标
            bForm.Show();

            close = true;       //允许关闭本窗体
            this.Close();
        }
예제 #3
0
        //“听天由命”按钮
        private void lblAuto_Click(object sender, EventArgs e)
        {
            //调用英雄初始化属性方法(请编码实现)
            GameManager.GameInfo.Hero.Create();
            BedroomForm bForm = new BedroomForm();
            bForm.StartPosition = FormStartPosition.Manual;    //设置窗体第一次出现的位置
            bForm.Location = new Point(this.Location.X, this.Location.Y);   //设置窗体出现的坐标
            bForm.Show();

            close = true;       //允许关闭本窗体
            this.Close();
        }
예제 #4
0
        //“听天由命”按钮
        private void lblAuto_Click(object sender, EventArgs e)
        {
            //调用英雄初始化属性方法(请编码实现)
            GameManager.GameInfo.Hero.Create();
            BedroomForm bForm = new BedroomForm();

            bForm.StartPosition = FormStartPosition.Manual;                    //设置窗体第一次出现的位置
            bForm.Location      = new Point(this.Location.X, this.Location.Y); //设置窗体出现的坐标
            bForm.Show();

            close = true;       //允许关闭本窗体
            this.Close();
        }
예제 #5
0
파일: MainForm.cs 프로젝트: Rainy99/ITHero
 /// <summary>
 /// 读档(请编码实现)
 /// </summary>
 private void lblLoad_Click(object sender, EventArgs e)
 {
     //获取当前应用程序下的data文件夹
     ofDlg.InitialDirectory = Application.StartupPath + @"\data\";
     DialogResult result = ofDlg.ShowDialog();
     if(result == DialogResult.OK)
     {
         //读取玩家存档信息
         GameManager.Load(ofDlg.FileName);
         //跳转到寝室
         BedroomForm bForm = new BedroomForm();
         bForm.StartPosition = FormStartPosition.Manual;
         bForm.Location = new Point(this.Location.X, this.Location.Y);
         bForm.Show();
     }
 }
예제 #6
0
파일: MainForm.cs 프로젝트: Rainy99/ITHero
        /// <summary>
        /// 读档(请编码实现)
        /// </summary>
        private void lblLoad_Click(object sender, EventArgs e)
        {
            //获取当前应用程序下的data文件夹
            ofDlg.InitialDirectory = Application.StartupPath + @"\data\";
            DialogResult result = ofDlg.ShowDialog();

            if (result == DialogResult.OK)
            {
                //读取玩家存档信息
                GameManager.Load(ofDlg.FileName);
                //跳转到寝室
                BedroomForm bForm = new BedroomForm();
                bForm.StartPosition = FormStartPosition.Manual;
                bForm.Location      = new Point(this.Location.X, this.Location.Y);
                bForm.Show();
            }
        }