Initial commit
This commit is contained in:
220
EDOKA/DiverseFormulare/frmReleaseNotes.vb
Normal file
220
EDOKA/DiverseFormulare/frmReleaseNotes.vb
Normal file
@@ -0,0 +1,220 @@
|
||||
Public Class frmReleaseNotes
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Vom Windows Form Designer generierter Code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' Für Windows Form-Designer erforderlich
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
||||
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
||||
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||
Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
|
||||
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents ToolBarButton2 As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
||||
Friend WithEvents PageSetupDialog1 As System.Windows.Forms.PageSetupDialog
|
||||
Friend WithEvents PrintDocument1 As System.Drawing.Printing.PrintDocument
|
||||
Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog
|
||||
Friend WithEvents PrintPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog
|
||||
Friend WithEvents ToolBarButton3 As System.Windows.Forms.ToolBarButton
|
||||
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmReleaseNotes))
|
||||
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
|
||||
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
|
||||
Me.ToolBarButton2 = New System.Windows.Forms.ToolBarButton()
|
||||
Me.ToolBarButton3 = New System.Windows.Forms.ToolBarButton()
|
||||
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
||||
Me.PageSetupDialog1 = New System.Windows.Forms.PageSetupDialog()
|
||||
Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument()
|
||||
Me.PrintDialog1 = New System.Windows.Forms.PrintDialog()
|
||||
Me.PrintPreviewDialog1 = New System.Windows.Forms.PrintPreviewDialog()
|
||||
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolBar1
|
||||
'
|
||||
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1, Me.ToolBarButton2, Me.ToolBarButton3})
|
||||
Me.ToolBar1.DropDownArrows = True
|
||||
Me.ToolBar1.ImageList = Me.ImageList1
|
||||
Me.ToolBar1.Name = "ToolBar1"
|
||||
Me.ToolBar1.ShowToolTips = True
|
||||
Me.ToolBar1.Size = New System.Drawing.Size(714, 25)
|
||||
Me.ToolBar1.TabIndex = 2
|
||||
'
|
||||
'ToolBarButton1
|
||||
'
|
||||
Me.ToolBarButton1.ImageIndex = 0
|
||||
'
|
||||
'ToolBarButton2
|
||||
'
|
||||
Me.ToolBarButton2.ImageIndex = 1
|
||||
'
|
||||
'ToolBarButton3
|
||||
'
|
||||
Me.ToolBarButton3.ImageIndex = 2
|
||||
'
|
||||
'ImageList1
|
||||
'
|
||||
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
||||
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
|
||||
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
|
||||
'
|
||||
'PageSetupDialog1
|
||||
'
|
||||
Me.PageSetupDialog1.Document = Me.PrintDocument1
|
||||
'
|
||||
'PrintDocument1
|
||||
'
|
||||
'
|
||||
'PrintDialog1
|
||||
'
|
||||
Me.PrintDialog1.Document = Me.PrintDocument1
|
||||
'
|
||||
'PrintPreviewDialog1
|
||||
'
|
||||
Me.PrintPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)
|
||||
Me.PrintPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)
|
||||
Me.PrintPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)
|
||||
Me.PrintPreviewDialog1.Document = Me.PrintDocument1
|
||||
Me.PrintPreviewDialog1.Enabled = True
|
||||
Me.PrintPreviewDialog1.Icon = CType(resources.GetObject("PrintPreviewDialog1.Icon"), System.Drawing.Icon)
|
||||
Me.PrintPreviewDialog1.Location = New System.Drawing.Point(44, 44)
|
||||
Me.PrintPreviewDialog1.MaximumSize = New System.Drawing.Size(0, 0)
|
||||
Me.PrintPreviewDialog1.Name = "PrintPreviewDialog1"
|
||||
Me.PrintPreviewDialog1.Opacity = 1
|
||||
Me.PrintPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty
|
||||
Me.PrintPreviewDialog1.Visible = False
|
||||
'
|
||||
'RichTextBox1
|
||||
'
|
||||
Me.RichTextBox1.Location = New System.Drawing.Point(0, 24)
|
||||
Me.RichTextBox1.Name = "RichTextBox1"
|
||||
Me.RichTextBox1.Size = New System.Drawing.Size(696, 440)
|
||||
Me.RichTextBox1.TabIndex = 3
|
||||
Me.RichTextBox1.Text = "RichTextBox1"
|
||||
'
|
||||
'frmReleaseNotes
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(714, 575)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.RichTextBox1, Me.ToolBar1})
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmReleaseNotes"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Release-Informationen"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Dim Richtextboxex1 As RichTextBoxEx
|
||||
|
||||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmReleaseNotes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
Me.Richtextboxex1 = New RichTextBoxEx(Me.RichTextBox1)
|
||||
Me.Richtextboxex1.LoadFile(Application.StartupPath + "\relnotes.rtf")
|
||||
Me.Richtextboxex1.Top = Me.ToolBar1.Top + Me.ToolBar1.Height + 1
|
||||
Me.Richtextboxex1.Width = Me.ToolBar1.Width
|
||||
Me.Richtextboxex1.Height = Me.Height - Me.ToolBar1.Height - 30
|
||||
End Sub
|
||||
|
||||
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
|
||||
Dim i As Integer
|
||||
Select Case ToolBar1.Buttons.IndexOf(e.Button)
|
||||
Case 0
|
||||
Me.Close()
|
||||
Case 1
|
||||
If Me.PageSetupDialog1.ShowDialog() = DialogResult.OK Then
|
||||
PrintDocument1.Print()
|
||||
End If
|
||||
Case 2
|
||||
PrintPreviewDialog1.ShowDialog()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
Me.PageSetupDialog1.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
If (PrintPreviewDialog1.ShowDialog = DialogResult.OK) Then
|
||||
PrintDocument1.Print()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
PrintDocument1.Print()
|
||||
End Sub
|
||||
Private m_nFirstCharOnPage As Integer
|
||||
|
||||
Private Sub PrintDocument1_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.BeginPrint
|
||||
m_nFirstCharOnPage = 0
|
||||
End Sub
|
||||
|
||||
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
|
||||
m_nFirstCharOnPage = Richtextboxex1.FormatRange(False, _
|
||||
e, _
|
||||
m_nFirstCharOnPage, _
|
||||
Richtextboxex1.TextLength)
|
||||
|
||||
If (m_nFirstCharOnPage < Richtextboxex1.TextLength) Then
|
||||
e.HasMorePages = True
|
||||
Else
|
||||
e.HasMorePages = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PrintDocument1_EndPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.EndPrint
|
||||
Richtextboxex1.FormatRangeDone()
|
||||
End Sub
|
||||
|
||||
Private Sub PrintPreviewDialog1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintPreviewDialog1.Load
|
||||
Me.PrintPreviewDialog1.Height = 600
|
||||
Me.PrintPreviewDialog1.Width = 800
|
||||
End Sub
|
||||
|
||||
Private Sub frmReleaseNotes_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
|
||||
Try
|
||||
Me.Richtextboxex1.Top = Me.ToolBar1.Top + Me.ToolBar1.Height + 1
|
||||
Me.Richtextboxex1.Width = Me.ToolBar1.Width
|
||||
Me.Richtextboxex1.Height = Me.Height - Me.ToolBar1.Height - 30
|
||||
Catch
|
||||
End Try
|
||||
|
||||
' Try
|
||||
' Me.Richtextboxex1.Top = Me.ToolBar1.Top + Me.ToolBar1.Height
|
||||
' Me.Richtextboxex1.Width = Me.ToolBar1.Width
|
||||
' Me.Richtextboxex1.Height = Me.Height - Me.ToolBar1.Height
|
||||
' Catch
|
||||
' End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user