// 開始ボタンを押したときの処理 private void StartBtn_Click(object sender, EventArgs e) { // 出題数を変更する if (RB10.Checked) { mondaiMax = 10; } if (RB20.Checked) { mondaiMax = 20; } if (RB30.Checked) { mondaiMax = 30; } // 計算タイプを変更する if (RBtasu.Checked) { type = 1; typeStr = " + "; } if (RBhiku.Checked) { type = 2; typeStr = " - "; } if (RBkakeru.Checked) { type = 3; typeStr = " × "; } if (RBwaru.Checked) { type = 4; typeStr = " ÷ "; } mondaiCnt = 0; // 問題数のカウント初期化 seikaiCnt = 0; // 正解数のカウント初期化 InBox.Enabled = true; // InBoxを有効に。フォーカスより前はないとフォーカスできない MondaiSakusei(); InBox.Focus(); // 解答欄へフォーカスを移す OutBox.Text = ""; StartBtn.Text = "リセット"; sw.Reset(); // 計測初期化 OutBoxFinishTime.Text = ""; // FinishTimeLbl の初期化 sw.Start(); // 計測開始 timer1.Enabled = true; // 経過時間表示の繰り返し処理開始 timer1.Interval = 500; // 0.5秒ごとに処理を行う }//StartBtn_Click
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current <see cref="T:System.Object"/>.</returns> public override int GetHashCode() { return(BootCritical.GetHashCode() ^ InBox.GetHashCode() ^ (String.IsNullOrEmpty(CatalogFile) ? 0 : CatalogFile.GetHashCode()) ^ (String.IsNullOrEmpty(ClassDescription) ? 0 : ClassDescription.GetHashCode()) ^ (String.IsNullOrEmpty(ClassGuid) ? 0 : ClassGuid.GetHashCode()) ^ (String.IsNullOrEmpty(ClassName) ? 0 : ClassName.GetHashCode()) ^ Date.GetHashCode() ^ DriverSignature.GetHashCode() ^ (String.IsNullOrEmpty(OriginalFileName) ? 0 : OriginalFileName.GetHashCode()) ^ (String.IsNullOrEmpty(ProviderName) ? 0 : ProviderName.GetHashCode()) ^ (String.IsNullOrEmpty(PublishedName) ? 0 : PublishedName.GetHashCode())); }
/// <summary> /// Parse given json data to messages /// </summary> /// <returns></returns> public bool ParseMessagesData(string data) { var receivedData = JsonUtility.FromJson <GetMessageResponseData>(data); foreach (var message in receivedData.messages) { var newMessage = new Message(message.type, message.content); InBox.Add(newMessage); HandleMessage(newMessage); } return(true); }
private void StartBtn_Click(object sender, EventArgs e) { //問題を変更する if (RB10.Checked) { mondaiMax = 10; } if (RB20.Checked) { mondaiMax = 20; } if (RB30.Checked) { mondaiMax = 30; } //計算タイプを変更 if (RBtasu.Checked) { type = 1; typeStr = " + "; } if (RBhiku.Checked) { type = 2; typeStr = " - "; } if (RBkake.Checked) { type = 3; typeStr = " × "; } //if (RBwaru.Checked) //{ // type = 4; // typeStr = " ÷ "; //} mondaiCnt = 0; seikaiCnt = 0; Mondaisakusei(); InBox.Enabled = true; InBox.Focus(); //解答欄へフォーカスを移す }
private void StartButton_Click(object sender, EventArgs e) { if (RB10.Checked) { mondaiMax = 10; } if (RB20.Checked) { mondaiMax = 20; } if (RB30.Checked) { mondaiMax = 30; } if (RBtasu.Checked) { type = 1; TypeStr = " + "; } if (RBhiku.Checked) { type = 2; TypeStr = " - "; } if (RBkakeru.Checked) { type = 3; TypeStr = " × "; } if (RBwaru.Checked) { type = 4; TypeStr = " ÷ "; } mondaiCnt = 0; seikaiCnt = 0; MondaiSakusei(); InBox.Enabled = true; InBox.Focus(); StartButton.Text = "リセット"; }
/** * ドリル開始メソッド * */ private void StartBtn_Click(object sender, EventArgs e) { //問題数の作成 if (ten_questions.Checked) { MondaiMax = 10; } if (twenty_questions.Checked) { MondaiMax = 20; } if (thirty_questions.Checked) { MondaiMax = 30; } //成績変数の初期化 MondaiCnt = 0; seisekiCnt = 0; MondaiSakusei(); //回答受付 InBox.Enabled = true; InBox.Focus(); }
protected void Page_Load(object sender, EventArgs e) { var currentUser = Membership.GetUser(username); if (currentUser == null) { throw new SecurityException("Access Denied"); } ClientScriptManager cs = Page.ClientScript; const string csname1 = "chkBoxScript"; Type cstype = GetType(); if (!cs.IsStartupScriptRegistered(cstype, csname1)) { var cstext1 = new StringBuilder(); cstext1.Append("<script type=text/javascript>"); cstext1.AppendFormat("var allCheckBoxSelector = '#{0} input[id$=\"chkAll\"]:checkbox';", InBox.FindControl("grdInbox").ClientID); cstext1.AppendFormat("var checkBoxSelector = '#{0} input[id$=\"cbxDel\"]:checkbox';", InBox.FindControl("grdInbox").ClientID); cstext1.Append("$(document).ready(function () {"); cstext1.Append("$(allCheckBoxSelector).live('click', function () {"); cstext1.Append("$(checkBoxSelector).attr('checked', $(this).is(':checked'));"); cstext1.Append("ToggleCheckUncheckAllOptionAsNeeded();"); cstext1.Append("});"); cstext1.Append("$(checkBoxSelector).live('click', ToggleCheckUncheckAllOptionAsNeeded);"); cstext1.Append("ToggleCheckUncheckAllOptionAsNeeded();"); cstext1.Append("}); "); cstext1.AppendLine(); cstext1.Append("function ToggleCheckUncheckAllOptionAsNeeded() {"); cstext1.Append("var totalCheckboxes = $(checkBoxSelector),"); cstext1.Append("checkedCheckboxes = totalCheckboxes.filter(\":checked\"),"); cstext1.Append("noCheckboxesAreChecked = (checkedCheckboxes.length === 0),"); cstext1.Append("allCheckboxesAreChecked = (totalCheckboxes.length === checkedCheckboxes.length);"); cstext1.Append("$(allCheckBoxSelector).attr('checked', allCheckboxesAreChecked);"); cstext1.Append("}"); cstext1.Append("</script>"); cs.RegisterStartupScript(cstype, csname1, cstext1.ToString()); } var profile = Snitz.BLL.PrivateMessages.GetPreferences(currentUser.UserName); _layout = profile == null ? "double" : profile.PMLayout; if (String.IsNullOrEmpty(_layout)) { _layout = "double"; } switch (_layout) { case "double": _showOutBox = false; break; case "single": _showOutBox = true; break; case "none": _showOutBox = false; ButtonOutBox.Visible = false; break; } if (!IsPostBack) { SelectPanels(); } SetButtonDisplay(); BindMemberList(Session["_searchfor"] != null ? Session["_searchfor"].ToString() : String.Empty); }