Files
Tongsin/Epole/MsgForm.vb
2019-02-23 23:02:52 +09:00

22 lines
940 B
VB.net

Public Class MsgForm
Private Sub bt_clearStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_clear.Click
Me.RichTextBox1.Clear()
End Sub
Private Sub bt_savelist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_savelist.Click
Dim SD As New SaveFileDialog
SD.FileName = "log" & Format(Now, "yyyyMMdd") & ".txt"
If SD.ShowDialog() <> Windows.Forms.DialogResult.OK Then
MsgBox("취소되었습니다", MsgBoxStyle.Critical, "사용자취소")
Else
Me.RichTextBox1.SaveFile(SD.FileName, RichTextBoxStreamType.PlainText)
MsgBox("저장완료", MsgBoxStyle.Information, "확인")
End If
End Sub
Public Sub ADdLog(ByVal msg As String, Optional ByVal Reset As Boolean = False)
If Reset Then Me.RichTextBox1.Clear()
Me.RichTextBox1.AppendText(msg & vbCrLf)
End Sub
End Class