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

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

?? mainform.cs

?? 集學生管理系統、學生選課系統、老師管理系統與一身 不錯的
?? CS
?? 第 1 頁 / 共 2 頁
字號:
        string message = "You haven't satisfied all " +
                  "of the prerequisites for this course.";
        MessageBox.Show(message, "Request Denied",
               MessageBoxButtons.OK, MessageBoxIcon.Warning);
      }
      else {
        if (status == Section.PREVIOUSLY_ENROLLED) {
          string message = "You are enrolled in or have successfully " +
                    "completed a section of this course.";
          MessageBox.Show(message, "Request Denied",
               MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
        else {  // success!
          string message = "Seat confirmed in " +
             selected.RepresentedCourse.CourseNo + ".";
          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();

          // Clear the selection in the schedule of classes list.
          scheduleListBox.SelectedItem = null;
        }
      }
    }

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

  // event handling method for "Log Off" Button
  public void LogOffButtonClicked(object source, EventArgs e) {
    ClearFields();
    ssnTextBox.Text = "";
    currentUser = null;

    // Clear the selection in the
    // schedule of classes list.
    scheduleListBox.SelectedItem = null;

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

  }

  // event handling method for the "Schedule of Classes" ListBox
  public void ScheduleSelectionChanged(object source, EventArgs e) {
    // When an item is selected in this list,
    // we clear the selection in the other list.
    if (scheduleListBox.SelectedItem != null)  {
      registeredListBox.SelectedItem = null;
    }

    // reset the enabled state of the buttons
    ResetButtons();
  }

  // event handling method for the "Registered For:" ListBox
  public void RegisteredSelectionChanged(object source, EventArgs e) {
    // When an item is selected in this list,
    // we clear the selection in the other list.
    if (registeredListBox.SelectedItem != null)  {
      scheduleListBox.SelectedItem = null;
    }

    // reset the enabled state of the buttons
    ResetButtons();
  }

  // event handling method for the ssn TextBox
  public void SsnTextBoxKeyUp(object source, KeyEventArgs e) {
    // We only want to act if the Enter key is pressed
    if ( e.KeyCode == Keys.Enter ) {
  
      // First, clear the fields reflecting the
      // previous student's information.
      ClearFields();

      // We'll try to construct a Student based on
      // the ssn we read, and if a file containing
      // Student's information cannot be found,
      // we have a problem.

      currentUser = new Student(ssnTextBox.Text);

      // Test to see if the Student fields were properly
      // initialized. If not, reset currentUser to null
      // and display a message box

      if (!currentUser.StudentSuccessfullyInitialized()) {
        // Drat!  The ID was invalid.
        currentUser = null;

        // Let the user know that login failed,
        string message = "Invalid student ID; please try again.";
        MessageBox.Show(message, "Invalid Student ID",
                 MessageBoxButtons.OK, MessageBoxIcon.Warning);
      }
      else {
        // Hooray!  We found one!  Now, we need
        // to request and validate the password.
        passwordDialog = new PasswordForm();
        passwordDialog.ShowDialog(this);

        string password = passwordDialog.Password;
        passwordDialog.Dispose();

        if (currentUser.ValidatePassword(password)) {
          // Let the user know that the
          // login succeeded.
          string message = 
               "Log in succeeded for " + currentUser.Name + ".";
          MessageBox.Show(message, "Log In Succeeded",
                 MessageBoxButtons.OK, MessageBoxIcon.Information);

          // Load the data for the current user into the TextBox and
          // ListBox components.
          SetFields(currentUser);
        }
        else {
          // The ssn was okay, but the password validation failed;
          // notify the user of this.
          string message = "Invalid password; please try again.";
          MessageBox.Show(message, "Invalid Password",
                 MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
      }
      // Check states of the various buttons.
      ResetButtons();
    }
  }

  // These are private housekeeping methods

  // Because there are so many different situations in which one or
  // more buttons need to be (de)activated, and because the logic is
  // so complex, we centralize it here and then just call this method
  // whenever we need to check the state of one or more of the buttons.  
  // It is a tradeoff of code elegance for execution efficiency:  
  // we are doing a bit more work each time (because we don't need to 
  // reset all four buttons every time), but since the execution time
  // is minimal, this seems like a reasonable tradeoff.
  private void ResetButtons() {
    // There are four conditions which collectively govern the
    // state of each button:
    //	
    // o  Whether a user is logged on or not.
    bool isLoggedOn;
    if (currentUser != null) {
      isLoggedOn = true;
    }
    else {
      isLoggedOn = false;
    }
		
    // o   Whether the user is registered for at least one course.
    bool atLeastOne;
    if (currentUser != null && currentUser.GetCourseTotal() > 0) {
      atLeastOne = true;
    }
    else {
      atLeastOne = false;
    }


    // o   Whether a registered course has been selected.
    bool courseSelected;
    if (registeredListBox.SelectedItem == null) {
      courseSelected = false;
    }
    else {
      courseSelected = true;
    }
		
    // o   Whether an item is selected in the Schedule of Classes.
    bool catalogSelected;
    if (scheduleListBox.SelectedItem == null)  {
      catalogSelected = false;
    }
    else {
      catalogSelected = true;
    }

    // Now, verify the conditions on a button-by-button basis.

    // Drop button:
    if (isLoggedOn && atLeastOne && courseSelected) {
      dropButton.Enabled = true;
    }
    else {
      dropButton.Enabled = false;
    }

    // Add button:
    if (isLoggedOn && catalogSelected) {
      addButton.Enabled = true;
    }
    else {
      addButton.Enabled = false;
    }

    // Save My Schedule button:
    if (isLoggedOn) {
      saveButton.Enabled = true;
    }
    else {
      saveButton.Enabled = false;
    }

    // Log Off button:
    if (isLoggedOn) {
      logOffButton.Enabled = true;  
    }
    else {
      logOffButton.Enabled = false;  
    }
  }

  // Called whenever a user is logged off.
  private void ClearFields() {
    nameTextBox.Text = "";
    totalTextBox.Text = "";
    registeredListBox.Items.Clear();
  }

  // Set the various fields, lists, etc. to reflect the information
  // associated with a particular student.  (Used when logging in.)
  private void SetFields(Student theStudent) {
    nameTextBox.Text = theStudent.Name;
    int total = theStudent.GetCourseTotal();
    totalTextBox.Text = ""+total;

    // If the student is registered for any courses, list these, too.
    if (total > 0) {
      // Use the GetEnrolledSections() method to obtain a list
      // of the sections that the student is registered for and
      // add the sections to the registered ListBox

      IEnumerator e = theStudent.GetEnrolledSections();
      while ( e.MoveNext() ) {
        registeredListBox.Items.Add((Section)e.Current);
      }
    }
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2020日本不卡一区二区视频| 在线中文字幕不卡| 蜜桃在线一区二区三区| 亚洲成人动漫在线免费观看| 亚洲乱码国产乱码精品精的特点| 国产精品网友自拍| 亚洲欧美色一区| 一区二区三区 在线观看视频| 亚洲欧美另类图片小说| 一区二区三区四区亚洲| 亚洲一二三区不卡| 亚洲成人你懂的| 免费av网站大全久久| 精品一区二区三区久久| 国产在线一区观看| 99久久精品国产观看| 欧洲精品视频在线观看| 91精品在线免费观看| 欧美电视剧免费观看| 精品不卡在线视频| 国产精品三级av| 亚洲最快最全在线视频| 青青草成人在线观看| 国产精品影视天天线| 成人高清视频在线观看| 91极品视觉盛宴| 这里只有精品免费| 欧美激情综合五月色丁香小说| 国产精品电影院| 性欧美疯狂xxxxbbbb| 国产一区福利在线| 欧美亚洲图片小说| 精品国产乱码久久| 亚洲日本va午夜在线影院| 亚洲福利一二三区| 国产99久久久国产精品免费看| 一本大道av伊人久久综合| 欧美一级搡bbbb搡bbbb| 国产精品视频线看| 日韩vs国产vs欧美| 国产传媒日韩欧美成人| 欧美三级电影精品| 国产日韩精品一区二区三区| 亚洲高清中文字幕| 国产成人午夜99999| 欧美日韩一区二区三区在线| 亚洲精品在线观看网站| 一区二区三区精品视频在线| 久久电影网站中文字幕| 在线精品视频免费观看| 欧美一区日本一区韩国一区| 国产精品久久久久久户外露出| 人妖欧美一区二区| 91欧美一区二区| 国产欧美日韩另类一区| 日本不卡一区二区三区| 91香蕉视频黄| 久久久久88色偷偷免费| 日韩av中文字幕一区二区三区| 本田岬高潮一区二区三区| 26uuu亚洲综合色| 日本欧美一区二区| 欧美色图片你懂的| 专区另类欧美日韩| 播五月开心婷婷综合| 精品久久国产老人久久综合| 手机精品视频在线观看| 91久久精品国产91性色tv| 日韩美女视频一区| 99久久免费视频.com| 亚洲国产精品二十页| 狠狠色丁香久久婷婷综合_中| 欧美日高清视频| 亚洲美女屁股眼交| 91浏览器打开| 日韩毛片精品高清免费| 99久久国产综合色|国产精品| 国产三级一区二区三区| 国精品**一区二区三区在线蜜桃| 精品国精品国产尤物美女| 久久99国产精品麻豆| 日韩欧美成人午夜| 精品在线亚洲视频| 久久夜色精品国产欧美乱极品| 久久97超碰色| 久久亚洲精精品中文字幕早川悠里| 精品一区二区在线看| 久久一二三国产| 成人一区二区三区视频| 国产精品乱人伦中文| 91麻豆国产在线观看| 亚洲欧美成人一区二区三区| 欧美少妇bbb| 日本成人在线一区| 久久精品综合网| 91啦中文在线观看| 亚洲成人免费电影| 精品成人a区在线观看| 国产成人免费高清| 亚洲韩国精品一区| 欧美一区二区在线观看| 国产一级精品在线| 中文字幕制服丝袜成人av| 在线欧美日韩国产| 日本成人在线看| 国产精品网站一区| 欧美精品在线视频| 国产电影精品久久禁18| 亚洲欧美日韩在线播放| 91麻豆精品久久久久蜜臀| 国产精品一区二区视频| 亚洲一区日韩精品中文字幕| 精品国产三级电影在线观看| 成人高清视频在线| 免费精品视频在线| 成人欧美一区二区三区| 欧美一区二区三区爱爱| 不卡的看片网站| 国产美女娇喘av呻吟久久| 亚洲成a人v欧美综合天堂| 国内精品国产三级国产a久久| 欧美午夜不卡视频| 亚洲国产欧美一区二区三区丁香婷| 九色porny丨国产精品| 日韩一级免费观看| 成人精品视频网站| 美女一区二区三区| 亚洲欧美另类久久久精品2019| 精品成人a区在线观看| 国产精品视频看| 91福利在线观看| 亚洲一区二区美女| 欧美zozo另类异族| 国产在线精品一区二区| 成人视屏免费看| 韩国av一区二区| 亚洲另类在线制服丝袜| 91丨国产丨九色丨pron| 激情五月播播久久久精品| 美女视频黄免费的久久| 日韩av高清在线观看| 一区二区三区四区不卡在线| 26uuu亚洲综合色| 不卡免费追剧大全电视剧网站| 国产欧美一区二区精品久导航| 色综合久久99| 波多野结衣中文字幕一区二区三区| 一区二区成人在线视频| 亚洲精品在线免费播放| 欧美日韩国产高清一区| 成人毛片视频在线观看| 亚洲福利视频一区二区| 国产精品小仙女| 亚洲成人综合在线| 亚洲欧美自拍偷拍| 久久综合九色综合97_久久久| 欧美日韩亚州综合| 91论坛在线播放| 丁香亚洲综合激情啪啪综合| 国产成人av一区二区三区在线| 麻豆久久久久久久| 免费看精品久久片| 日日夜夜精品视频免费| 欧美老肥妇做.爰bbww| 欧美日韩精品一区视频| 欧美精品亚洲二区| 欧美一区二区三区白人| 国产欧美一区二区三区鸳鸯浴| 亚洲激情av在线| 午夜视黄欧洲亚洲| 日本中文字幕一区二区有限公司| 亚洲欧美在线视频| 国产精品乱子久久久久| 中文字幕二三区不卡| 中文字幕欧美一区| 国产精品视频第一区| 久久一区二区三区国产精品| 欧美一个色资源| 日韩精品一区二区三区视频在线观看 | 久久综合一区二区| 久久久久久久久伊人| 欧美极品xxx| 久久久久国产精品麻豆ai换脸| 欧美国产精品专区| 亚洲欧美一区二区在线观看| 综合久久给合久久狠狠狠97色 | 欧美日韩精品一区二区三区蜜桃 | 亚洲人成人一区二区在线观看| 亚洲免费观看视频| 亚洲国产日韩精品| 狠狠色丁香九九婷婷综合五月| 东方欧美亚洲色图在线| 在线免费观看视频一区| 日韩精品一区二区三区四区 | 日本道免费精品一区二区三区| 欧美精品国产精品| 久久久久97国产精华液好用吗| 亚洲日本va午夜在线电影| 麻豆国产精品官网| 北条麻妃一区二区三区|