初始化
This commit is contained in:
41
BLV_Studio/Control/LogInformation.vb
Normal file
41
BLV_Studio/Control/LogInformation.vb
Normal file
@@ -0,0 +1,41 @@
|
||||
Public Class LogInformation
|
||||
Public result As String
|
||||
Public Event Readconfigdata()
|
||||
Public Event Writeconfigdata()
|
||||
Private Sub LogInformation_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
SetControl()
|
||||
|
||||
End Sub
|
||||
Public Sub SetControl()
|
||||
If result <> String.Empty Then
|
||||
Dim buf As String() = result.Split(",")
|
||||
If Not String.IsNullOrEmpty(buf(0)) Then
|
||||
CheckBox1.Checked = buf(0)
|
||||
Else
|
||||
CheckBox1.Checked = False
|
||||
End If
|
||||
TextBox1.Text = buf(1)
|
||||
TextBox2.Text = buf(2)
|
||||
TextBox3.Text = buf(3)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress
|
||||
e.Handled = Not $"0123456789{vbBack}".Contains(e.KeyChar) '如果要只允许输入数字,就把上一行字符串中的字母删除
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
result = String.Empty
|
||||
result = $"{CheckBox1.Checked },{ TextBox1.Text },{TextBox2.Text },{TextBox3.Text }"
|
||||
RaiseEvent Writeconfigdata()
|
||||
'Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
'Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
RaiseEvent Readconfigdata()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user