📄 uar_componets.vb
字号:
Public Class UAR_Componets
Public search As Boolean = 0
Private Sub UAR_Componets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub BtnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDisplay.Click
If (TbxNum.Text = "1") Then
TbxOutput.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."
ElseIf (TbxNum.Text = "2") Then
TbxOutput.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."
ElseIf (TbxNum.Text = "3") Then
TbxOutput.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."
ElseIf (TbxNum.Text = "4") Then
TbxOutput.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."
ElseIf (TbxNum.Text = "5") Then
TbxOutput.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."
ElseIf (TbxNum.Text = "6") Then
TbxOutput.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"
ElseIf (TbxNum.Text = "7") Then
TbxOutput.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."
Else
MessageBox.Show("Please enter values between 1 and 7", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
search = 1
End Sub
Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch.Click
If (search = 0) Then
MessageBox.Show("Please select text ", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf TbxStr.Text = "" Then
MessageBox.Show("Please enter a search string ", "Search String", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Else
Dim search_String As String
search_String = TbxStr.Text
Dim i, sum, position, first_occurence, last_occurence As Integer
sum = 0
position = 1
i = 1
'查找字符串
Do Until position = 0
position = InStr(i, TbxOutput.Text, search_String, CompareMethod.Text)
If position <> 0 Then
sum += 1
i = position + search_String.Length - 1
'求第一个字符串的位置
If sum = 1 Then
first_occurence = position
End If
'求最后一个字符串位置
If sum > 1 Then
last_occurence = position
End If
End If
i += 1
Loop
'弹出“没有找到字符串”的窗口
If sum = 0 Then
If MessageBox.Show("String '" + search_String + "' not found" + Chr(13) + "Search the same text again?", "Search String", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.Yes Then
TbxStr.Focus()
TbxStr.SelectAll()
Else
TbxOutput.Text = ""
TbxNum.Text = ""
TbxStr.Text = ""
LblSearchResult1.Text = ""
LblSearchResult2.Text = ""
End If
Else
'如果找到字符串则显示字符串出现的位置
LblSearchResult1.Text = "Occurence 1: Position: " & first_occurence
'如果字符串只出现一次,不重复显示位置
If sum > 1 Then
LblSearchResult2.Text = "Occurence " & sum & ": Position: " & last_occurence
End If
'弹出“字符串出现次数”的窗口
If MessageBox.Show("The number of occurences of '" & search_String & "' is : " & sum & Chr(13) + "Search the same text?", "Search String", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
TbxStr.Focus()
TbxStr.SelectAll()
Else
TbxOutput.Text = ""
TbxNum.Text = ""
TbxStr.Text = ""
LblSearchResult1.Text = ""
LblSearchResult2.Text = ""
End If
End If
End If
End Sub
Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
Private Sub TbxStr_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TbxStr.TextChanged
LblSearchResult1.Text = ""
LblSearchResult2.Text = ""
End Sub
Private Sub TbxNum_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TbxNum.TextChanged
TbxOutput.Text = ""
TbxStr.Text = ""
LblSearchResult1.Text = ""
LblSearchResult2.Text = ""
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -