frmteachername.cs

来自「实现课程表编排和打印功能,通过在候选列表中选择课程和教师(没有被排课且该教师教授」· CS 代码 · 共 43 行

CS
43
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 课程安排
{
    public partial class frmTeacherName : Form
    {
        private string teacherName = "";
        public string TeacherName
        {
            get { return teacherName; }
        }

        public frmTeacherName()
        {
            InitializeComponent();
        }

        public frmTeacherName(string oldName)
        {
            InitializeComponent();
            this.textBox1.Text = oldName;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.teacherName = this.textBox1.Text;
            this.DialogResult = DialogResult.Yes;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.No;
            this.Close();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?