📄 ex2.txt
字号:
Imports System.Text.RegularExpressions
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim num As String
num = TextBox2.Text
Select Case num
Case "1"
TextBox1.Text = "This should be a unique identifier for the purposes of filing. If more than one person is working on the project or more than one analysis technique is being used, this identifier could contain letters and numbers. For example, if Chris Smith and Jan Koo are both doing an analysis, the identifier might be CS1 or JK75. If both a heuristic evaluation and a think-aloud usability study were used, the identifiers might be HE6 or TA89. Follow the unique identifier with the word 'Problem,' if the report pertains to a usability problem of the interface, or the words 'Good Feature,' if it describes an aspect of the interface you feel should be preserved in any redesign."
Case "2"
TextBox1.Text = "This description will be used as the 'name' of this UAR when you talk about its relation to other UARs. Make the name as short as possible (about three to five words) but still descriptive and distinguishable from other aspects of the system. If this UAR is about a problem (as opposed to a good feature), make sure you have a name that describes the problem, rather than a solution."
Case "3"
TextBox1.Text = "This is the objective supporting material that justifies your identifying the aspect as worthy of report. This section needs to contain enough information for a reader of this UAR to understand what triggered the report. For an HE report, for instance, this could be an image of a cluttered screen and the heuristic about aesthetics and minimalist design. In a think-aloud study this is usually what was on the screen (a screen shot or description), what the user did (keystrokes, mouse movements), what the system did in response to any user actions, and what the user said. You need to include enough pertinent information about the identification of an aspect for the reader to understand what the analyst was thinking when the aspect was identified (for HE) or what the user was trying to do when the aspect either hindered or facilitated his or her progress."
Case "4"
TextBox1.Text = "This is your interpretation of the evidence. That is, for a think-aloud usability test, why you think what happened happened, or, for an HE, why you think the aspect was designed the way it was. You need to provide enough content in this explanation for the reader to understand the problem-even if they do not know the system or domain as well as you do."
Case "5"
TextBox1.Text = "This is your reasoning about how important it is to either fix this problem or preserve this good feature. This includes how frequently the users will experience this aspect, whether they are likely to learn how it works, whether it will affect new users, casual users, experienced users, etc."
Case "6"
TextBox1.Text = "If this aspect is a problem (as opposed to a good feature to be preserved in the next version of the software), this is the place to propose a solution. It is not necessary to have a solution as soon as you identify a problem-you might find after analyzing the whole interface that many problems are related and can all be fixed by making a single broad change instead of making several small changes. However, if you do propose a possible solution, report any potential design trade-offs that you see"
Case "7"
TextBox1.Text = "It is often the case that UARs are related to each other. This is where you record which UARs this one is related to and a statement about how it is related. Make sure that all the related UARs point to each other. It is a common mistake to enter the pointer into a newly created UAR, but neglect to go back to the previous ones that it relates to and update their UARs."
Case Else
MessageBox.Show("Please enter numbers between 1 and 7", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Select
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If (TextBox1.Text = "") Then
MessageBox.Show("Please select text", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else
If (TextBox3.Text = "") Then
MessageBox.Show("Please enter a search string", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else
Dim string1 As String = TextBox1.Text.ToLower
Dim regString As String = TextBox3.Text.ToLower
Dim theReg As New Regex(regString)
Dim theMatches As MatchCollection = theReg.Matches(string1)
Dim theMatch As Match
Dim count As Integer = theMatches.Count
If (count > 0) Then
Dim flag As Integer = 1
For Each theMatch In theMatches
Dim pos As String = theMatch.Index + 1
If (flag = 1) Then
Label14.Text = "Occurrence 1: Position: " + pos.ToString()
Label14.Show()
flag = 0
End If
If (count > 1) Then
Label15.Text = "Occurrence " + count.ToString() + ": Position: " + pos.ToString()
Label15.Show()
End If
Next theMatch
If (MessageBox.Show("The number of occurences of '" + regString + "' is: " + count.ToString + Chr(13) + "Search same text?", "Search String", MessageBoxButtons.OKCancel, MessageBoxIcon.None) = Windows.Forms.DialogResult.Cancel) Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label14.Hide()
Label15.Hide()
Else
TextBox3.SelectAll()
TextBox3.Focus()
End If
Else
If (MessageBox.Show("String '" + regString + "' not found" + Chr(13) + "Search same text again?", "Search String", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.Cancel) Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label14.Hide()
Label15.Hide()
Else
TextBox3.SelectAll()
TextBox3.Focus()
End If
End If
End If
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -