private void button1_Click(object sender, EventArgs e)
        {
            Add();
        }
        public void Add()
        {
            X_学科名称 x_学科名称 = new X_学科名称();
            x_学科名称.ShowDialog();
            LoadData();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex >= 0)
            {
                BL_数据管理.Delete_学科(Convert.ToInt32(dt.Rows[listBox1.SelectedIndex]["ID"].ToString()));
                LoadData();
            }}}}
5.2.4试题录入菜单
    这个功能主要在试题菜单里实现功能。试题录入功能只有系统管理员和试题录入者可以使用。其中用到的控件相对来说就比较多了。包括选择题型、难易度、知识点的ComboBox,输入题目、答案的TextBox,选择题答案的Optionbutton和Check,以及常用的命令按钮。
     本系统为单科目版(计算机网络),其题型包括填空题、选择题、简答题、判断题、名词解释题。为每道题都有属于自己的难点和知识点以及相应的答案。具体界面如下图。
 
图5-4 试题录入界面
主要实现代码实现如下(选择题):
namespace 题库管理系统
{
    public partial class X_选择题 : UserControl
    {
        public X_选择题()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "Png文件(*.png)|*.png|Jpeg文件(*.jpeg)|*.jpeg|所有文件(*.*)|*.* ";
            openFileDialog.Title = "选择图片";
            string filePath = string.Empty;
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                filePath = openFileDialog.FileName;
                System.Drawing.Image bg = System.Drawing.Image.FromFile(filePath);
                pictureBox1.Image = bg;
            }
		
- 上一篇:C#高职计算机导论考试系统设计与实现 
 
- 下一篇:VB设备管理系统设计+需求分析+可行性分析 
 
		
	
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
 
电站锅炉暖风器设计任务书
 
乳业同业并购式全产业链...
 
当代大学生慈善意识研究+文献综述
 
中考体育项目与体育教学合理结合的研究
 
十二层带中心支撑钢结构...
 
河岸冲刷和泥沙淤积的监测国内外研究现状
 
大众媒体对公共政策制定的影响
 
酸性水汽提装置总汽提塔设计+CAD图纸
 
杂拟谷盗体内共生菌沃尔...
 
java+mysql车辆管理系统的设计+源代码