亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mainform.cs

?? 集學生管理系統、學生選課系統、老師管理系統與一身 不錯的
?? CS
?? 第 1 頁 / 共 2 頁
字號:
// MainForm.cs - Chapter 16 version.

// Copyright 2004 by Jacquie Barker and Grant Palmer - all rights reserved.

// A GUI class.

using System;
using System.Collections;
using System.Windows.Forms;
using System.Drawing;

public class MainForm : Form {

  private Button dropButton, saveButton;
  private Button addButton, logOffButton;
  private TextBox ssnTextBox, nameTextBox, totalTextBox; 
  private ListBox scheduleListBox, registeredListBox; 
  private Label classScheduleLabel, ssnLabel;
  private Label nameLabel, totalCourseLabel;
  private Label registeredLabel;
  private PasswordForm passwordDialog;

  // Maintain a handle on the Student who is logged in.
  // (Whenever this is set to null, nobody is officially logged on.)
  private Student currentUser;

  public MainForm() {

    currentUser = null;

    // Create left-hand side labels
    int labelVertSpace = 40;
    int labelLeft = 5;

    ssnLabel = new Label();
    ssnLabel.Text = "SSN:";
    ssnLabel.Font = new Font(ssnLabel.Font, FontStyle.Bold);
    ssnLabel.AutoSize = true;
    ssnLabel.Top = 5;
    ssnLabel.Left = labelLeft;

    nameLabel = new Label();
    nameLabel.Text = "Name:";
    nameLabel.Font = new Font(nameLabel.Font, FontStyle.Bold);
    nameLabel.AutoSize = true;
    nameLabel.Top = ssnLabel.Top + labelVertSpace;
    nameLabel.Left = labelLeft;

    totalCourseLabel = new Label();
    totalCourseLabel.Text = "Total Courses:";
    totalCourseLabel.Font = new Font(totalCourseLabel.Font, FontStyle.Bold);
    totalCourseLabel.AutoSize = true;
    totalCourseLabel.Top = nameLabel.Top + labelVertSpace;
    totalCourseLabel.Left = labelLeft;

    registeredLabel = new Label();
    registeredLabel.Text = "Registered For:";
    registeredLabel.Font = new Font(registeredLabel.Font, FontStyle.Bold);
    registeredLabel.AutoSize = true;
    registeredLabel.Top = totalCourseLabel.Top + labelVertSpace;
    registeredLabel.Left = labelLeft;

    // Create TextBox components
    ssnTextBox = new TextBox();
    ssnTextBox.Width = 140;
    ssnTextBox.AutoSize = true;
    ssnTextBox.Top = ssnLabel.Top;
    ssnTextBox.Left = totalCourseLabel.Right + 15;

    // Assign an event handler to the SSN TextBox
    ssnTextBox.KeyUp += new KeyEventHandler(SsnTextBoxKeyUp);

    nameTextBox = new TextBox();
    nameTextBox.Width = 140;
    nameTextBox.AutoSize = true;
    nameTextBox.Top = nameLabel.Top;
    nameTextBox.Left = totalCourseLabel.Right + 15;
    nameTextBox.ReadOnly = true;

    totalTextBox = new TextBox();
    totalTextBox.Width = 20;
    totalTextBox.AutoSize = true;  
    totalTextBox.Top = totalCourseLabel.Top;
    totalTextBox.Left = totalCourseLabel.Right + 15;
    totalTextBox.ReadOnly = true;

    // Create right-hand side labels
    classScheduleLabel = new Label();
    classScheduleLabel.Text = "--- Schedule of Classes ---";
    classScheduleLabel.Font = new Font(classScheduleLabel.Font, FontStyle.Bold);
    classScheduleLabel.AutoSize = true;
    classScheduleLabel.Top = 5;
    classScheduleLabel.Left = ssnTextBox.Right + 55;

    // Create "Schedule of Classes" ListBox Component
    scheduleListBox = new ListBox();
    scheduleListBox.Width = 210;
    scheduleListBox.Height = 225;
    scheduleListBox.Top = classScheduleLabel.Bottom + 5;
    scheduleListBox.Left = ssnTextBox.Right + 30;

    // Display an alphabetically sorted course catalog list
    // in the scheduleListBox component.
    ArrayList sortedSections = SRS.scheduleOfClasses.GetSortedSections();
    for(int i = 0; i < sortedSections.Count; ++i) {
      scheduleListBox.Items.Add(sortedSections[i]);
    }

    // Create "Registered For" ListBox Component
    registeredListBox = new ListBox();
    registeredListBox.Width = 210;
    registeredListBox.Top = registeredLabel.Bottom + 5;
    registeredListBox.Height = scheduleListBox.Bottom - registeredListBox.Top + 3;
    registeredListBox.Left = labelLeft;

    // Add event handlers to the ListBox components
    scheduleListBox.SelectedIndexChanged += 
                new EventHandler(ScheduleSelectionChanged);
    registeredListBox.SelectedIndexChanged += 
                new EventHandler(RegisteredSelectionChanged);

    // Create buttons
    int buttonHeight = 50;
    int buttonWidth = 80;
    int buttonTop = 260;

    dropButton = new Button(); 
    dropButton.Text = "Drop";
    dropButton.Height = buttonHeight;
    dropButton.Width = buttonWidth;
    dropButton.Top = buttonTop;
    dropButton.Left = 10;

    saveButton = new Button(); 
    saveButton.Text = "Save My Schedule";
    saveButton.Height = buttonHeight;
    saveButton.Width = buttonWidth;
    saveButton.Top = buttonTop;
    saveButton.Left = dropButton.Right + 5;

    addButton = new Button(); 
    addButton.Text = "Add";
    addButton.Height = buttonHeight;
    addButton.Width = buttonWidth;
    addButton.Top = buttonTop;
    addButton.Left = saveButton.Right + 100;

    logOffButton = new Button(); 
    logOffButton.Text = "Log Off";
    logOffButton.Height = buttonHeight;
    logOffButton.Width = buttonWidth;
    logOffButton.Top = buttonTop;
    logOffButton.Left = addButton.Right + 5;

    // Assign event handlers to the Buttons
    addButton.Click += new EventHandler(AddButtonClicked);
    dropButton.Click += new EventHandler(DropButtonClicked);
    saveButton.Click += new EventHandler(SaveButtonClicked);
    logOffButton.Click += new EventHandler(LogOffButtonClicked);

    // Initialize the buttons to their proper enabled/disabled
    // state.
    ResetButtons();

    // Add the GUI components to the form
    this.Controls.Add(dropButton);
    this.Controls.Add(saveButton);
    this.Controls.Add(addButton);
    this.Controls.Add(logOffButton);
    this.Controls.Add(classScheduleLabel);
    this.Controls.Add(ssnLabel);
    this.Controls.Add(ssnTextBox);
    this.Controls.Add(nameLabel);
    this.Controls.Add(nameTextBox);
    this.Controls.Add(totalCourseLabel);
    this.Controls.Add(totalTextBox);
    this.Controls.Add(registeredLabel);
    this.Controls.Add(scheduleListBox);
    this.Controls.Add(registeredListBox);

    // Set some appearance properties for the Form
    this.Text = "Student Registration System";
    this.Height = 350;
    this.Width = 500;
    this.MinimumSize = this.Size;
    this.StartPosition = FormStartPosition.CenterScreen;
    this.Visible = true;
  }

  // event handling method for the "Drop" Button
  public void DropButtonClicked(object source, EventArgs e) {
    // Determine which section is selected (note that we must
    // cast it, as it is returned as an Object reference).
    Section selected = (Section)registeredListBox.SelectedItem;

    // Drop the course.
    selected.Drop(currentUser);

    // Display a confirmation message.
    string message = "Course " + 
       selected.RepresentedCourse.CourseNo + " dropped.";
    MessageBox.Show(message, "Request Successful",
            MessageBoxButtons.OK, MessageBoxIcon.Information);

    // Update the list of sections that 
    // this student is registered for.
    registeredListBox.Items.Clear();
    IEnumerator ie = currentUser.GetEnrolledSections();
    while ( ie.MoveNext() ) {
      registeredListBox.Items.Add((Section)ie.Current);
    }

    // Update the field representing student's course total.
    totalTextBox.Text = "" + currentUser.GetCourseTotal();

    // Check states of the various buttons.
    ResetButtons();
  }

  // event handling method for the "Save" Button
  public void SaveButtonClicked(object source, EventArgs e) {
    bool success = currentUser.Persist();
    if (success) {
      // Let the user know that his/her
      // schedule was successfully saved.
      MessageBox.Show("Schedule saved", "Schedule Saved",
            MessageBoxButtons.OK, MessageBoxIcon.Information);
    }
    else {
      // Let the user know that there was a problem.
      string message = "Problem saving your " +
                       "schedule; please contact " +
                       "SRS Support Staff for assistance.";
      MessageBox.Show(message, "Problem Saving Schedule",
               MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }
  }

  // event handling method for the "Add" Button
  public void AddButtonClicked(object source, EventArgs e) {
    // Determine which section is selected (note that we must
    // cast it, as it is returned as an Object reference).
    Section selected = (Section)scheduleListBox.SelectedItem;

    // Attempt to enroll the student in the section, noting
    // the status code that is returned.
    int status = selected.Enroll(currentUser);

    // Report the status to the user.
    if (status == Section.SECTION_FULL) {
      MessageBox.Show("Sorry - that section is full.", "Request Denied",
               MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }
    else {
      if (status == Section.PREREQ_NOT_SATISFIED) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩综合在线免费观看| 亚洲一区免费视频| 一区二区免费看| 色婷婷激情久久| 亚洲成人激情社区| 欧美一区二区三区在线看| 日韩精品一二三| 久久天天做天天爱综合色| 国产一区二区三区久久悠悠色av| 欧美mv日韩mv国产网站| 国产精品一区二区久久精品爱涩| 国产欧美va欧美不卡在线| 不卡的av电影在线观看| 一区二区欧美精品| 91精品国产色综合久久不卡电影 | 91超碰这里只有精品国产| 麻豆成人久久精品二区三区小说| 2017欧美狠狠色| 色综合中文字幕国产 | 精品视频全国免费看| 麻豆成人久久精品二区三区红 | 欧美一区二区精品久久911| 国产伦精品一区二区三区视频青涩| 日本一区二区三区免费乱视频| caoporn国产精品| 日韩精品亚洲专区| 国产精品拍天天在线| 欧美日韩中文字幕一区二区| 激情综合色综合久久| 樱桃视频在线观看一区| 日韩欧美久久一区| 91在线一区二区三区| 日韩和欧美的一区| 国产精品日韩成人| 这里只有精品视频在线观看| jiyouzz国产精品久久| 日本午夜一本久久久综合| 久久久久久**毛片大全| 欧美视频一二三区| eeuss国产一区二区三区| 美国十次了思思久久精品导航| 亚洲欧洲国产日韩| 精品美女在线观看| 欧美日韩中文另类| 成人av综合一区| 国产尤物一区二区在线| 亚洲成人自拍网| 亚洲理论在线观看| 国产女主播视频一区二区| 欧美一区二区在线看| 色素色在线综合| 高清shemale亚洲人妖| 热久久一区二区| 亚洲在线视频免费观看| 欧美成人女星排行榜| 欧美日本免费一区二区三区| 色综合天天综合网天天看片| 粉嫩av一区二区三区在线播放 | 久99久精品视频免费观看| 亚洲观看高清完整版在线观看 | 91视频在线观看免费| 国产一区二区在线看| 日本欧美肥老太交大片| 午夜欧美在线一二页| 亚洲制服丝袜av| 一区av在线播放| 亚洲欧洲日韩一区二区三区| 中文字幕乱码日本亚洲一区二区| 日韩美女视频在线| 日韩欧美一区电影| 日韩一级高清毛片| 日韩三级在线免费观看| 制服.丝袜.亚洲.中文.综合| 欧美肥胖老妇做爰| 欧美日韩精品一区二区三区蜜桃 | 久久欧美一区二区| 欧美xxxx在线观看| 国产精品美女久久福利网站| 精品免费视频.| 久久久久成人黄色影片| 欧美国产日本视频| 国产精品久久一级| 国产精品电影院| 一区二区欧美视频| 性欧美疯狂xxxxbbbb| 日韩精品国产欧美| 视频一区在线视频| 蜜桃传媒麻豆第一区在线观看| 亚洲自拍偷拍九九九| 无码av免费一区二区三区试看| 久久久精品国产免费观看同学| 久久久综合网站| 亚洲精品在线三区| 久久久久国产精品麻豆ai换脸| 宅男在线国产精品| 67194成人在线观看| 久久先锋影音av| 精品电影一区二区三区| 国产欧美综合在线观看第十页| 中文字幕免费观看一区| 中文字幕在线不卡视频| 亚洲视频精选在线| 国产欧美精品区一区二区三区| 国产嫩草影院久久久久| 中文字幕av一区二区三区免费看| 亚洲男人电影天堂| 午夜激情一区二区三区| 日本三级韩国三级欧美三级| 六月婷婷色综合| 国产一区欧美一区| 91麻豆国产福利在线观看| 在线一区二区三区做爰视频网站| 91麻豆精品国产91久久久久久久久 | 在线观看成人小视频| 欧美剧情片在线观看| 精品日韩av一区二区| 国产亚洲欧美在线| 亚洲精品日韩一| 美日韩一区二区| 一本到三区不卡视频| 欧美精品精品一区| 国产精品久久久久久久久久免费看| 一区二区三区欧美在线观看| 激情五月婷婷综合网| 不卡免费追剧大全电视剧网站| 91精品国产91综合久久蜜臀| 精品国偷自产国产一区| 亚洲人妖av一区二区| 国产精品丝袜一区| 日韩高清不卡一区二区| 亚洲成人动漫在线观看| www.亚洲精品| 777久久久精品| 成人欧美一区二区三区黑人麻豆 | 日韩av在线播放中文字幕| 成人免费毛片app| 欧美日韩成人一区| 一区二区三区在线高清| 久久99国产精品久久99| 欧美日韩在线播放一区| 国产亚洲综合在线| 喷白浆一区二区| 91网站黄www| 欧美国产乱子伦| 亚洲一区二区在线免费看| 精品一区二区三区免费| 在线一区二区观看| 国产欧美日韩在线视频| 午夜婷婷国产麻豆精品| 成人动漫av在线| 精品国内片67194| 国产精品久久久久久久久免费丝袜 | 全国精品久久少妇| 色国产精品一区在线观看| 国产精品视频一二三区| 国产精品白丝jk白祙喷水网站 | 久久99精品久久久久久久久久久久| 成人a级免费电影| 中文字幕欧美三区| 东方aⅴ免费观看久久av| 日韩欧美国产三级电影视频| 午夜av一区二区| 日本道色综合久久| 亚洲精品国产一区二区精华液| 国产在线视频一区二区| 亚洲精品在线电影| 青青草国产精品97视觉盛宴| 91麻豆精品国产91久久久久| 亚洲欧美综合在线精品| 国产成人夜色高潮福利影视| 日韩三级视频在线观看| 亚洲色图20p| 欧美日韩一卡二卡| 亚洲sss视频在线视频| 欧美在线|欧美| 洋洋成人永久网站入口| 欧美视频一区二区三区四区 | 欧美在线看片a免费观看| 亚洲欧美乱综合| 欧美日本视频在线| 日韩中文字幕1| 91精品国产入口| 麻豆成人久久精品二区三区红 | 久久久久久久久久美女| 韩国理伦片一区二区三区在线播放| 日韩欧美一区中文| 欧美a一区二区| 日韩精品一区二区在线| 蜜桃av一区二区在线观看 | 国产欧美日韩亚州综合| 国产精品白丝jk白祙喷水网站| 国产亲近乱来精品视频| 成人ar影院免费观看视频| 337p粉嫩大胆色噜噜噜噜亚洲| 天天操天天干天天综合网| 欧美mv日韩mv国产网站app| 国产一区二区三区不卡在线观看| 色菇凉天天综合网| 精品一区二区三区不卡| 国产天堂亚洲国产碰碰|