WIP
This commit is contained in:
22
EDIDocumentImport/frmXmlEditor.vb
Normal file
22
EDIDocumentImport/frmXmlEditor.vb
Normal file
@@ -0,0 +1,22 @@
|
||||
Public Class frmXmlEditor
|
||||
Public Property FileName As String
|
||||
|
||||
Private Sub frmXmlEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
If FileName Is Nothing OrElse FileName = String.Empty Then
|
||||
MsgBox("Kein Dateiname übergeben!", MsgBoxStyle.Critical, Text)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not IO.File.Exists(FileName) Then
|
||||
MsgBox("Datei existiert nicht!", MsgBoxStyle.Critical, Text)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim oContents = IO.File.ReadAllText(FileName)
|
||||
RichEditControl1.Text = oContents
|
||||
Catch ex As Exception
|
||||
MsgBox($"Fehler beim Laden der Datei: {ex.Message}", MsgBoxStyle.Critical, Text)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user