Revert "commit"
This commit is contained in:
17
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/DateTimePickerEx.Designer.vb
generated
Normal file
17
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/DateTimePickerEx.Designer.vb
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
Partial Class DateTimePickerEx
|
||||
Inherits System.Windows.Forms.DateTimePicker
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,267 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Class name : DateTimePickerEx
|
||||
'Description: Extends the datetimepicker class to allow binding a DBNull database value
|
||||
' to it.
|
||||
'
|
||||
' This class uses the display format to simulate an "empty" selection since the
|
||||
' base datetimepicker class doesn't support displaying an empty text string.
|
||||
'
|
||||
' Since DBNull is not compatible with Date datatype, I created a new method called
|
||||
' NullableValue to support it.
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
|
||||
Public Class DateTimePickerEx
|
||||
Inherits System.Windows.Forms.DateTimePicker
|
||||
|
||||
'Public Property _value As String = Nothing
|
||||
|
||||
Public Property _value As String
|
||||
Get
|
||||
If Not Me.Checked Then
|
||||
Return ""
|
||||
Else
|
||||
Return (Me.Value)
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal newValue As String)
|
||||
If newValue Is DBNull.Value Or newValue = "" Then
|
||||
' MsgBox("null")
|
||||
Me.NullableValue = DBNull.Value
|
||||
Me.Checked = False
|
||||
Else
|
||||
'MsgBox(newValue)
|
||||
Me.NullableValue = newValue
|
||||
|
||||
End If
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private m_enmOriginalFormat As Windows.Forms.DateTimePickerFormat
|
||||
Private m_strOriginalCustomFormat As String
|
||||
Private m_blnRefreshing As Boolean = False
|
||||
|
||||
#Region " Windows Form Designer generated code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Windows Form Designer.
|
||||
InitializeComponent()
|
||||
|
||||
'Add any initialization after the InitializeComponent() call
|
||||
InitializeMembers()
|
||||
End Sub
|
||||
|
||||
'UserControl overrides dispose to clean up the component list.
|
||||
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
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Event Declarations "
|
||||
|
||||
Public Event NullableValueChanged As EventHandler
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Raise the NullableValueChanged event.
|
||||
' Required for "Bindable" properties.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Protected Overridable Sub OnNullableValueChanged(ByVal e As EventArgs)
|
||||
RaiseEvent NullableValueChanged(Me, e)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Public Methods and Properties "
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Gets or Sets the date time picker value.
|
||||
' Accepts DBNull values.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
<Bindable(True), _
|
||||
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
|
||||
Public Property NullableValue() As Object
|
||||
Get
|
||||
If Not Me.Checked Then
|
||||
Return (DBNull.Value)
|
||||
Else
|
||||
Return (Me.Value)
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal newValue As Object)
|
||||
|
||||
Dim blnRaiseEvent As Boolean = False
|
||||
|
||||
If newValue Is DBNull.Value Then
|
||||
'If the value changed
|
||||
If Me.Checked Then
|
||||
|
||||
Me.Checked = False
|
||||
Me.RefreshText()
|
||||
blnRaiseEvent = True
|
||||
End If
|
||||
|
||||
ElseIf IsDate(newValue) Then
|
||||
|
||||
'If only the "Checked" state changes (newValue parameter is equal to the Value property)
|
||||
'We must raise the NullableValueChanged event manually since the parents ValueChanged
|
||||
'event won't be fired.
|
||||
blnRaiseEvent = (Not Me.Checked) And (CType(newValue, Date).Equals(Me.Value))
|
||||
|
||||
Me.Checked = True
|
||||
Me.Value = CType(newValue, Date)
|
||||
Me.RefreshText()
|
||||
|
||||
Else
|
||||
Throw New ArgumentException
|
||||
End If
|
||||
|
||||
If blnRaiseEvent Then
|
||||
Me.OnNullableValueChanged(New EventArgs)
|
||||
End If
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Base Class Overrides "
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: When the user changes the value, we need to refresh
|
||||
' the display text formats and to throw our NullableValueChanged event.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Protected Overrides Sub OnValueChanged(ByVal e As System.EventArgs)
|
||||
|
||||
Me.RefreshText()
|
||||
|
||||
'When the value changes, the nullable value also changes.
|
||||
Me.OnNullableValueChanged(e)
|
||||
|
||||
MyBase.OnValueChanged(e)
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: If the format is changed we need to get the
|
||||
' new format and store it as the new original format.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Protected Overrides Sub OnFormatChanged(ByVal e As System.EventArgs)
|
||||
|
||||
'If the format changes because of our RefreshText method, we don't want to save
|
||||
'the "temporary" format used to hide text as our original format...
|
||||
|
||||
If Not m_blnRefreshing Then
|
||||
Me.SaveOriginalFormats()
|
||||
End If
|
||||
|
||||
MyBase.OnFormatChanged(e)
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: When the control is ask to refresh itself, we also
|
||||
' refresh the display format.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Public Overrides Sub Refresh()
|
||||
Me.RefreshText()
|
||||
|
||||
MyBase.Refresh()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Initialize the member variables.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Private Sub InitializeMembers()
|
||||
Me.SaveOriginalFormats()
|
||||
|
||||
'The default for the DateTimePickerEx is to display the checkbox.
|
||||
MyBase.ShowCheckBox = False
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Save the current display formats.
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Private Sub SaveOriginalFormats()
|
||||
m_enmOriginalFormat = Me.Format
|
||||
m_strOriginalCustomFormat = Me.CustomFormat
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Restore the original display formats
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Private Sub RestoreOriginalFormats()
|
||||
Me.CustomFormat = m_strOriginalCustomFormat
|
||||
Me.Format = m_enmOriginalFormat
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------
|
||||
'Description: Refresh the display format based on the current state
|
||||
' (Checked or not)
|
||||
'Return :
|
||||
'Parameters :
|
||||
'History :
|
||||
'-----------------------------------------------------------
|
||||
Private Sub RefreshText()
|
||||
|
||||
m_blnRefreshing = True
|
||||
|
||||
If Me.Checked Then
|
||||
Me.RestoreOriginalFormats()
|
||||
Else
|
||||
Me.Format = Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.CustomFormat = " "
|
||||
End If
|
||||
|
||||
m_blnRefreshing = False
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,15 @@
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class FlatButton
|
||||
Inherits System.Windows.Forms.Button
|
||||
Public Property allowBorder As Boolean = False
|
||||
Public Sub New()
|
||||
MyBase.FlatStyle = Windows.Forms.FlatStyle.Flat
|
||||
MyBase.ForeColor = Color.Black
|
||||
MyBase.FlatAppearance.BorderSize = 0
|
||||
If Not allowBorder Then
|
||||
MyBase.FlatAppearance.BorderSize = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
213
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/HTMLTextBox.designer.vb
generated
Normal file
213
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/HTMLTextBox.designer.vb
generated
Normal file
@@ -0,0 +1,213 @@
|
||||
Namespace McDull.Windows.Forms
|
||||
Partial Class HTMLTextBox
|
||||
Private components As System.ComponentModel.IContainer = Nothing
|
||||
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso (components IsNot Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(HTMLTextBox))
|
||||
Me.toolStripToolBar = New System.Windows.Forms.ToolStrip()
|
||||
Me.toolStripComboBoxName = New System.Windows.Forms.ToolStripComboBox()
|
||||
Me.toolStripButtonBold = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonItalic = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonUnderline = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonColor = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripSeparatorFont = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.toolStripButtonNumbers = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonBullets = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonOutdent = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonIndent = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripSeparatorFormat = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.toolStripButtonLeft = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonCenter = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonRight = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonFull = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripSeparatorAlign = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.toolStripButtonLine = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonHyperlink = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripButtonPicture = New System.Windows.Forms.ToolStripButton()
|
||||
Me.webBrowserBody = New System.Windows.Forms.WebBrowser()
|
||||
Me.toolStripComboBoxSize = New ToolStripComboBoxEx()
|
||||
Me.toolStripToolBar.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
Me.toolStripToolBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||
Me.toolStripToolBar.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripComboBoxName, Me.toolStripComboBoxSize, Me.toolStripButtonBold, Me.toolStripButtonItalic, Me.toolStripButtonUnderline, Me.toolStripButtonColor, Me.toolStripSeparatorFont, Me.toolStripButtonNumbers, Me.toolStripButtonBullets, Me.toolStripButtonOutdent, Me.toolStripButtonIndent, Me.toolStripSeparatorFormat, Me.toolStripButtonLeft, Me.toolStripButtonCenter, Me.toolStripButtonRight, Me.toolStripButtonFull, Me.toolStripSeparatorAlign, Me.toolStripButtonLine, Me.toolStripButtonHyperlink, Me.toolStripButtonPicture})
|
||||
Me.toolStripToolBar.Location = New System.Drawing.Point(0, 0)
|
||||
Me.toolStripToolBar.Name = "toolStripToolBar"
|
||||
Me.toolStripToolBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
|
||||
Me.toolStripToolBar.Size = New System.Drawing.Size(600, 25)
|
||||
Me.toolStripToolBar.TabIndex = 1
|
||||
Me.toolStripToolBar.Text = "Tool Bar"
|
||||
Me.toolStripComboBoxName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.toolStripComboBoxName.FlatStyle = System.Windows.Forms.FlatStyle.System
|
||||
Me.toolStripComboBoxName.MaxDropDownItems = 30
|
||||
Me.toolStripComboBoxName.Name = "toolStripComboBoxName"
|
||||
Me.toolStripComboBoxName.Size = New System.Drawing.Size(150, 25)
|
||||
' AddHandler Me.toolStripComboBoxName.SelectedIndexChanged, New System.EventHandler(Me.toolStripComboBoxName_SelectedIndexChanged)
|
||||
Me.toolStripButtonBold.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonBold.Image = (CType((resources.GetObject("toolStripButtonBold.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonBold.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonBold.Name = "toolStripButtonBold"
|
||||
Me.toolStripButtonBold.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonBold.Text = "Bold"
|
||||
' AddHandler Me.toolStripButtonBold.Click, New System.EventHandler(Me.toolStripButtonBold_Click)
|
||||
Me.toolStripButtonItalic.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonItalic.Image = (CType((resources.GetObject("toolStripButtonItalic.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonItalic.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonItalic.Name = "toolStripButtonItalic"
|
||||
Me.toolStripButtonItalic.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonItalic.Text = "Italic"
|
||||
' AddHandler Me.toolStripButtonItalic.Click, Me.toolStripButtonItalic_Click(Me, New EventArgs)
|
||||
Me.toolStripButtonUnderline.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonUnderline.Image = (CType((resources.GetObject("toolStripButtonUnderline.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonUnderline.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonUnderline.Name = "toolStripButtonUnderline"
|
||||
Me.toolStripButtonUnderline.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonUnderline.Text = "Underline"
|
||||
' AddHandler Me.toolStripButtonUnderline.Click, New System.EventHandler(Me.toolStripButtonUnderline_Click)
|
||||
Me.toolStripButtonColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonColor.Image = (CType((resources.GetObject("toolStripButtonColor.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonColor.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonColor.Name = "toolStripButtonColor"
|
||||
Me.toolStripButtonColor.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonColor.Text = "Font Color"
|
||||
' AddHandler Me.toolStripButtonColor.Click, New System.EventHandler(Me.toolStripButtonColor_Click)
|
||||
Me.toolStripSeparatorFont.Name = "toolStripSeparatorFont"
|
||||
Me.toolStripSeparatorFont.Size = New System.Drawing.Size(6, 25)
|
||||
Me.toolStripButtonNumbers.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonNumbers.Image = (CType((resources.GetObject("toolStripButtonNumbers.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonNumbers.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonNumbers.Name = "toolStripButtonNumbers"
|
||||
Me.toolStripButtonNumbers.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonNumbers.Text = "Format Numbers"
|
||||
' AddHandler Me.toolStripButtonNumbers.Click, New System.EventHandler(Me.toolStripButtonNumbers_Click)
|
||||
Me.toolStripButtonBullets.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonBullets.Image = (CType((resources.GetObject("toolStripButtonBullets.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonBullets.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonBullets.Name = "toolStripButtonBullets"
|
||||
Me.toolStripButtonBullets.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonBullets.Text = "Format Bullets"
|
||||
' AddHandler Me.toolStripButtonBullets.Click, New System.EventHandler(Me.toolStripButtonBullets_Click)
|
||||
Me.toolStripButtonOutdent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonOutdent.Image = (CType((resources.GetObject("toolStripButtonOutdent.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonOutdent.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonOutdent.Name = "toolStripButtonOutdent"
|
||||
Me.toolStripButtonOutdent.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonOutdent.Text = "Decrease Indentation"
|
||||
' AddHandler Me.toolStripButtonOutdent.Click, New System.EventHandler(Me.toolStripButtonOutdent_Click)
|
||||
Me.toolStripButtonIndent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonIndent.Image = (CType((resources.GetObject("toolStripButtonIndent.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonIndent.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonIndent.Name = "toolStripButtonIndent"
|
||||
Me.toolStripButtonIndent.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonIndent.Text = "Increase Indentation"
|
||||
'AddHandler Me.toolStripButtonIndent.Click, New System.EventHandler(Me.toolStripButtonIndent_Click)
|
||||
Me.toolStripSeparatorFormat.Name = "toolStripSeparatorFormat"
|
||||
Me.toolStripSeparatorFormat.Size = New System.Drawing.Size(6, 25)
|
||||
Me.toolStripButtonLeft.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonLeft.Image = (CType((resources.GetObject("toolStripButtonLeft.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonLeft.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonLeft.Name = "toolStripButtonLeft"
|
||||
Me.toolStripButtonLeft.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonLeft.Text = "Align Left"
|
||||
' AddHandler Me.toolStripButtonLeft.Click, New System.EventHandler(Me.toolStripButtonLeft_Click)
|
||||
Me.toolStripButtonCenter.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonCenter.Image = (CType((resources.GetObject("toolStripButtonCenter.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonCenter.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonCenter.Name = "toolStripButtonCenter"
|
||||
Me.toolStripButtonCenter.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonCenter.Text = "Center"
|
||||
' AddHandler Me.toolStripButtonCenter.Click, New System.EventHandler(Me.toolStripButtonCenter_Click)
|
||||
Me.toolStripButtonRight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonRight.Image = (CType((resources.GetObject("toolStripButtonRight.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonRight.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonRight.Name = "toolStripButtonRight"
|
||||
Me.toolStripButtonRight.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonRight.Text = "Align Right"
|
||||
'AddHandler Me.toolStripButtonRight.Click, New System.EventHandler(Me.toolStripButtonRight_Click)
|
||||
Me.toolStripButtonFull.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonFull.Image = (CType((resources.GetObject("toolStripButtonFull.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonFull.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonFull.Name = "toolStripButtonFull"
|
||||
Me.toolStripButtonFull.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonFull.Text = "Justify"
|
||||
' AddHandler Me.toolStripButtonFull.Click, New System.EventHandler(Me.toolStripButtonFull_Click)
|
||||
Me.toolStripSeparatorAlign.Name = "toolStripSeparatorAlign"
|
||||
Me.toolStripSeparatorAlign.Size = New System.Drawing.Size(6, 25)
|
||||
Me.toolStripButtonLine.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonLine.Image = (CType((resources.GetObject("toolStripButtonLine.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonLine.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonLine.Name = "toolStripButtonLine"
|
||||
Me.toolStripButtonLine.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonLine.Text = "Insert Horizontal Line"
|
||||
'AddHandler Me.toolStripButtonLine.Click, New System.EventHandler(Me.toolStripButtonLine_Click)
|
||||
Me.toolStripButtonHyperlink.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonHyperlink.Image = (CType((resources.GetObject("toolStripButtonHyperlink.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonHyperlink.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonHyperlink.Name = "toolStripButtonHyperlink"
|
||||
Me.toolStripButtonHyperlink.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonHyperlink.Text = "Create a Hyperlink"
|
||||
' AddHandler Me.toolStripButtonHyperlink.Click, New System.EventHandler(Me.toolStripButtonHyperlink_Click)
|
||||
Me.toolStripButtonPicture.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.toolStripButtonPicture.Image = (CType((resources.GetObject("toolStripButtonPicture.Image")), System.Drawing.Image))
|
||||
Me.toolStripButtonPicture.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.toolStripButtonPicture.Name = "toolStripButtonPicture"
|
||||
Me.toolStripButtonPicture.Size = New System.Drawing.Size(23, 22)
|
||||
Me.toolStripButtonPicture.Text = "Insert Picture"
|
||||
'AddHandler Me.toolStripButtonPicture.Click, New System.EventHandler(Me.toolStripButtonPicture_Click)
|
||||
Me.webBrowserBody.AllowWebBrowserDrop = False
|
||||
Me.webBrowserBody.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.webBrowserBody.IsWebBrowserContextMenuEnabled = False
|
||||
Me.webBrowserBody.Location = New System.Drawing.Point(0, 25)
|
||||
Me.webBrowserBody.MinimumSize = New System.Drawing.Size(20, 20)
|
||||
Me.webBrowserBody.Name = "webBrowserBody"
|
||||
Me.webBrowserBody.Size = New System.Drawing.Size(600, 425)
|
||||
Me.webBrowserBody.TabIndex = 0
|
||||
' AddHandler Me.webBrowserBody.PreviewKeyDown, Me.webBrowserBody_PreviewKeyDown(Me.webBrowserBody, New EventArgs)
|
||||
' Me.webBrowserBody.DocumentCompleted += New System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(Me.webBrowserBody_DocumentCompleted)
|
||||
Me.toolStripComboBoxSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.toolStripComboBoxSize.FlatStyle = System.Windows.Forms.FlatStyle.System
|
||||
Me.toolStripComboBoxSize.Name = "toolStripComboBoxSize"
|
||||
Me.toolStripComboBoxSize.Size = New System.Drawing.Size(36, 25)
|
||||
' AddHandler Me.toolStripComboBoxSize.SelectedIndexChanged, New System.EventHandler(Me.toolStripComboBoxSize_SelectedIndexChanged)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
|
||||
Me.Controls.Add(Me.webBrowserBody)
|
||||
Me.Controls.Add(Me.toolStripToolBar)
|
||||
Me.Name = "HTMLTextBox"
|
||||
Me.Size = New System.Drawing.Size(600, 450)
|
||||
Me.toolStripToolBar.ResumeLayout(False)
|
||||
Me.toolStripToolBar.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
End Sub
|
||||
|
||||
Private toolStripToolBar As System.Windows.Forms.ToolStrip
|
||||
Private webBrowserBody As System.Windows.Forms.WebBrowser
|
||||
Private toolStripComboBoxName As System.Windows.Forms.ToolStripComboBox
|
||||
Private toolStripComboBoxSize As ToolStripComboBoxEx
|
||||
Private toolStripButtonBold As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonItalic As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonUnderline As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonColor As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripSeparatorFont As System.Windows.Forms.ToolStripSeparator
|
||||
Private toolStripButtonNumbers As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonBullets As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonOutdent As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonIndent As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripSeparatorFormat As System.Windows.Forms.ToolStripSeparator
|
||||
Private toolStripButtonLeft As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonCenter As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonRight As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonFull As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripSeparatorAlign As System.Windows.Forms.ToolStripSeparator
|
||||
Private toolStripButtonLine As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonHyperlink As System.Windows.Forms.ToolStripButton
|
||||
Private toolStripButtonPicture As System.Windows.Forms.ToolStripButton
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStripToolBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="toolStripButtonBold.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAC1JREFUOE9jYBh2
|
||||
4D/QR/gwUR5GNgCmAZsYTsMGlwHo4TESwoAq6YCogBpGigDXJzrGE301bAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonItalic.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADVJREFUOE9jYBj2
|
||||
4D/Qh+iYZE+DDVizYiaIJg1ANcFcQJpmqOpR28kIeWzxTnr0kRVfQ1cTAOjCLVxq2QiuAAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonUnderline.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAERJREFUOE9jYBh2
|
||||
4D/QR8gY5EFsYng9DtOArAibGE5DRg1AhDplgbhmxUxQYDJAaZJiAVvcgw2jC0BPddj4dHEI8ZYAADTJ
|
||||
N6c8hf3vAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonColor.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAGRJREFUOE9jYKAD
|
||||
+E+2HWtWzARp/g+lyTIHbAAUk2YAzHaYAeS4Atlm0lyBZDvM2SSHBbLf0dn4wwKL7SS7Ap9/8YcFHtuJ
|
||||
dgW+eCctLEhLNVDVQCv+E4uxWkCsZpA6slyITRMAH5Zv5oCq9bQAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonNumbers.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAALdJREFUOE9jYKAG
|
||||
ePTy13+f0lP/yTYrpOn+f4/8A+gGgPiEMMTOxy9//HdIXv3/6Pmn5LnCNXvHf4vw6f+N/TvIM4Bsv8M0
|
||||
BtXf+B9QfeX/rPU3yHfBztPv/9vELkA2gFAAItSeufntv2vW9v+Hzz0mzwWeBQf+W0bM+G/k20KeARQH
|
||||
on/Vxf++5ef+O6SsJt8FfhXn/m8+9IC8QAR5YcLK2//NgieQ5wKPwoPgQDx4+iF5BlASiADwc282sbGz
|
||||
ZAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonBullets.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAGlJREFUOE9jYKAG
|
||||
OHDmyf+C7kP/QTRZ5oE0h7Y8+S9rXQU3gIWJ5T8+jGIRyGaQ5jkrj5LnArKcTVVNo4FIheDcdeTG/8SK
|
||||
5f9BNFnGgTR7Fh39L2mcSV5KBNkM0jxr6V7yXECWs6mlCQDlBWMQibjNkwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonOutdent.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAKFJREFUOE9jYMAP
|
||||
/hOQp640yDZkDDIdXQwbn0qu+PTt7/8Fuz/8L5l8GdnfhF3w7M2f/3N2ff8f3f3uf0DNtf9PXn4lzYCw
|
||||
1of/Q5ru/fevvPjfIXn1f4vwaf9Ng/qID/3nb77/n7Hm6n/buEVAjb3/Hzz9QIwLMAPu09ef/ycsOvY/
|
||||
qmAeeQZQIy4GOB1gSXXIKZEaPiTPDOLTA3nmMzAAAFijgMKTQOD0AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonIndent.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAKVJREFUOE9jYMAP
|
||||
/hOQp640yDZkDDIdXQwbnwquCG1/8T+p//n/Kw9/oPuZOBdcefDrv1/js/9uFbf/z1x/+/+z119hBhE2
|
||||
IKzl0f/wtmf/g+pv/bdPXvXfLGTif5OAbtJC//r99/8tI2f9Nwns+R+cs+D/wdP3CLkANeAS63b8T65a
|
||||
/f/+03fEhgEVQh6LEQOYDqCuwecC2viZGFNJSw/EmIiuBgAein31gYqs0gAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonLeft.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBJREFUOE9jYBhM
|
||||
4D/QMfgw7d1KyAXI8rRxDSEX0MZWZFMJuWA0DFBTKe1jhH42AAD5sDjIZUq+7gAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonCenter.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBJREFUOE9jYBis
|
||||
4D/QYeiY9m7FZisuMdq6Bp9LBs7mwREjtPU/yPTBkw5o71dkGwCUJzHPYqsAPQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonRight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBJREFUOE9jYBis
|
||||
4D/QYfgwbdxNyFZkedq4ANlUQq6hjQsI2ToaBqgpkzaxMDCmAgDawTjIJO+/7AAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonFull.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAChJREFUOE9jYBgs
|
||||
4D/QIeRg6rmfHNtBeqgHRl1AXhoYbrFAvRRFqkkAJdBTrRhJgKYAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonLine.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAB9JREFUOE9jYBgF
|
||||
wywE/gP9QwrG8D4pmkFqR8HwCQEAckQX6SRiW/8AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonHyperlink.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAuZJREFUOE990HlI
|
||||
03EYx/H5R1DQPxF0QNFlKnRR9IdpTLsw1MQOqbTD0qhZuk67mDqtDJ3Z8kizuX7aqq2c5rKa1nQ6mVcp
|
||||
ai7MTLNGYSF2X/YuEioZ9cAXni+fh9cDj5Por+rstGF/h+jl8D5R6+enotGfholcv00SOY8dLpoydZbT
|
||||
37MOfVXTA4T2Sor6TQg9BRx/tImIlmksyDyILKcDU1Ud/wSsrc0ctUWT8+IE9752ceNJE8p2JdEVK1mY
|
||||
coalyd0sUakpt5ocka4uG/JSDdJWd87aoyl+cx3rgBnds3IkggE/RR+zhFNMvr2QVZeljoC18TFbs80E
|
||||
31jJnsdexDav4VBZDKF5xWxIeceKlKe4FfgzodCdaSofzA3moUihpZcjwjdWK7bhXe6Cn96f0EQjYac+
|
||||
sPHEW2bnKZig82SssIBxp72RF2UNBfKNLzmQD+FJVfglLMdDG4SnLpFVymeslb1nkSwc59QZjMx0YUyC
|
||||
FwfUGUMBQ2UHUbmwIxtC40wsUazDzbAYF00kXnGNLIs4hodEzOj4GcyUBqPRFw0FGpubiDr7ik3psDFp
|
||||
gIAYgemZ8xivcmN+dDDi7cV4bM5AHB5GYPh6HrbVOh4y/Uo9u850sy/tPjHZN9mXnk+IPB7fCDnu2+8Q
|
||||
sL+SHfJrJJ4zkJxbgnDNiKWm+g9kqq5BVViHrfs1A0D/R7hleUhkgoag/XoyddUOWUzqZUrKSgeRS4ZK
|
||||
Ou1vOJQkMNF9HXN8d3JSXUFeSQtZBXUUVrSTW9yAZ6AE/y1HyNLcRLheT1ScchBQqI0/94KrOISGe9UU
|
||||
mFp+/T9+B3s/tPZ8wWp7y97YZFoeNJCaV4a1rY+5vpJB4IL+LvVtdlJyriJNOIfyYimjZgYwwtnn9/Ne
|
||||
I/2daW/VcvK8kZDI2EHAUluDQmVAe7uRmrZeyuqfE5thwDdURppa+88sX6v7c8hyi5ljaRfwD5MhDtqN
|
||||
5HAiuiL9r4H/ZT8AiiIwr0t0DcYAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButtonPicture.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAkJJREFUOE+tk1tI
|
||||
02EYxr2MCKKLIOjCiIguopQIojAjpEDSkrwwpANKBUpJiWW5TFyQpcUSdOhopaazMrNpmZiJiiPtoM3p
|
||||
TJoLXJE680SHtc1fvv/Q/wiioD54L5/f8x6eLyjof7zCOx0EVn6FhdybrVwobkKT/5jUXDNJ2ioSMkzE
|
||||
p5USm2JkT7KBeW8Re338tj5/g7HpGVxjMwx88NPl9LNmZ9bfAdw2O/ZDodgOhmBttynisvpBVu84/2eA
|
||||
OIsYVwOepyd5vncFbXY/N2rfsCoiACAz/zrCXNu2AyE/xXkRWGKCaej2UXzPysrtmWoHsrBAQODM0rY4
|
||||
i/j+g9fUdPooMHUSvO2cCpBtzwH6B4c5kW1QqqPvkzKztC3OIq5s96IraWV5mEYFyKkE4BgaU4QO1zjW
|
||||
gVG2RiViqH5F+O7DShXV9FPa4iXP0MiyLRkqQO48J34/MsnQxy8863FT2dBLZFwS5idd1Lf0iICiR24u
|
||||
FtaxdNNZFSAhEedh9xST0x6sjgmM5rfcbnSin503Ov4YJXeb0V2vVSDaa9Us2XhGBUjCvnv9jE566HNO
|
||||
UfbQwdXyXnKML8k1WkjRmggJjyVFk09S+hUFsnhDugqQeI6Mf+VFn5uqpnfz4qyCFtIu15KcWU5MglaB
|
||||
RO47Tnh0IotCT6sAybbdOUFFXTfZ+jY0ukbScmpmhbdISNUTd/QS0fs1hO06wtrNUUotXB8AkI8h2ZZ4
|
||||
SsIkJHJnOZVsWxYmM0vb4iziBetOqR38y4/+Ac89P6VDkey1AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,415 @@
|
||||
Imports System
|
||||
Imports System.Collections.Generic
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Data
|
||||
Imports System.Text
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
Namespace McDull.Windows.Forms
|
||||
<Description("Provides a user control that allows the user to edit HTML page."), ClassInterface(ClassInterfaceType.AutoDispatch)>
|
||||
Public Partial Class HTMLTextBox
|
||||
Inherits UserControl
|
||||
|
||||
Public Sub New()
|
||||
dataUpdate = 0
|
||||
InitializeComponent()
|
||||
InitializeControls()
|
||||
End Sub
|
||||
|
||||
Public Overrides Property Text As String
|
||||
Get
|
||||
Return webBrowserBody.DocumentText
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
webBrowserBody.DocumentText = value.Replace(vbCrLf, "<br>")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Images As String()
|
||||
Get
|
||||
Dim imagestmp As List(Of String) = New List(Of String)()
|
||||
|
||||
For Each element As HtmlElement In webBrowserBody.Document.Images
|
||||
Dim image As String = element.GetAttribute("src")
|
||||
|
||||
If Not imagestmp.Contains(image) Then
|
||||
imagestmp.Add(image)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return imagestmp.ToArray()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub InitializeControls()
|
||||
BeginUpdate()
|
||||
|
||||
For Each family As FontFamily In FontFamily.Families
|
||||
toolStripComboBoxName.Items.Add(family.Name)
|
||||
Next
|
||||
|
||||
toolStripComboBoxSize.Items.AddRange(FontSize.All.ToArray())
|
||||
webBrowserBody.DocumentText = String.Empty
|
||||
AddHandler webBrowserBody.Document.Click, AddressOf webBrowserBody_DocumentClick
|
||||
AddHandler webBrowserBody.Document.Focusing, AddressOf webBrowserBody_DocumentFocusing
|
||||
webBrowserBody.Document.ExecCommand("EditMode", False, Nothing)
|
||||
webBrowserBody.Document.ExecCommand("LiveResize", False, Nothing)
|
||||
EndUpdate()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshToolBar()
|
||||
BeginUpdate()
|
||||
|
||||
Try
|
||||
Dim document = webBrowserBody.Document.DomDocument 'As mshtml.IHTMLDocument2 = CType(webBrowserBody.Document.DomDocument, mshtml.IHTMLDocument2)
|
||||
toolStripComboBoxName.Text = document.queryCommandValue("FontName").ToString()
|
||||
toolStripComboBoxSize.SelectedItem = FontSize.Find(CInt(document.queryCommandValue("FontSize")))
|
||||
toolStripButtonBold.Checked = document.queryCommandState("Bold")
|
||||
toolStripButtonItalic.Checked = document.queryCommandState("Italic")
|
||||
toolStripButtonUnderline.Checked = document.queryCommandState("Underline")
|
||||
toolStripButtonNumbers.Checked = document.queryCommandState("InsertOrderedList")
|
||||
toolStripButtonBullets.Checked = document.queryCommandState("InsertUnorderedList")
|
||||
toolStripButtonLeft.Checked = document.queryCommandState("JustifyLeft")
|
||||
toolStripButtonCenter.Checked = document.queryCommandState("JustifyCenter")
|
||||
toolStripButtonRight.Checked = document.queryCommandState("JustifyRight")
|
||||
toolStripButtonFull.Checked = document.queryCommandState("JustifyFull")
|
||||
Catch e As Exception
|
||||
System.Diagnostics.Debug.WriteLine(e)
|
||||
Finally
|
||||
EndUpdate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private dataUpdate As Integer
|
||||
|
||||
Private ReadOnly Property Updating As Boolean
|
||||
Get
|
||||
Return dataUpdate<> 0
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub BeginUpdate()
|
||||
dataUpdate += 1
|
||||
End Sub
|
||||
|
||||
Private Sub EndUpdate()
|
||||
dataUpdate -= 1
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripComboBoxName_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("FontName", False, toolStripComboBoxName.Text)
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripComboBoxSize_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim size As Integer = If((toolStripComboBoxSize.SelectedItem Is Nothing), 1, (TryCast(toolStripComboBoxSize.SelectedItem, FontSize)).Value)
|
||||
webBrowserBody.Document.ExecCommand("FontSize", False, size)
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonBold_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("Bold", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonItalic_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("Italic", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonUnderline_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("Underline", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonColor_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' Dim fontcolor As Integer = CInt((CType(webBrowserBody.Document.DomDocument, mshtml.IHTMLDocument2)).queryCommandValue("ForeColor"))
|
||||
Dim dialog As ColorDialog = New ColorDialog()
|
||||
''' Cannot convert ExpressionStatementSyntax, System.ArgumentOutOfRangeException: Exception of type 'System.ArgumentOutOfRangeException' was thrown.
|
||||
''' Parameter name: op
|
||||
''' Actual value was RightShiftExpression.
|
||||
''' at ICSharpCode.CodeConverter.Util.VBUtil.GetExpressionOperatorTokenKind(SyntaxKind op)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitBinaryExpression(BinaryExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.BinaryExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitBinaryExpression(BinaryExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.BinaryExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitParenthesizedExpression(ParenthesizedExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ParenthesizedExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitParenthesizedExpression(ParenthesizedExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ParenthesizedExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitBinaryExpression(BinaryExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.BinaryExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitBinaryExpression(BinaryExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.BinaryExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitArgument(ArgumentSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ArgumentSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitArgument(ArgumentSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ArgumentSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.<VisitArgumentList>b__99_0(ArgumentSyntax a)
|
||||
''' at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
|
||||
''' at Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory.SeparatedList[TNode](IEnumerable`1 nodes)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitArgumentList(ArgumentListSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ArgumentListSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitArgumentList(ArgumentListSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ArgumentListSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitInvocationExpression(InvocationExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitInvocationExpression(InvocationExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.MakeAssignmentStatement(AssignmentExpressionSyntax node)
|
||||
''' at ICSharpCode.CodeConverter.VB.NodesVisitor.VisitAssignmentExpression(AssignmentExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.AssignmentExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitAssignmentExpression(AssignmentExpressionSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.AssignmentExpressionSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at ICSharpCode.CodeConverter.VB.MethodBodyVisitor.ConvertSingleExpression(ExpressionSyntax node)
|
||||
''' at ICSharpCode.CodeConverter.VB.MethodBodyVisitor.VisitExpressionStatement(ExpressionStatementSyntax node)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionStatementSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
|
||||
''' at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.Visit(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
|
||||
''' at ICSharpCode.CodeConverter.VB.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)
|
||||
'''
|
||||
''' Input:
|
||||
''' dialog.Color = Color.FromArgb(0xff, fontcolor & 0xff, (fontcolor >> 8) & 0xff, (fontcolor >> 16) & 0xff);
|
||||
|
||||
'''
|
||||
Dim result As DialogResult = dialog.ShowDialog()
|
||||
|
||||
If result = DialogResult.OK Then
|
||||
Dim color As String = dialog.Color.Name
|
||||
|
||||
If Not dialog.Color.IsNamedColor Then
|
||||
color = "#" & color.Remove(0, 2)
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("ForeColor", False, color)
|
||||
End If
|
||||
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonNumbers_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("InsertOrderedList", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonBullets_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("InsertUnorderedList", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonOutdent_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("Outdent", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonIndent_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("Indent", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonLeft_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("JustifyLeft", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonCenter_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("JustifyCenter", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonRight_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("JustifyRight", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonFull_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("JustifyFull", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonLine_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("InsertHorizontalRule", False, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonHyperlink_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("CreateLink", True, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub toolStripButtonPicture_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If Updating Then
|
||||
Return
|
||||
End If
|
||||
|
||||
webBrowserBody.Document.ExecCommand("InsertImage", True, Nothing)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub webBrowserBody_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub webBrowserBody_PreviewKeyDown(ByVal sender As Object, ByVal e As PreviewKeyDownEventArgs)
|
||||
If e.IsInputKey Then
|
||||
Return
|
||||
End If
|
||||
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub webBrowserBody_DocumentClick(ByVal sender As Object, ByVal e As HtmlElementEventArgs)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Sub webBrowserBody_DocumentFocusing(ByVal sender As Object, ByVal e As HtmlElementEventArgs)
|
||||
RefreshToolBar()
|
||||
End Sub
|
||||
|
||||
Private Class FontSize
|
||||
Private Shared allFontSize As List(Of FontSize) = Nothing
|
||||
|
||||
Public Shared ReadOnly Property All As List(Of FontSize)
|
||||
Get
|
||||
|
||||
If allFontSize Is Nothing Then
|
||||
allFontSize = New List(Of FontSize)()
|
||||
allFontSize.Add(New FontSize(8, 1))
|
||||
allFontSize.Add(New FontSize(10, 2))
|
||||
allFontSize.Add(New FontSize(12, 3))
|
||||
allFontSize.Add(New FontSize(14, 4))
|
||||
allFontSize.Add(New FontSize(18, 5))
|
||||
allFontSize.Add(New FontSize(24, 6))
|
||||
allFontSize.Add(New FontSize(36, 7))
|
||||
End If
|
||||
|
||||
Return allFontSize
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared Function Find(ByVal value As Integer) As FontSize
|
||||
If value< 1 Then
|
||||
Return All(0)
|
||||
End If
|
||||
|
||||
If value > 7 Then
|
||||
Return All(6)
|
||||
End If
|
||||
|
||||
Return All(value - 1)
|
||||
End Function
|
||||
|
||||
Private Sub New(ByVal display As Integer, ByVal value As Integer)
|
||||
displaySize = display
|
||||
valueSize = value
|
||||
End Sub
|
||||
|
||||
Private valueSize As Integer
|
||||
|
||||
Public ReadOnly Property Value As Integer
|
||||
Get
|
||||
Return valueSize
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private displaySize As Integer
|
||||
|
||||
Public ReadOnly Property Display As Integer
|
||||
Get
|
||||
Return displaySize
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return displaySize.ToString()
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class ToolStripComboBoxEx
|
||||
Inherits ToolStripComboBox
|
||||
|
||||
Public Overrides Function GetPreferredSize(ByVal constrainingSize As Size) As Size
|
||||
Dim size As Size = MyBase.GetPreferredSize(constrainingSize)
|
||||
size.Width = Math.Max(Width, &H20)
|
||||
Return size
|
||||
End Function
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
30
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/KdSearchBox.Designer.vb
generated
Normal file
30
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/KdSearchBox.Designer.vb
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
Partial Class KdSearchBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
|
||||
|
||||
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,923 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
'Imports System.Threading
|
||||
|
||||
Public Class KdSearchBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
' Dim sql As New SDL.SQL
|
||||
' Dim KUNDENSQL As New SDL.kundenSQL
|
||||
Dim form As Form = Me.FindForm
|
||||
'Public KdData As SDL.cKundenFMZOLL
|
||||
Public KdData_KUNDE As cKunde = Nothing
|
||||
Public KdData_ADRESSEN As cAdressen = Nothing
|
||||
Public KdData_KUNDE_ERW As cKundenErweitert = Nothing
|
||||
|
||||
Public Property searchActive As Boolean = True
|
||||
Public Property _AllowSetValue As Boolean = False
|
||||
Public Property _displayFullName As Boolean = False ' nur wenn _loadKdData
|
||||
Public Property _display_Name1 As Boolean = False ' nur wenn _loadKdData
|
||||
|
||||
Public Property _ValueKdAndName As Boolean = True
|
||||
Public Property _searchName1 As Boolean = True
|
||||
Public Property _loadKdData As Boolean = False
|
||||
|
||||
Public Property _hideIfListEmpty As Boolean = True
|
||||
Public Property _displayWoelflKd As Boolean = False
|
||||
Public Property _displayAVISO_Email As Boolean = False
|
||||
Public Property nurAktive As Boolean = True
|
||||
Public Property kdNrField As Control = Nothing
|
||||
Public Property dgvpos As String = "LEFT"
|
||||
Public Property _autoSizeGross As Boolean = False
|
||||
Public Property _AlleFirmenCLUSTER As Boolean = False
|
||||
Public Property _UseFIRMA As String = ""
|
||||
|
||||
Dim last_search As DateTime = Now
|
||||
Dim last_eingabe As DateTime = Now
|
||||
Public Property TIMER_SEARCH As Boolean = True
|
||||
Dim Eingabe_verarbeitet = True
|
||||
Dim WithEvents tmr_Search As New Timer
|
||||
|
||||
|
||||
Public usrcntlWIDTH = 600
|
||||
Public usrcntlHEIGHT = 380
|
||||
|
||||
Public WithEvents usrcntl As usrcntlKdSearch '= DirectCast(Me.FindForm.Controls.Find("dgvFindKD", False)(0), DataGridView)
|
||||
|
||||
' Public WithEvents dgv As DataGridView
|
||||
' Public WithEvents dgvInaktiv As DataGridView
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Public Sub FireReturn()
|
||||
dgvFindKD_Click(Me, New KeyEventArgs(Keys.Return))
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnPaint(e As PaintEventArgs)
|
||||
Try
|
||||
MyBase.OnPaint(e)
|
||||
Catch ex As Exception
|
||||
Me.Invalidate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_GotFocus(sender As Object, e As EventArgs) Handles Me.GotFocus
|
||||
Try
|
||||
Me.SelectionLength = 0
|
||||
Me.HideSelection = False
|
||||
Me.SelectAll()
|
||||
Me.Select()
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_01")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub RESARCH()
|
||||
KdSearchBox_KeyUp(Me, New KeyEventArgs(Keys.Space))
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
Try
|
||||
'Console.WriteLine(String.Format("TEEST 01"))
|
||||
If Not searchActive Then Exit Sub
|
||||
|
||||
' If dgv Is Nothing Then dgv = usrcntl.dgvKundenAktiv
|
||||
' If dgvInaktiv Is Nothing Then dgvInaktiv = usrcntl.dgvKundenInAktiv
|
||||
|
||||
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
If usrcntl IsNot Nothing Then usrcntl.Visible = False
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If e.KeyCode = Keys.ShiftKey Or e.KeyCode = Keys.Shift Or e.KeyCode = Keys.Alt Or e.KeyCode = Keys.Control Or e.KeyCode = Keys.Left Or e.KeyCode = Keys.Right Or e.KeyCode = Keys.End Or e.KeyCode = Keys.Home Or e.KeyCode = Keys.CapsLock Then 'Bei Shift Tab..
|
||||
If usrcntl IsNot Nothing Then usrcntl.Visible = False
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If e.KeyCode = Keys.Return Then
|
||||
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If e.KeyCode = Keys.Up Then
|
||||
If usrcntl IsNot Nothing Then prevLKW(usrcntl.dgvKundenAktiv)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
If e.KeyCode = Keys.Down Then
|
||||
If usrcntl IsNot Nothing Then nextLKW(usrcntl.dgvKundenAktiv)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
If e.KeyCode = Keys.Escape Then
|
||||
hideDgv(usrcntl)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If kdNrField IsNot Nothing Then kdNrField.Text = ""
|
||||
|
||||
KdNr_value = -1
|
||||
KdData_KUNDE = Nothing
|
||||
KdData_ADRESSEN = Nothing
|
||||
KdData_KUNDE_ERW = Nothing
|
||||
|
||||
If Me.Text.Trim = "" Then
|
||||
KdNr = -1
|
||||
KdName = ""
|
||||
' KdData = Nothing
|
||||
KdData_KUNDE = Nothing
|
||||
KdData_ADRESSEN = Nothing
|
||||
KdData_KUNDE_ERW = Nothing
|
||||
setMeValue()
|
||||
hideDgv(usrcntl)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If usrcntl Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Eingabe_verarbeitet = False
|
||||
last_eingabe = Now
|
||||
|
||||
doKeyDown(Now)
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_02")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub doKeyDown(srchdate As DateTime)
|
||||
Try
|
||||
If usrcntl Is Nothing Then Exit Sub
|
||||
If Eingabe_verarbeitet Then Exit Sub ' Bereits abgearbetiet -> Timer
|
||||
|
||||
Dim span_last_search = CInt(DirectCast((srchdate - last_search), TimeSpan).TotalMilliseconds)
|
||||
Dim span_last_eingabe = CInt(DirectCast((srchdate - last_eingabe), TimeSpan).TotalMilliseconds)
|
||||
|
||||
'TIMER_SEARCH
|
||||
If TIMER_SEARCH Then
|
||||
If span_last_search < 500 And span_last_eingabe < 500 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
usrcntl.Width = usrcntlWIDTH
|
||||
usrcntl.Height = usrcntlHEIGHT
|
||||
|
||||
Dim locationOnForm As Point = Nothing
|
||||
If Me.FindForm IsNot Nothing Then
|
||||
If dgvpos = "LEFT" Or dgvpos = "" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
ElseIf dgvpos = "RIGHT" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
locationOnForm.X = locationOnForm.X - (usrcntl.Width - Me.Width)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If locationOnForm.Y + usrcntl.Height + Me.Height > form.ClientRectangle.Height Then
|
||||
usrcntl.Height = form.ClientRectangle.Height - locationOnForm.Y - Me.Height
|
||||
End If
|
||||
|
||||
usrcntl.Location = locationOnForm
|
||||
usrcntl.Top += Me.Height
|
||||
End If
|
||||
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
|
||||
With usrcntl.dgvKundenAktiv
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.ReadOnly = True
|
||||
.MultiSelect = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.BackgroundColor = Color.White
|
||||
.ForeColor = Color.Black
|
||||
Try
|
||||
.GridColor = Color.White
|
||||
Catch ex As Exception
|
||||
'Keine Ahnung warum hier ein Fehler kommt
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'THREADING AKTIV
|
||||
Me.ThreadInitAKTIV()
|
||||
' Dim ThreadInitAKTIV = New System.Threading.Thread(AddressOf Me.ThreadInitAKTIV)
|
||||
' ThreadInitAKTIV.IsBackground = True
|
||||
' ThreadInitAKTIV.Start()
|
||||
|
||||
End With
|
||||
End If
|
||||
|
||||
If nurAktive Then
|
||||
usrcntl.dgvKundenInAktiv.Visible = False
|
||||
usrcntl.Panel1.Visible = False
|
||||
Else
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
|
||||
With usrcntl.dgvKundenInAktiv
|
||||
If usrcntl.Visible = False Then
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.ReadOnly = True
|
||||
.MultiSelect = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.BackgroundColor = Color.White
|
||||
.ForeColor = Color.Black
|
||||
Try
|
||||
.GridColor = Color.White
|
||||
Catch ex As Exception
|
||||
'Keine Ahnung warum hier ein Fehler kommt
|
||||
End Try
|
||||
.DefaultCellStyle.ForeColor = Color.Gray
|
||||
End If
|
||||
|
||||
|
||||
Me.ThreadInitINAKTIV()
|
||||
'THREADING INAKTIV
|
||||
'Dim ThreadInitINAKTIV = New System.Threading.Thread(AddressOf Me.ThreadInitINAKTIV)
|
||||
'ThreadInitINAKTIV.IsBackground = True
|
||||
'ThreadInitINAKTIV.Start()
|
||||
|
||||
End With
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If _hideIfListEmpty Then
|
||||
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
If False Then
|
||||
|
||||
'THREADING ThreadWaitAndSee
|
||||
Dim ThreadWaitAndSee = New System.Threading.Thread(Sub()
|
||||
Threading.Thread.Sleep(200)
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
End Sub)
|
||||
ThreadWaitAndSee.IsBackground = True
|
||||
ThreadWaitAndSee.Start()
|
||||
End If
|
||||
Else
|
||||
usrcntl.Visible = True
|
||||
usrcntl.Show()
|
||||
usrcntl.BringToFront()
|
||||
End If
|
||||
Eingabe_verarbeitet = True
|
||||
last_search = Now
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub hideDgv(o) '(sender As Object, e As EventArgs)
|
||||
If o IsNot Nothing Then
|
||||
Me.searchActive = False
|
||||
o.visible = False
|
||||
Me.searchActive = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub ThreadInitAKTIV()
|
||||
Try
|
||||
If usrcntl Is Nothing Then Exit Sub
|
||||
If usrcntl.dgvKundenAktiv Is Nothing Then Exit Sub
|
||||
With usrcntl.dgvKundenAktiv
|
||||
|
||||
Dim srch As String = Me.Text.Replace("'", "").ToString.Trim
|
||||
If srch.StartsWith("*") Then srch = Replace(srch, "*", "%", , 1) ' Suche mit beginnenden *
|
||||
|
||||
Dim srch2 As String = ""
|
||||
If srch.Contains(",") Then
|
||||
Dim spitter() = srch.Split(",")
|
||||
srch = spitter(0).ToString.Trim
|
||||
srch2 = spitter(1).ToString.Trim
|
||||
End If
|
||||
If srch2.StartsWith("*") Then srch2 = Replace(srch2, "*", "%", , 1) ' Suche mit beginnenden *
|
||||
|
||||
Dim topAnz = 10
|
||||
If nurAktive Then topAnz = 16
|
||||
Dim AvisoEmail = ""
|
||||
If _displayAVISO_Email Then
|
||||
AvisoEmail = ", (SELECT CASE WHEN Count(*)>0 Then 'JA' ELSE '' END [Adressen] FROM [tblEmailBenachrichtigung] WHERE [eb_KundenNr]=AdressenNr) as [E-Mail] "
|
||||
End If
|
||||
Dim SQLstr As String = " SELECT top " & topAnz & " Ordnungsbegriff as Firma, AdressenNr as KdNr,Adressen.[LandKz] + ' ' + Adressen.[PLZ] + ' - ' + Adressen.[Ort] + ' ' + Adressen.[Straße] as Adresse " & AvisoEmail & " "
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Or _AlleFirmenCLUSTER Or _UseFIRMA <> "" Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstr &= " FROM [Adressen] "
|
||||
SQLstr &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstr &= " WHERE 1=1 "
|
||||
SQLstr &= " AND ( "
|
||||
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstr &= " ) "
|
||||
If srch2 <> "" Then SQLstr &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
SQLstr &= " AND [Auswahl]='A' "
|
||||
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER <> "" Then
|
||||
' SQLstr &= " AND (Filialen.Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' OR Filialen.CLUSTER='" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "') "
|
||||
'Else
|
||||
' SQLstr &= " AND Filialen.Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' "
|
||||
'End If
|
||||
|
||||
If _AlleFirmenCLUSTER Then
|
||||
SQLstr &= " AND '" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
ElseIf _UseFIRMA <> "" Then
|
||||
SQLstr &= " AND '" & _UseFIRMA & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
Else
|
||||
SQLstr &= " AND ( '" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG") & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('IMEX') " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('IMEX','VERAG') " ' Wenn die OFFERTE_FREMD_VERAGIMEX --> Beide
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_UNISPED_BREXIT", "SDL") Then
|
||||
SQLstr &= " OR (Filialen.Firma IN ('UNISPED') AND Kunden.[FilialenNr]=7002) " ' Wenn die OFFERTE_FREMD_VERAGIMEX --> Beide
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_FRONTOFFICE", "SDL") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('FRONTOFFICE') " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
End If
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
'AUSNAHME BIS BESSERE LÖSUNG:
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then
|
||||
SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') "
|
||||
End If
|
||||
|
||||
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'Keine
|
||||
' SQLstr &= " AND isnull(Kunden.[FilialenNr],0) NOT IN ('5701') "
|
||||
'ElseIf VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" And VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "ATILLA" Then
|
||||
' SQLstr &= " AND Kunden.[FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
|
||||
'Else
|
||||
' 'SQLstr &= " AND isnull(Kunden.[FilialenNr],0)<>'5501' "
|
||||
' SQLstr &= " AND isnull(Kunden.[FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
|
||||
'End If
|
||||
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
|
||||
SQLstr &= " order by Ordnungsbegriff "
|
||||
|
||||
setDS(usrcntl.dgvKundenAktiv, SQL.loadDgvBySql(SQLstr, "FMZOLL"))
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_03")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub ThreadInitINAKTIV()
|
||||
Try
|
||||
If usrcntl Is Nothing Then Exit Sub
|
||||
If usrcntl.dgvKundenInAktiv Is Nothing Then Exit Sub
|
||||
With usrcntl.dgvKundenInAktiv
|
||||
|
||||
Dim srch As String = Me.Text.Replace("'", "").ToString.Trim
|
||||
If srch.StartsWith("*") Then srch = Replace(srch, "*", "%", , 1) ' Suche mit beginnenden *
|
||||
|
||||
Dim srch2 As String = ""
|
||||
If srch.Contains(",") Then
|
||||
Dim spitter() = srch.Split(",")
|
||||
srch = spitter(0).ToString.Trim
|
||||
srch2 = spitter(1).ToString.Trim
|
||||
End If
|
||||
If srch2.StartsWith("*") Then srch2 = Replace(srch2, "*", "%", , 1) ' Suche mit beginnenden *
|
||||
|
||||
Dim SQLstr As String = " SELECT top 4 Ordnungsbegriff as Firma, AdressenNr as KdNr,Adressen.[LandKz] + ' ' + Adressen.[PLZ] + ' - ' + Adressen.[Ort] + ' ' + Adressen.[Straße] as Adresse "
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Or _AlleFirmenCLUSTER Or _UseFIRMA <> "" Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstr &= " FROM [Adressen] "
|
||||
SQLstr &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstr &= " WHERE 1=1 "
|
||||
SQLstr &= " AND ( "
|
||||
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstr &= " ) "
|
||||
If srch2 <> "" Then SQLstr &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
SQLstr &= " AND [Auswahl]='I' "
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'Keine
|
||||
' SQLstr &= " AND isnull(Kunden.[FilialenNr],0) NOT IN ('5701') "
|
||||
'ElseIf VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" And VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "ATILLA" Then
|
||||
' SQLstr &= " AND Kunden.[FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
|
||||
'Else
|
||||
' 'SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
|
||||
' SQLstr &= " AND isnull(Kunden.[FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
|
||||
'End If
|
||||
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER <> "" Then
|
||||
' SQLstr &= " AND (Filialen.Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' OR Filialen.CLUSTER='" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "') "
|
||||
'Else
|
||||
' SQLstr &= " AND Filialen.Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' "
|
||||
'End If
|
||||
|
||||
If _AlleFirmenCLUSTER Then
|
||||
SQLstr &= " AND '" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
ElseIf _UseFIRMA <> "" Then
|
||||
SQLstr &= " AND '" & _UseFIRMA & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
Else
|
||||
SQLstr &= " AND ( '" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA.Replace("ATILLA", "VERAG") & "' IN (Filialen.Firma,Filialen.Cluster) " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('IMEX') " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('IMEX','VERAG') " ' Wenn die OFFERTE_FREMD_VERAGIMEX --> Beide
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_UNISPED_BREXIT", "SDL") Then
|
||||
SQLstr &= " OR (Filialen.Firma IN ('UNISPED') AND Kunden.[FilialenNr]=7002) " ' Wenn die OFFERTE_FREMD_VERAGIMEX --> Beide
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_FRONTOFFICE", "SDL") Then
|
||||
SQLstr &= " OR Filialen.Firma IN ('FRONTOFFICE') " ' Wenn die Firmenbezeichnung im CLUSter vorkommt .--> Frontoffice
|
||||
End If
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
|
||||
'AUSNAHME BIS BESSERE LÖSUNG:
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then
|
||||
SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') "
|
||||
End If
|
||||
|
||||
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
|
||||
SQLstr &= " order by Ordnungsbegriff "
|
||||
|
||||
setDS(usrcntl.dgvKundenInAktiv, SQL.loadDgvBySql(SQLstr, "FMZOLL"))
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_04")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'threadsicherer Aufruf
|
||||
' Delegate Sub setLabelCallback(l As DataGridView, t As DataTable)
|
||||
Private Sub setDS(l As DataGridView, t As DataTable)
|
||||
Try
|
||||
If l Is Nothing Then Exit Sub
|
||||
If t Is Nothing Then Exit Sub
|
||||
'' If Me.InvokeRequired Then
|
||||
'Dim d As New setLabelCallback(AddressOf setDS)
|
||||
' Me.Invoke(d, New Object() {l, t})
|
||||
' Else
|
||||
With l
|
||||
.Columns.Clear()
|
||||
.DataSource = t
|
||||
If .ColumnCount = 0 Then Exit Sub
|
||||
|
||||
.RowHeadersVisible = False
|
||||
|
||||
If .Columns("KdNr") IsNot Nothing AndAlso .Columns("KdNr") IsNot DBNull.Value Then .Columns("KdNr").Width = 60 : .Columns("KdNr").HeaderText = "KundenNr"
|
||||
If .Columns("Firma") IsNot Nothing AndAlso .Columns("Firma") IsNot DBNull.Value Then .Columns("Firma").Width = 250
|
||||
If .Columns("Adresse") IsNot Nothing AndAlso .Columns("Adresse") IsNot DBNull.Value Then .Columns("Adresse").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
If .Columns("E-Mail") IsNot Nothing AndAlso .Columns("E-Mail") IsNot DBNull.Value Then .Columns("E-Mail").Width = 50 : .Columns("E-Mail").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
|
||||
If .Columns("Firma_Intern") IsNot Nothing AndAlso .Columns("Firma_Intern") IsNot DBNull.Value Then .Columns("Firma_Intern").Width = 60 : .Columns("Firma_Intern").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter : .Columns("Firma_Intern").HeaderText = ""
|
||||
|
||||
.ClearSelection()
|
||||
End With
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
' Try
|
||||
' MsgBox("Es ist ein Fehler beim Kunden-Such-Feld aufgetreten 05: " & vbNewLine & vbNewLine & ex.Message)
|
||||
'Catch ex2 As Exception
|
||||
' MsgBox("ERR", vbCritical)
|
||||
'End Try
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'threadsicherer Aufruf
|
||||
'Delegate Sub setObjectVisibleCallback(l As Object, v As Boolean)
|
||||
Private Sub setObjectVisible(l As Object, v As Boolean)
|
||||
Try
|
||||
If l Is Nothing Then Exit Sub
|
||||
' If Me.InvokeRequired Then
|
||||
' Dim d As New setObjectVisibleCallback(AddressOf setObjectVisible)
|
||||
'Me.Invoke(d, New Object() {l, v})
|
||||
' Else
|
||||
l.visible = v
|
||||
If v = True Then
|
||||
l.Show()
|
||||
l.BringToFront()
|
||||
End If
|
||||
' End If
|
||||
Catch ex As Exception
|
||||
' MsgBox("Es ist ein Fehler beim Kunden-Such-Feld aufgetreten 06: " & vbNewLine & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub nextLKW(dgv As DataGridView) '(sender As Object, e As EventArgs)
|
||||
Try
|
||||
If dgv.SelectedRows.Count > 0 Then
|
||||
Dim i As Integer = dgv.SelectedRows(0).Index
|
||||
If (i + 1 < dgv.RowCount) Then
|
||||
'dgv.CurrentCell = dgv.Item(2, i + 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(i + 1).Selected = True
|
||||
End If
|
||||
Else
|
||||
If dgv.Rows.Count > 0 Then ' dgv.CurrentCell = dgv.Item(2, 0)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(0).Selected = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_03_1")
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub prevLKW(dgv As DataGridView) '(sender As Object, e As EventArgs)
|
||||
Try
|
||||
If dgv.SelectedRows.Count > 0 Then
|
||||
Dim i As Integer = dgv.SelectedRows(0).Index
|
||||
If (i > 0) Then
|
||||
'dgv.CurrentCell = dgv.Item(2, i - 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(i - 1).Selected = True
|
||||
End If
|
||||
Else
|
||||
If dgv.Rows.Count > 0 Then 'dgv.CurrentCell = dgv.Item(2, dgv.Rows.Count - 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(dgv.Rows.Count - 1).Selected = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_06")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub usrcntl_CLOSE(sender As Object, e As EventArgs) Handles usrcntl.CLOSE
|
||||
hideDgv(usrcntl)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As EventArgs) Handles usrcntl.DGV_Click
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenAktiv
|
||||
If .SelectedRows.Count > 0 Then
|
||||
If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
KdNr = .SelectedRows(0).Cells("KdNr").Value
|
||||
KdName = .SelectedRows(0).Cells("Firma").Value
|
||||
setMeValue()
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_07")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub dgvFindKD_Click2(sender As Object, e As EventArgs) Handles usrcntl.DGV_INAKTIV_Click
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenInAktiv
|
||||
If .SelectedRows.Count > 0 Then
|
||||
If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
KdNr = .SelectedRows(0).Cells("KdNr").Value
|
||||
KdName = .SelectedRows(0).Cells("Firma").Value
|
||||
setMeValue()
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_08")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub TextBox1_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown
|
||||
Try
|
||||
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
If e.KeyData = Keys.Tab And usrcntl.Visible Then ' wenn usrcntl eingeblendet, soll der TABULATOR als InputKey gesehen werden.
|
||||
If usrcntl.dgvKundenAktiv.SelectedRows.Count > 0 Then e.IsInputKey = True Else usrcntl.Visible = False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_09")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, usrcntl.DGV_KeyDown
|
||||
Try
|
||||
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
|
||||
last_search = Now.AddSeconds(-10)
|
||||
doKeyDown(Now) ' Damit Suche-Timer sicherausgelöst wurde
|
||||
' System.Threading.Thread.Sleep(5000)
|
||||
End If
|
||||
|
||||
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenAktiv
|
||||
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
|
||||
If e.KeyCode = Keys.Return And .RowCount > 0 And .SelectedRows.Count = 0 Then .Rows(0).Selected = True
|
||||
If .SelectedRows.Count > 0 Then
|
||||
If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
KdNr = .SelectedRows(0).Cells("KdNr").Value
|
||||
KdName = .SelectedRows(0).Cells("Firma").Value
|
||||
setMeValue()
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
Else
|
||||
usrcntl.Visible = False
|
||||
End If
|
||||
e.Handled = True
|
||||
e.SuppressKeyPress = True
|
||||
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_10")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub dgvFindKD_Click2(sender As Object, e As KeyEventArgs) Handles usrcntl.DGV_KeyDown
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenInAktiv
|
||||
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
|
||||
If .SelectedRows.Count > 0 Then
|
||||
If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
KdNr = .SelectedRows(0).Cells("KdNr").Value
|
||||
KdName = .SelectedRows(0).Cells("Firma").Value
|
||||
setMeValue()
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
Else
|
||||
usrcntl.Visible = False
|
||||
End If
|
||||
|
||||
e.Handled = True
|
||||
e.SuppressKeyPress = True
|
||||
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_11")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub reloadKdData()
|
||||
Me.KdData_KUNDE = New cKunde(KdNr_value)
|
||||
Me.KdData_ADRESSEN = New cAdressen(KdNr_value)
|
||||
Me.KdData_KUNDE_ERW = New cKundenErweitert(KdNr_value)
|
||||
|
||||
End Sub
|
||||
|
||||
Sub setMeValue()
|
||||
Try
|
||||
If Me.kdNrField IsNot Nothing Then Me.kdNrField.Text = IIf(Me.KdNr_value > 0, Me.KdNr_value, "")
|
||||
If _AllowSetValue Then
|
||||
If _loadKdData Then 'Kundendaten sollen mitgeladen werden...
|
||||
' Me.KdData = KUNDENSQL.getKundeFMZOLLByKdNr(KdNr_value)
|
||||
Me.KdData_KUNDE = New cKunde(KdNr_value)
|
||||
Me.KdData_ADRESSEN = New cAdressen(KdNr_value)
|
||||
Me.KdData_KUNDE_ERW = New cKundenErweitert(KdNr_value)
|
||||
|
||||
If Me.KdData_ADRESSEN Is Nothing Then
|
||||
KdName = ""
|
||||
Me.Text = ""
|
||||
|
||||
Else
|
||||
KdName = KdData_ADRESSEN.Ordnungsbegriff
|
||||
If _ValueKdAndName Then
|
||||
If KdNr_value > 0 Then
|
||||
|
||||
If _displayFullName Then
|
||||
Me.Text = KdNr_value & " - " & (Me.KdData_ADRESSEN.Name_1 & " " & Me.KdData_ADRESSEN.Name_2).Trim
|
||||
ElseIf _display_Name1 Then
|
||||
Me.Text = KdNr_value & " - " & Me.KdData_ADRESSEN.Name_1
|
||||
Else
|
||||
Me.Text = KdNr_value & " - " & KdName
|
||||
End If
|
||||
Else
|
||||
KdName = ""
|
||||
Me.Text = ""
|
||||
End If
|
||||
' -1 |-|
|
||||
'If Me.Text.Trim = "-" Then Me.Text = ""
|
||||
' Me.Text = KdNr_value & " - " & IIf(_displayFullName, (Me.KdData_ADRESSEN.Name_1 & " " & Me.KdData_ADRESSEN.Name_2).Trim, KdName)
|
||||
Else
|
||||
If _displayFullName Then
|
||||
Me.Text = (Me.KdData_ADRESSEN.Name_1 & " " & Me.KdData_ADRESSEN.Name_2).Trim
|
||||
ElseIf _display_Name1 Then
|
||||
Me.Text = Me.KdData_ADRESSEN.Name_1
|
||||
Else
|
||||
Me.Text = KdName
|
||||
End If
|
||||
|
||||
' Me.Text = IIf(_displayFullName, (Me.KdData_ADRESSEN.Name_1 & " " & Me.KdData_ADRESSEN.Name_2).Trim, KdName)
|
||||
End If
|
||||
End If
|
||||
Else '... wenn nicht sollte beim Binding auch KdName gesetzt sein, sonst wird dieser nicht geladen
|
||||
If KdNr_value > 0 Then
|
||||
' If KdName = "" Then
|
||||
KdName = SQL.getValueTxtBySql("SELECT Ordnungsbegriff FROM Adressen WHERE AdressenNr =" & KdNr_value, "FMZOLL")
|
||||
If _ValueKdAndName Then
|
||||
Me.Text = KdNr_value & " - " & KdName
|
||||
Else
|
||||
Me.Text = KdName
|
||||
End If
|
||||
Else
|
||||
KdName = ""
|
||||
Me.Text = ""
|
||||
End If
|
||||
End If
|
||||
' searchActive = False
|
||||
|
||||
End If
|
||||
If Me.Text.Length > Me.MaxLength Then Me.Text = Me.Text.Substring(0, Me.MaxLength)
|
||||
Eingabe_verarbeitet = True
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_12")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public KdNr_value As Integer = -1 'Hier ist der richtige Wert drin...
|
||||
Public Property KdName As String 'Muss vom Typ String sein, sonst geht es nicht... (BINDING NULL VALUE)
|
||||
|
||||
Public Property KdNr As String
|
||||
Get
|
||||
Return KdNr_value
|
||||
End Get
|
||||
Set(v As String)
|
||||
Try
|
||||
KdNr_value = IIf(IsNumeric(v), v, -1)
|
||||
OnPropertyChanged("KdNr")
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_14")
|
||||
End Try
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub setKdNrKeepName()
|
||||
Dim nameTmp = KdName
|
||||
KdNr = -1
|
||||
KdName = nameTmp
|
||||
Me.Text = nameTmp
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function getFirma() As String
|
||||
If Me.KdData_KUNDE IsNot Nothing And KdNr_value > 0 Then
|
||||
Return VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(Me.KdData_KUNDE.FilialenNr,, "")
|
||||
End If
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
Public Function checkFirma(FirmaPruef As String) As Boolean
|
||||
Dim KdFirma = getFirma()
|
||||
If KdFirma <> "" And FirmaPruef <> "" And KdNr_value > 0 Then
|
||||
If KdFirma <> FirmaPruef Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Property KdNrNullInt As Object
|
||||
Get
|
||||
If KdNr_value > 0 Then
|
||||
Return KdNr_value
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
' Return CObj(If(KdNr_value > 0, KdNr_value, Nothing))
|
||||
End Get
|
||||
Set(v As Object)
|
||||
'NIX...
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub OnPropertyChanged(ByVal name As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub KdSearchBox_PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Handles Me.PropertyChanged
|
||||
setMeValue()
|
||||
End Sub
|
||||
|
||||
Sub initKdBox(control As Control, Optional kdNrBox As Control = Nothing)
|
||||
Try
|
||||
If control Is Nothing Then Exit Sub
|
||||
Me.form = control
|
||||
Me.usrcntl = New usrcntlKdSearch
|
||||
control.Controls.Add(usrcntl)
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Then
|
||||
_AlleFirmenCLUSTER = True
|
||||
End If
|
||||
|
||||
'Me.usrcntl = usrcntl
|
||||
hideDgv(Me.usrcntl)
|
||||
If kdNrBox IsNot Nothing Then Me.kdNrField = kdNrBox
|
||||
|
||||
|
||||
tmr_Search.Interval = 200
|
||||
tmr_Search.Enabled = True
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_13")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub KdSearchBox_LostFocus(sender As Object, e As EventArgs) Handles Me.LostFocus
|
||||
'THREADING ThreadWaitAndSee
|
||||
Dim ThreadWaitAndSee = New System.Threading.Thread(Sub()
|
||||
Try
|
||||
Threading.Thread.Sleep(300)
|
||||
' MsgBox(Me.form.ActiveControl.Name)
|
||||
If Me.form Is Nothing Then Exit Sub
|
||||
If Me.form.ActiveControl Is Nothing Then Exit Sub
|
||||
If Me.form.ActiveControl IsNot Me Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub)
|
||||
ThreadWaitAndSee.IsBackground = True
|
||||
ThreadWaitAndSee.Start()
|
||||
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
If usrcntl.dgvKundenAktiv.SelectedCells.Count = 0 And usrcntl.dgvKundenInAktiv.SelectedCells.Count = 0 Then
|
||||
Me.SelectionLength = 0
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_LF")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub KdSearchBox_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
If _autoSizeGross Then
|
||||
Me.CharacterCasing = Windows.Forms.CharacterCasing.Upper
|
||||
' If Me.Text <> "" Then Me.Text = Me.Text.ToUpper
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_TextChanged(sender As Object, e As EventArgs) Handles Me.TextChanged
|
||||
If Me.Text.Length > Me.MaxLength Then Me.Text = Me.Text.Substring(0, Me.MaxLength)
|
||||
End Sub
|
||||
|
||||
Private Sub tmr_Search_Tick(sender As Object, e As EventArgs) Handles tmr_Search.Tick
|
||||
If TIMER_SEARCH Then doKeyDown(Now)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyCheckBoxValue.Designer.vb
generated
Normal file
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyCheckBoxValue.Designer.vb
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
Partial Class MyCheckBoxValue
|
||||
Inherits System.Windows.Forms.CheckBox
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,42 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyCheckBoxValue
|
||||
Inherits CheckBox
|
||||
|
||||
Property _value As String = ""
|
||||
'Dim bold = False
|
||||
Property _showdate As Boolean = False
|
||||
Property _date As Object = Nothing
|
||||
|
||||
|
||||
|
||||
Private Sub MyCheckBoxValue_CheckedChanged(sender As Object, e As EventArgs) Handles Me.CheckedChanged
|
||||
If Me.Text.Contains(", am ") Then Me.Text = Me.Text.Substring(0, Me.Text.IndexOf(", am ")) 'ersetzen des Datum-Strings
|
||||
If Me.CheckState = Windows.Forms.CheckState.Checked Then
|
||||
If Me._date IsNot Nothing AndAlso IsDate(Me._date) AndAlso Me._date > CDate("01.01.1990") Then
|
||||
Me.Text &= ", am " & Me._date.ToShortDateString
|
||||
End If
|
||||
|
||||
' Me.Font = New System.Drawing.Font(Me.Font.FontFamily, Me.Font.Size, Drawing.FontStyle.Bold)
|
||||
Else
|
||||
Me._date = Nothing
|
||||
' Me.Font = New System.Drawing.Font(Me.Font.FontFamily, Me.Font.Size, If(bold, Drawing.FontStyle.Bold, Drawing.FontStyle.Regular))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MyCheckBoxValue_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
If e.KeyCode = Keys.Space Then
|
||||
If Me.CheckState <> Windows.Forms.CheckState.Checked Then Me._date = Now
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Private Sub MyCheckBoxValue_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
' bold = Me.Font.Bold
|
||||
'End Sub
|
||||
|
||||
Private Sub MyCheckBoxValue_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown
|
||||
If Me.CheckState <> Windows.Forms.CheckState.Checked Then Me._date = Now
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyCheckbox.Designer.vb
generated
Normal file
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyCheckbox.Designer.vb
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
Partial Class MyCheckbox
|
||||
Inherits System.Windows.Forms.CheckBox
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,41 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyCheckbox
|
||||
Inherits CheckBox
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Property _value As String = ""
|
||||
Property Checked_value As Boolean = False
|
||||
|
||||
' Protected Overrides Sub OnCheckedChanged(ByVal e As EventArgs)
|
||||
' Me.Checked = Me.Checked_value
|
||||
' End Sub
|
||||
|
||||
Private Sub MyCheckbox_Click(sender As Object, e As EventArgs) Handles Me.Click
|
||||
Me.Checked = Me.Checked_value
|
||||
End Sub
|
||||
|
||||
Public Property CheckedValue As Boolean
|
||||
Get
|
||||
Return Checked_value
|
||||
End Get
|
||||
Set(v As Boolean)
|
||||
Checked_value = v
|
||||
Me.Checked = Checked_value
|
||||
OnPropertyChanged("CheckedValue")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler _
|
||||
Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub OnPropertyChanged(ByVal name As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,218 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class MyComboBox
|
||||
Inherits System.Windows.Forms.ComboBox
|
||||
|
||||
Public Property _allowFreiText As Boolean = False
|
||||
Public Property _allowedValuesFreiText As String() = Nothing
|
||||
' Public Property _allowedValuesFreiText_SET As String() = Nothing
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Sub fillWithMyListItem(l As List(Of MyListItem), Optional firstEmpty As Boolean = False, Optional clearList As Boolean = True, Optional firstEmptyName As String = "")
|
||||
If clearList Then MyBase.Items.Clear()
|
||||
If firstEmpty Then
|
||||
Me.Items.Insert(0, New MyListItem(firstEmptyName, ""))
|
||||
End If
|
||||
If l IsNot Nothing Then
|
||||
For Each i In l : MyBase.Items.Add(i) : Next
|
||||
End If
|
||||
End Sub
|
||||
Sub fillWithSQL(sqlstr As String, Optional showValueInText As Boolean = True, Optional conn As String = "SDL", Optional firstEmpty As Boolean = False, Optional clearList As Boolean = True, Optional firstEmptyName As String = "")
|
||||
fillWithMyListItem((New SQL).loadCboBySqlWithListItem(sqlstr, showValueInText, conn), firstEmpty, clearList, firstEmptyName)
|
||||
_TRANSLATE()
|
||||
End Sub
|
||||
|
||||
Public Property _value As String
|
||||
Get
|
||||
Return getValueOfItem()
|
||||
End Get
|
||||
Set(v As String)
|
||||
|
||||
'If _allowedValuesFreiText Is Nothing OrElse Not valueAllowed(v) Then
|
||||
If v = "" Then
|
||||
If Me.Items.Count > 0 And Not _allowFreiText Then Me.SelectedItem = Me.Items(0)
|
||||
Else
|
||||
changeItem(v, valueAllowed(v))
|
||||
'End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Function valueAllowed(t)
|
||||
If _allowedValuesFreiText IsNot Nothing Then
|
||||
For Each s In _allowedValuesFreiText
|
||||
Try : If t.ToUpper = CStr(s).ToUpper Then Return True
|
||||
Catch : End Try
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
Function changeItem(v, Optional Valueallowed = False) As Boolean
|
||||
'
|
||||
Try
|
||||
|
||||
If v Is Nothing Then Me.Text = "" : Return True
|
||||
If v Is DBNull.Value Then Me.Text = "" : Return True
|
||||
If Me.Items.Count = 0 Then Me.Text = "" : Return True
|
||||
|
||||
If Me.Items(0).GetType.Name = "MyListItem" Then
|
||||
|
||||
Try : If DirectCast(Me.SelectedItem, MyListItem).Value.ToUpper = CStr(v).ToUpper Then Return True 'warum nochmal?
|
||||
Catch : End Try ' Wenn der ausgewählte EIntrag bereits korrekt ist.
|
||||
|
||||
For Each i In Me.Items
|
||||
' MsgBox(DirectCast(i, MyListItem).Value & " - " & v)
|
||||
If DirectCast(i, MyListItem).Value.ToUpper = CStr(v).ToUpper Then
|
||||
'me.SelectedIndex = i : Return True
|
||||
Me.SelectedItem = i : Return True
|
||||
End If
|
||||
Next
|
||||
For Each i In Me.Items
|
||||
' MsgBox(DirectCast(i, MyListItem).Value & " - " & v)
|
||||
If DirectCast(i, MyListItem).Text.ToUpper = CStr(v).ToUpper Then
|
||||
Me.SelectedItem = i : Return True
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
'WEnn die Items normale Strings beinhalten, wird keine Änderung des ._value Wertes vorgenommen.
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
If Not _allowFreiText And Not Valueallowed Then
|
||||
Me._value = ""
|
||||
End If
|
||||
|
||||
If Valueallowed Then
|
||||
Me.Text = v
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function hasItem(v) As Boolean
|
||||
'
|
||||
Try
|
||||
|
||||
If v Is Nothing Then Me.Text = "" : Return True
|
||||
If v Is DBNull.Value Then Me.Text = "" : Return True
|
||||
If Me.Items.Count = 0 Then Me.Text = "" : Return True
|
||||
|
||||
If Me.Items(0).GetType.Name = "MyListItem" Then
|
||||
|
||||
For Each i In Me.Items
|
||||
' MsgBox(DirectCast(i, MyListItem).Value & " - " & v)
|
||||
If DirectCast(i, MyListItem).Value.ToUpper = CStr(v).ToUpper Then
|
||||
'me.SelectedIndex = i : Return True
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
For Each i In Me.Items
|
||||
' MsgBox(DirectCast(i, MyListItem).Value & " - " & v)
|
||||
If DirectCast(i, MyListItem).Text.ToUpper = CStr(v).ToUpper Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function getValueOfItem() As String
|
||||
If Me.Items.Count = 0 Then Return ""
|
||||
Try : Return DirectCast(MyBase.SelectedItem, MyListItem).Value
|
||||
Catch
|
||||
Try : Return MyBase.SelectedItem.ToString : Catch : End Try
|
||||
End Try
|
||||
If _allowFreiText Or valueAllowed(Me.Text) Then Return Me.Text
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub MyComboBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
|
||||
If Me.DropDownStyle = Windows.Forms.ComboBoxStyle.DropDown Then
|
||||
If Me.Text = "" Then
|
||||
If Me.Items.Count > 0 Then Me.SelectedItem = Me.Items(0)
|
||||
End If
|
||||
End If
|
||||
|
||||
Me._value = Me.Text
|
||||
changeItem(CStr(Me.Text), valueAllowed(Me.Text))
|
||||
|
||||
Exit Sub
|
||||
|
||||
If valueAllowed(Me.Text) Then
|
||||
Dim t = Me.Text
|
||||
changeItem(CStr(t)) 'Wenn nicht schon in der Auswahl gefunden, dann wird _value gesetzt
|
||||
Me._value = t
|
||||
Else
|
||||
If Me._value = "" And Me.Text <> "" Then
|
||||
If Not changeItem(CStr(Me.Text)) And _allowFreiText Then
|
||||
Me.Text = ""
|
||||
If Me.Items.Count > 0 Then Me.SelectedItem = Me.Items(0)
|
||||
Me._value = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Me.SelectedIndexChanged
|
||||
Me._value = getValueOfItem()
|
||||
'Geht nicht, da sonst Auswahl nicht Funktioniert
|
||||
|
||||
' MsgBox(Me._value)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub _TRANSLATE()
|
||||
Try
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein._LAN = "" Then Exit Sub
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein._LAN = "DE" Then Exit Sub
|
||||
If Me.FindForm Is Nothing Then Exit Sub '!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
Dim lanTxtAll = VERAG_PROG_ALLGEMEIN.cAllgemein.TRANSLATE.list.FindAll(Function(x) If(x.trs_object, "") = Me.FindForm.Name And If(x.trs_control, "") = Me.Name And If(x.trs_sprache, "") = VERAG_PROG_ALLGEMEIN.cAllgemein._LAN)
|
||||
If lanTxtAll.Count > 0 Then
|
||||
|
||||
Dim listItems(Me.Items.Count) As MyListItem
|
||||
Me.Items.CopyTo(listItems, 0)
|
||||
|
||||
Me.Items.Clear()
|
||||
|
||||
For Each li In listItems
|
||||
If li IsNot Nothing Then
|
||||
|
||||
Dim lanTxt = li.Text
|
||||
For Each txt In lanTxtAll
|
||||
If txt.trs_subControl IsNot DBNull.Value AndAlso txt.trs_subControl = li.Text Then
|
||||
lanTxt = txt.trs_text
|
||||
End If
|
||||
Next
|
||||
' Dim lanTxt = VERAG_PROG_ALLGEMEIN.cAllgemein.TRANSLATE.list.Find(Function(x) x.trs_object = Me.FindForm.Name And x.trs_control = Me.Name And x.trs_sprache = VERAG_PROG_ALLGEMEIN.cAllgemein._LAN And (x.trs_subControl IsNot DBNull.Value AndAlso x.trs_subControl = l.Text))
|
||||
' MsgBox(If(lanTxt Is Nothing, "noth " & Me.Name, lanTxt.trs_text))
|
||||
Me.Items.Add(New MyListItem(lanTxt, li.Value))
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
51
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyDatagridview.Designer.vb
generated
Normal file
51
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyDatagridview.Designer.vb
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
Partial Class MyDatagridview
|
||||
Inherits System.Windows.Forms.DataGridView
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
Try
|
||||
MyBase.Dispose(disposing)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,322 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Reflection
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyDatagridview
|
||||
Inherits DataGridView
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Dim SQL_STR As String = ""
|
||||
Dim CONN_ART As String = ""
|
||||
Dim SQL_PARAM As List(Of SQLVariable) = Nothing
|
||||
|
||||
Public RELOAD_PARAMS() As String = Nothing ' Die Spaltennamen, anhand dieser die Auswhal bei einem Reload wiederhergesatllt wird
|
||||
Dim RELOAD_PARAMS_Save As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
|
||||
|
||||
Property AKTUALISIERUNGS_INTERVALL As Integer = -1
|
||||
WithEvents timer As New Timer
|
||||
Public VALUE_CHANGED As Boolean = False
|
||||
|
||||
Event RELOADED()
|
||||
|
||||
' Protected Overrides Sub OnCheckedChanged(ByVal e As EventArgs)
|
||||
' Me.Checked = Me.Checked_value
|
||||
' End Sub
|
||||
|
||||
Dim SortColumn = Nothing
|
||||
Dim sel_row_index = -1
|
||||
Dim SortDirection As Windows.Forms.SortOrder
|
||||
Dim ScrollPos_X = Nothing
|
||||
Dim ScrollPos_Y = Nothing
|
||||
'Dim ScrollPos_Y2 = Nothing
|
||||
Dim SQL As New SQL
|
||||
|
||||
Public Sub GetOrder()
|
||||
' dataGridView1.HorizontalScrollingOffset = dataGridView1.HorizontalScrollingOffset + 10
|
||||
|
||||
If Me.Columns.Count > 0 Then
|
||||
RELOAD_PARAMS_Save.Clear()
|
||||
If Me.SortedColumn IsNot Nothing Then
|
||||
SortColumn = Me.SortedColumn.Index
|
||||
SortDirection = Me.SortedColumn.HeaderCell.SortGlyphDirection
|
||||
End If
|
||||
ScrollPos_X = Me.HorizontalScrollingOffset
|
||||
ScrollPos_Y = Me.FirstDisplayedScrollingRowIndex 'Me.VerticalScrollingOffset
|
||||
|
||||
'ScrollPos_Y2 = Me.VerticalScrollingOffset
|
||||
If Me.SelectedRows.Count > 0 Then
|
||||
sel_row_index = Me.SelectedRows(0).Index
|
||||
|
||||
|
||||
If RELOAD_PARAMS IsNot Nothing Then
|
||||
For Each p In RELOAD_PARAMS
|
||||
RELOAD_PARAMS_Save.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(p, Me.SelectedRows(0).Cells(p).Value))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnPaint(e As PaintEventArgs)
|
||||
Try
|
||||
MyBase.OnPaint(e)
|
||||
If AKTUALISIERUNGS_INTERVALL > 0 Then timer.Interval = AKTUALISIERUNGS_INTERVALL : timer.Enabled = True
|
||||
|
||||
Catch ex As Exception
|
||||
Me.Invalidate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub SET_SQL(SQL_STR As String, CONN_ART As String, Optional SQL_PARAM As List(Of SQLVariable) = Nothing, Optional RELOAD_PARAMS As String() = Nothing)
|
||||
Me.SQL_STR = SQL_STR
|
||||
Me.CONN_ART = CONN_ART
|
||||
Me.SQL_PARAM = SQL_PARAM
|
||||
Me.RELOAD_PARAMS = RELOAD_PARAMS
|
||||
End Sub
|
||||
Public Function GET_SQL() As String
|
||||
Return SQL_STR
|
||||
End Function
|
||||
|
||||
Public Sub SetOrder()
|
||||
If Me.Columns.Count > 0 Then
|
||||
If SortColumn IsNot Nothing Then
|
||||
If SortDirection = Windows.Forms.SortOrder.Ascending Then
|
||||
Me.Sort(Me.Columns(CInt(SortColumn)), ListSortDirection.Ascending)
|
||||
ElseIf SortDirection = Windows.Forms.SortOrder.Descending Then
|
||||
Me.Sort(Me.Columns(CInt(SortColumn)), ListSortDirection.Descending)
|
||||
Else
|
||||
Me.Sort(Me.Columns(CInt(SortColumn)))
|
||||
End If
|
||||
End If
|
||||
If ScrollPos_X IsNot Nothing Then Me.HorizontalScrollingOffset = ScrollPos_X
|
||||
Try
|
||||
' Me.DataBind
|
||||
Me.FirstDisplayedScrollingRowIndex = ScrollPos_Y
|
||||
Catch ex As Exception
|
||||
'If ScrollPos_Y IsNot Nothing Then Me.HorizontalScrollBar.Value = ScrollPos_Y2
|
||||
|
||||
End Try
|
||||
|
||||
If RELOAD_PARAMS IsNot Nothing And RELOAD_PARAMS_Save.Count > 0 Then
|
||||
For Each r As DataGridViewRow In Me.Rows
|
||||
Dim found = True
|
||||
For Each p In RELOAD_PARAMS_Save
|
||||
If r.Cells(p.Text).Value <> p.Value Then found = False
|
||||
Next
|
||||
If found Then
|
||||
r.Selected = True
|
||||
|
||||
For Each c As DataGridViewCell In Me.Rows(sel_row_index).Cells
|
||||
If c.Visible Then
|
||||
Me.CurrentCell = c 'Damit der Cursor in der DGV richtig steht
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
If sel_row_index > 0 And Me.Rows.Count > sel_row_index Then
|
||||
Me.ClearSelection()
|
||||
Me.Rows(sel_row_index).Selected = True
|
||||
For Each c As DataGridViewCell In Me.Rows(sel_row_index).Cells
|
||||
If c.Visible Then
|
||||
Me.CurrentCell = c 'Damit der Cursor in der DGV richtig steht
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub LOAD(Optional showErr As Boolean = False, Optional ByRef errOccured As Boolean = False)
|
||||
If SQL_STR <> "" Then
|
||||
Me.DataSource = SQL.loadDgvBySql_Param(SQL_STR, CONN_ART, , SQL_PARAM, showErr, errOccured)
|
||||
Me._TRANSLATE()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub RELOAD()
|
||||
GetOrder()
|
||||
LOAD()
|
||||
SetOrder()
|
||||
RaiseEvent RELOADED()
|
||||
End Sub
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler _
|
||||
Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub OnPropertyChanged(ByVal name As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
|
||||
End Sub
|
||||
|
||||
|
||||
' Private Sub MyDatagridview_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
' End Sub
|
||||
|
||||
Private Sub timer_Tick(sender As Object, e As EventArgs) Handles timer.Tick
|
||||
If VALUE_CHANGED Then
|
||||
RELOAD()
|
||||
VALUE_CHANGED = False
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'_______________________________________________________________________________
|
||||
|
||||
#Region "Operations"
|
||||
|
||||
Public Sub DefineSingleClickColumns(ParamArray columns As DataGridViewColumn())
|
||||
singleClickColumns.Clear()
|
||||
|
||||
For Each column As DataGridViewColumn In columns
|
||||
If Me.Columns.IndexOf(column) = -1 Then
|
||||
Throw New ArgumentException("Instance of column (" + column.Name + ") is not in this DataGridView")
|
||||
End If
|
||||
|
||||
singleClickColumns.Add(column)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub DefineSingleClickColumns(ParamArray columnIndexes As Integer())
|
||||
singleClickColumns.Clear()
|
||||
|
||||
For Each columnIndex As Integer In columnIndexes
|
||||
If columnIndex < 0 OrElse columnIndex >= Me.Columns.Count Then
|
||||
Throw New ArgumentOutOfRangeException("Column index (" + columnIndex + ") is out of range")
|
||||
End If
|
||||
|
||||
singleClickColumns.Add(Me.Columns(columnIndex))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Protected Sub BaseOnMouseDown(ByVal e As MouseEventArgs)
|
||||
MyBase.OnMouseDown(e)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Overrides"
|
||||
|
||||
Protected Overloads Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
|
||||
' If primary mouse button not down, do standard processing
|
||||
If e.Button <> MouseButtons.Left Then
|
||||
MyBase.OnMouseDown(e)
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
' Get info on where user clicked
|
||||
Dim hitInfo As DataGridView.HitTestInfo = HitTest(e.X, e.Y)
|
||||
|
||||
' If a cell wasn't clicked, column isn't text or it's read only, do standard processing
|
||||
If hitInfo.Type <> DataGridViewHitTestType.Cell OrElse Not (TypeOf Me.Columns(hitInfo.ColumnIndex) Is DataGridViewTextBoxColumn) OrElse Me.Columns(hitInfo.ColumnIndex).[ReadOnly] Then
|
||||
MyBase.OnMouseDown(e)
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
' If functionality enabled for specific columns and column clicked is not
|
||||
' one of these, do standard processing
|
||||
If singleClickColumns.Count >= 1 AndAlso singleClickColumns.IndexOf(Me.Columns(hitInfo.ColumnIndex)) = -1 Then
|
||||
MyBase.OnMouseDown(e)
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
' Get clicked cell
|
||||
Dim clickedCell As DataGridViewCell = Me.Rows(hitInfo.RowIndex).Cells(hitInfo.ColumnIndex)
|
||||
|
||||
' If cell not current, try and make it so
|
||||
If CurrentCell IsNot clickedCell Then
|
||||
' Allow standard processing make clicked cell current
|
||||
MyBase.OnMouseDown(e)
|
||||
|
||||
' If this didn't happen (validation failed etc), abort
|
||||
If Me.CurrentCell IsNot clickedCell Then
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
' If already in edit mode, do standard processing (will position caret)
|
||||
If Me.CurrentCell.IsInEditMode Then
|
||||
MyBase.OnMouseDown(e)
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
' Enter edit mode
|
||||
Me.BeginEdit(False)
|
||||
|
||||
If Me.EditingControl IsNot Nothing Then
|
||||
|
||||
' Ensure text is scrolled to the left
|
||||
Dim textBox As TextBoxBase = DirectCast(Me.EditingControl, TextBoxBase)
|
||||
|
||||
textBox.SelectionStart = 0
|
||||
|
||||
textBox.ScrollToCaret()
|
||||
|
||||
' Position caret by simulating a mouse click within control
|
||||
Dim editOffset As Integer = e.X - hitInfo.ColumnX - Me.EditingControl.Left
|
||||
|
||||
Dim lParam As Int32 = MakeLong(editOffset, 0)
|
||||
|
||||
SendMessage(Me.EditingControl.Handle, WM_LBUTTONDOWN, 0, lParam)
|
||||
|
||||
SendMessage(Me.EditingControl.Handle, WM_LBUTTONUP, 0, lParam)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Implementation"
|
||||
|
||||
Const WM_LBUTTONDOWN As Integer = 513
|
||||
|
||||
Const WM_LBUTTONUP As Integer = 514
|
||||
|
||||
<System.Runtime.InteropServices.DllImport("user32.dll")> _
|
||||
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Boolean
|
||||
End Function
|
||||
|
||||
Private singleClickColumns As New List(Of DataGridViewColumn)()
|
||||
|
||||
Private Function MakeLong(ByVal loWord As Integer, ByVal hiWord As Integer) As Integer
|
||||
Return (hiWord << 16) Or (loWord And 65535)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Sub _TRANSLATE()
|
||||
Try
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein._LAN = "" Then Exit Sub
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein._LAN = "DE" Then Exit Sub
|
||||
|
||||
Dim lanTxtAll = VERAG_PROG_ALLGEMEIN.cAllgemein.TRANSLATE.list.FindAll(Function(x) x.trs_object = Me.FindForm.Name And x.trs_control = Me.Name And x.trs_sprache = VERAG_PROG_ALLGEMEIN.cAllgemein._LAN)
|
||||
If lanTxtAll.Count > 0 Then
|
||||
For Each txt In lanTxtAll
|
||||
If Me.Columns(txt.trs_subControl) IsNot Nothing Then
|
||||
Me.Columns(txt.trs_subControl).HeaderText = txt.trs_text
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyFlowLayoutPanel.Designer.vb
generated
Normal file
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyFlowLayoutPanel.Designer.vb
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
Partial Class MyFlowLayoutPanel
|
||||
Inherits System.Windows.Forms.FlowLayoutPanel
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,15 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class MyFlowLayoutPanel
|
||||
Inherits FlowLayoutPanel
|
||||
|
||||
|
||||
Protected Overrides Function ScrollToControl(ByVal activecontrol As Control) As Point
|
||||
|
||||
Return Me.AutoScrollPosition
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,27 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyLinkLabelVALUE
|
||||
Inherits System.Windows.Forms.LinkLabel
|
||||
|
||||
Public Property valuename As String
|
||||
Public Property linkedTextBox As TextBox
|
||||
|
||||
Protected Overrides Sub OnClick(e As EventArgs)
|
||||
MyBase.OnClick(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Public Class MyLinkPicBoxVALUE
|
||||
Inherits System.Windows.Forms.PictureBox
|
||||
|
||||
Public Property valuename As String
|
||||
Public Property linkedTextBox As TextBox
|
||||
Public Property linkedPictureBox As PictureBox
|
||||
|
||||
Protected Overrides Sub OnClick(e As EventArgs)
|
||||
MyBase.OnClick(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,39 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class MyListBox
|
||||
Inherits System.Windows.Forms.ListBox
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Sub fillWithMyListItem(l As List(Of MyListItem))
|
||||
MyBase.Items.Clear()
|
||||
For Each i In l : MyBase.Items.Add(i) : Next
|
||||
End Sub
|
||||
Sub fillWithSQL(sql As String, Optional showValueInText As Boolean = True, Optional conn As String = "SDL")
|
||||
fillWithMyListItem((New SQL).loadCboBySqlWithListItem(sql, showValueInText, conn))
|
||||
End Sub
|
||||
|
||||
Public Property _value As String
|
||||
Get
|
||||
Return getValueOfItem()
|
||||
End Get
|
||||
Set(v As String)
|
||||
changeItem(v)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub changeItem(v)
|
||||
For Each i In MyBase.Items
|
||||
If DirectCast(i, MyListItem).Value = v Then
|
||||
MyBase.SelectedItem = i : Exit Sub
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Function getValueOfItem() As String
|
||||
Try : Return DirectCast(MyBase.SelectedItem, MyListItem).Value : Catch : End Try
|
||||
Return ""
|
||||
End Function
|
||||
End Class
|
||||
|
||||
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyPanel.Designer.vb
generated
Normal file
47
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyPanel.Designer.vb
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
Partial Class MyPanel
|
||||
Inherits System.Windows.Forms.Panel
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,15 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class MyPanel
|
||||
Inherits Panel
|
||||
|
||||
|
||||
Protected Overrides Function ScrollToControl(ByVal activecontrol As Control) As Point
|
||||
|
||||
Return Me.AutoScrollPosition
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
40
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyRadioButton.Designer.vb
generated
Normal file
40
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MyRadioButton.Designer.vb
generated
Normal file
@@ -0,0 +1,40 @@
|
||||
Partial Class MyRadioButton
|
||||
Inherits System.Windows.Forms.RadioButton
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers
|
||||
If (container IsNot Nothing) Then
|
||||
container.Add(Me)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,34 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyRadioButton
|
||||
Inherits System.Windows.Forms.RadioButton
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Property GroupName As String
|
||||
|
||||
|
||||
Private Sub MyRadioButton_Click(sender As Object, e As EventArgs) Handles Me.Click
|
||||
' Dim rb As MyRadioButton = DirectCast(sender, MyRadioButton)
|
||||
' MsgBox(Me.Checked)
|
||||
' If Not Me.Checked Then
|
||||
uncheck(Me.FindForm, Me.GroupName)
|
||||
Me.Checked = True
|
||||
' End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub uncheck(c As Control, GroupName As String)
|
||||
' MsgBox(c.GetType.Name)
|
||||
If c.GetType.Name = "MyRadioButton" AndAlso DirectCast(c, MyRadioButton).GroupName = GroupName Then
|
||||
DirectCast(c, MyRadioButton).Checked = False
|
||||
ElseIf c.HasChildren Then
|
||||
For Each csub In c.Controls
|
||||
uncheck(csub, GroupName)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,40 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyRichTextBox
|
||||
Inherits System.Windows.Forms.RichTextBox
|
||||
|
||||
Property MaxLines_Warning As String = ""
|
||||
Property MaxLines_Warning_Label As Label = Nothing
|
||||
Property MaxLineLength As Integer = -1
|
||||
|
||||
|
||||
Private Sub MyTextBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
|
||||
If MaxLineLength > 0 Then
|
||||
Dim str() As String = Me.Lines
|
||||
For i = 0 To Me.Lines.Count - 1
|
||||
If str(i).Length > MaxLineLength Then
|
||||
str(i) = str(i).Substring(0, MaxLineLength)
|
||||
End If
|
||||
Next
|
||||
Me.Lines = str
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_Textchanged(sender As Object, e As EventArgs) Handles Me.TextChanged
|
||||
'sender.ForeColor = System.Drawing.Color.Black
|
||||
|
||||
If Me.Multiline And IsNumeric(MaxLines_Warning) Then
|
||||
' If Me.Lines.Length > MaxLines Then
|
||||
If MaxLines_Warning_Label IsNot Nothing Then
|
||||
MaxLines_Warning_Label.Visible = CBool(Me.Lines.Length > MaxLines_Warning)
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,41 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyRichTextBox2
|
||||
Inherits System.Windows.Forms.RichTextBox
|
||||
|
||||
|
||||
Property MaxLines_Warning As String = ""
|
||||
Property MaxLines_Warning_Label As Label = Nothing
|
||||
Property MaxLineLength As Integer = -1
|
||||
|
||||
|
||||
Private Sub MyTextBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
|
||||
If MaxLineLength > 0 Then
|
||||
Dim str() As String = Me.Lines
|
||||
For i = 0 To Me.Lines.Count - 1
|
||||
If str(i).Length > MaxLineLength Then
|
||||
str(i) = str(i).Substring(0, MaxLineLength)
|
||||
End If
|
||||
Next
|
||||
Me.Lines = str
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_Textchanged(sender As Object, e As EventArgs) Handles Me.TextChanged
|
||||
'sender.ForeColor = System.Drawing.Color.Black
|
||||
|
||||
If Me.Multiline And IsNumeric(MaxLines_Warning) Then
|
||||
' If Me.Lines.Length > MaxLines Then
|
||||
If MaxLines_Warning_Label IsNot Nothing Then
|
||||
MaxLines_Warning_Label.Visible = CBool(Me.Lines.Length > MaxLines_Warning)
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
30
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MySearchBox.Designer.vb
generated
Normal file
30
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/MySearchBox.Designer.vb
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
Partial Class MySearchBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
|
||||
|
||||
|
||||
|
||||
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,636 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
'Imports System.Threading
|
||||
|
||||
Public Class MySearchBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
' Dim sql As New SDL.SQL
|
||||
' Dim KUNDENSQL As New SDL.kundenSQL
|
||||
Dim form As Form = Me.FindForm
|
||||
'Public KdData As SDL.cKundenFMZOLL
|
||||
Public DR As DataRow = Nothing
|
||||
|
||||
Public Property searchActive As Boolean = True
|
||||
Public Property _AllowSetValue As Boolean = False
|
||||
Public Property _allowFreitext As Boolean = False
|
||||
Public Property _hideIfListEmpty As Boolean = True
|
||||
Public Property dgvpos As String = "LEFT"
|
||||
Public Property _autoSizeGross As Boolean = False
|
||||
|
||||
Public Property SQL_WhereParamList As String()
|
||||
Public Property INVISIBLE_COLUMNS As String()
|
||||
|
||||
Public Property SQL_SELECT As String
|
||||
Public Property SQL_WHERE As String
|
||||
Public Property KEYPARAM As String
|
||||
Public Property DISPLAY_PARAM As String
|
||||
' Public Property DISPLAY_PARAM_VALUE As String
|
||||
Public Property SQL_ORDER_BY As String
|
||||
Public Property conn_art As String = "FMZOLL"
|
||||
Public Property key_visible As Boolean = False
|
||||
Public Property _allowSpaceAsSplitter As Boolean = False
|
||||
|
||||
|
||||
Dim SrchHeight As Integer = 300
|
||||
Dim SrchWidth As Integer = 300
|
||||
|
||||
Public Event VALUE_CHANGED()
|
||||
|
||||
Dim active = False
|
||||
Public Property _value As String
|
||||
' Public Propvalue As String
|
||||
' Public Property _value As String
|
||||
' Get
|
||||
' Return Me.Propvalue
|
||||
' End Get
|
||||
' Set(v As String)
|
||||
' SET_VALUE(v)
|
||||
' OnPropertyChanged("_value")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub OnPropertyChanged(ByVal name As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
|
||||
End Sub
|
||||
|
||||
|
||||
Public WithEvents usrcntl As usrcntlKdSearch '= DirectCast(Me.FindForm.Controls.Find("dgvFindKD", False)(0), DataGridView)
|
||||
|
||||
' Public WithEvents dgv As DataGridView
|
||||
' Public WithEvents dgvInaktiv As DataGridView
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Public Sub FireReturn()
|
||||
dgvFindKD_Click(Me, New KeyEventArgs(Keys.Return))
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnPaint(e As PaintEventArgs)
|
||||
Try
|
||||
MyBase.OnPaint(e)
|
||||
Catch ex As Exception
|
||||
Me.Invalidate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_GotFocus(sender As Object, e As EventArgs) Handles Me.GotFocus
|
||||
Try
|
||||
Me.SelectionLength = 0
|
||||
Me.HideSelection = False
|
||||
Me.SelectAll()
|
||||
Me.Select()
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 01: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
Try
|
||||
'Console.WriteLine(String.Format("TEEST 01"))
|
||||
If Not searchActive Then Exit Sub
|
||||
|
||||
' If dgv Is Nothing Then dgv = usrcntl.dgvKundenAktiv
|
||||
' If dgvInaktiv Is Nothing Then dgvInaktiv = usrcntl.dgvKundenInAktiv
|
||||
|
||||
If e.KeyCode = Keys.ShiftKey Or e.KeyCode = Keys.Shift Or e.KeyCode = Keys.Alt Or e.KeyCode = Keys.Control Or e.KeyCode = Keys.Left Or e.KeyCode = Keys.Right Or e.KeyCode = Keys.End Or e.KeyCode = Keys.Home Or e.KeyCode = Keys.CapsLock Then 'Bei Shift Tab..
|
||||
If usrcntl IsNot Nothing Then usrcntl.Visible = False
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
If usrcntl IsNot Nothing Then usrcntl.Visible = False
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If e.KeyCode = Keys.Return Then
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If e.KeyCode = Keys.Up Then
|
||||
If usrcntl IsNot Nothing Then prevLKW(usrcntl.dgvKundenAktiv)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
If e.KeyCode = Keys.Down Then
|
||||
If usrcntl IsNot Nothing Then nextLKW(usrcntl.dgvKundenAktiv)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
If e.KeyCode = Keys.Escape Then
|
||||
hideDgv(usrcntl)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
DR = Nothing
|
||||
_value = ""
|
||||
|
||||
If Me.Text.Trim = "" Then
|
||||
setMeValue(DR)
|
||||
hideDgv(usrcntl)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If usrcntl Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
usrcntl.Width = SrchWidth
|
||||
usrcntl.Height = SrchHeight
|
||||
|
||||
Dim locationOnForm As Point = Nothing
|
||||
If dgvpos = "LEFT" Or dgvpos = "" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
ElseIf dgvpos = "RIGHT" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
locationOnForm.X = locationOnForm.X - (usrcntl.Width - Me.Width)
|
||||
' MsgBox(locationOnForm.X & "/" & locationOnForm.Y)
|
||||
End If
|
||||
|
||||
|
||||
If locationOnForm.Y + usrcntl.Height + Me.Height > form.ClientRectangle.Height Then
|
||||
usrcntl.Height = form.ClientRectangle.Height - locationOnForm.Y - Me.Height
|
||||
End If
|
||||
|
||||
usrcntl.Location = locationOnForm
|
||||
usrcntl.Top += Me.Height
|
||||
End If
|
||||
|
||||
With usrcntl.dgvKundenAktiv
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.ReadOnly = True
|
||||
.MultiSelect = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.BackgroundColor = Color.White
|
||||
.ForeColor = Color.Black
|
||||
.GridColor = Color.White
|
||||
|
||||
End If
|
||||
|
||||
'THREADING AKTIV
|
||||
Me.ThreadInitAKTIV()
|
||||
' Dim ThreadInitAKTIV = New System.Threading.Thread(AddressOf Me.ThreadInitAKTIV)
|
||||
' ThreadInitAKTIV.IsBackground = True
|
||||
' ThreadInitAKTIV.Start()
|
||||
|
||||
End With
|
||||
|
||||
|
||||
usrcntl.dgvKundenInAktiv.Visible = False
|
||||
usrcntl.Panel1.Visible = False
|
||||
|
||||
|
||||
If _hideIfListEmpty Then
|
||||
|
||||
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
If False Then
|
||||
|
||||
'THREADING ThreadWaitAndSee
|
||||
Dim ThreadWaitAndSee = New System.Threading.Thread(Sub()
|
||||
Threading.Thread.Sleep(200)
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
End Sub)
|
||||
ThreadWaitAndSee.IsBackground = True
|
||||
ThreadWaitAndSee.Start()
|
||||
End If
|
||||
Else
|
||||
usrcntl.Visible = True
|
||||
usrcntl.Show()
|
||||
usrcntl.BringToFront()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 02: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub hideDgv(o) '(sender As Object, e As EventArgs)
|
||||
If o IsNot Nothing Then
|
||||
Me.searchActive = False
|
||||
o.visible = False
|
||||
Me.searchActive = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub ThreadInitAKTIV()
|
||||
Try
|
||||
If usrcntl Is Nothing Then Exit Sub
|
||||
If usrcntl.dgvKundenAktiv Is Nothing Then Exit Sub
|
||||
With usrcntl.dgvKundenAktiv
|
||||
|
||||
Dim srch As String = Me.Text.Replace("'", "").ToString.Trim
|
||||
If _allowSpaceAsSplitter Then srch = srch.Replace(" ", ",")
|
||||
|
||||
Dim srch2 As String = ""
|
||||
If srch.Contains(",") Then
|
||||
Dim spitter() = srch.Split(",")
|
||||
srch = spitter(0).ToString.Trim
|
||||
srch2 = spitter(1).ToString.Trim
|
||||
End If
|
||||
Dim topAnz = 16
|
||||
Dim AvisoEmail = ""
|
||||
Dim SQLstr As String = "SELECT TOP " & topAnz & " " & SQL_SELECT & " WHERE 1=1 "
|
||||
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
|
||||
|
||||
If srch <> "" And SQL_WhereParamList.Count > 0 Then 'erster Suchparameter
|
||||
SQLstr &= " AND ( 1<>1 "
|
||||
For Each s In SQL_WhereParamList
|
||||
SQLstr &= " OR " & s & " LIKE '" & srch.Replace("*", "%") & "%' "
|
||||
Next
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
If srch2 <> "" And SQL_WhereParamList.Count > 0 Then 'Wenn zweiter Suchparameter
|
||||
SQLstr &= " AND ( 1<>1 "
|
||||
For Each s In SQL_WhereParamList
|
||||
SQLstr &= " OR " & s & " LIKE '" & srch2.Replace("*", "%") & "%' "
|
||||
Next
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
|
||||
'MsgBox(SQLstr)
|
||||
' MsgBox(SQL.loadDgvBySql(SQLstr, conn_art).Rows.Count)
|
||||
setDS(usrcntl.dgvKundenAktiv, SQL.loadDgvBySql(SQLstr, conn_art))
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub SET_VALUE(KEYPARAM_Value, Optional showerror = True)
|
||||
Try
|
||||
|
||||
If Not active Then Exit Sub
|
||||
If KEYPARAM_Value Is Nothing Then KEYPARAM_Value = ""
|
||||
Dim SQLstr As String = "SELECT TOP 1 " & SQL_SELECT & " WHERE 1=1 "
|
||||
SQLstr &= " AND " & KEYPARAM & " = '" & KEYPARAM_Value & "' "
|
||||
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
|
||||
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
|
||||
' MsgBox(SQLstr)
|
||||
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
|
||||
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
|
||||
setMeValue(dttmp.Rows(0))
|
||||
Else
|
||||
If _allowFreitext Then
|
||||
Me.Text = KEYPARAM_Value
|
||||
Me._value = KEYPARAM_Value
|
||||
Else
|
||||
Me.Text = ""
|
||||
Me._value = ""
|
||||
End If
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GET_VALUE_OnlyReturn(KEYPARAM_Value, Optional showerror = True)
|
||||
Try
|
||||
If SQL_SELECT = "" Then Return Nothing 'Ohne dem gehts nicht
|
||||
If KEYPARAM = "" Then Return Nothing 'Ohne dem gehts nicht
|
||||
If KEYPARAM_Value Is Nothing Then KEYPARAM_Value = ""
|
||||
|
||||
Dim SQLstr As String = "SELECT TOP 1 " & SQL_SELECT & " WHERE 1=1 "
|
||||
SQLstr &= " AND " & KEYPARAM & " = '" & KEYPARAM_Value & "' "
|
||||
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
|
||||
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
|
||||
|
||||
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
|
||||
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
|
||||
Return dttmp.Rows(0)(If(DISPLAY_PARAM = "", KEYPARAM, DISPLAY_PARAM)).ToString
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GET_VALUE_OnlyReturnBySQL(SQL_str, Optional showerror = True)
|
||||
Try
|
||||
|
||||
Dim dttmp As DataTable = SQL.loadDgvBySql(SQL_str, conn_art, , showerror)
|
||||
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
|
||||
|
||||
Return dttmp.Rows(0)(If(DISPLAY_PARAM = "", KEYPARAM, DISPLAY_PARAM)).ToString
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
'threadsicherer Aufruf
|
||||
' Delegate Sub setLabelCallback(l As DataGridView, t As DataTable)
|
||||
Private Sub setDS(l As DataGridView, t As DataTable)
|
||||
Try
|
||||
If l Is Nothing Then Exit Sub
|
||||
If t Is Nothing Then Exit Sub
|
||||
'' If Me.InvokeRequired Then
|
||||
'Dim d As New setLabelCallback(AddressOf setDS)
|
||||
' Me.Invoke(d, New Object() {l, t})
|
||||
' Else
|
||||
With l
|
||||
.Columns.Clear()
|
||||
.DataSource = t
|
||||
|
||||
If .ColumnCount = 0 Then Exit Sub
|
||||
|
||||
.RowHeadersVisible = False
|
||||
.Columns(KEYPARAM).Visible = key_visible
|
||||
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
|
||||
.ClearSelection()
|
||||
|
||||
If INVISIBLE_COLUMNS IsNot Nothing Then
|
||||
For Each i In INVISIBLE_COLUMNS
|
||||
.Columns(i).Visible = False
|
||||
Next
|
||||
End If
|
||||
|
||||
End With
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
' Try
|
||||
' MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.name & ") aufgetreten 05: " & vbNewLine & vbNewLine & ex.Message)
|
||||
'Catch ex2 As Exception
|
||||
' MsgBox("ERR", vbCritical)
|
||||
'End Try
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'threadsicherer Aufruf
|
||||
'Delegate Sub setObjectVisibleCallback(l As Object, v As Boolean)
|
||||
Private Sub setObjectVisible(l As Object, v As Boolean)
|
||||
Try
|
||||
If l Is Nothing Then Exit Sub
|
||||
' If Me.InvokeRequired Then
|
||||
' Dim d As New setObjectVisibleCallback(AddressOf setObjectVisible)
|
||||
'Me.Invoke(d, New Object() {l, v})
|
||||
' Else
|
||||
l.visible = v
|
||||
If v = True Then
|
||||
l.Show()
|
||||
l.BringToFront()
|
||||
End If
|
||||
' End If
|
||||
Catch ex As Exception
|
||||
' MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.name & ") aufgetreten 06: " & vbNewLine & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub nextLKW(dgv As DataGridView) '(sender As Object, e As EventArgs)
|
||||
Try
|
||||
If dgv.SelectedRows.Count > 0 Then
|
||||
Dim i As Integer = dgv.SelectedRows(0).Index
|
||||
If (i + 1 < dgv.RowCount) Then
|
||||
'dgv.CurrentCell = dgv.Item(2, i + 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(i + 1).Selected = True
|
||||
End If
|
||||
Else
|
||||
If dgv.Rows.Count > 0 Then ' dgv.CurrentCell = dgv.Item(2, 0)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(0).Selected = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03,1: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub prevLKW(dgv As DataGridView) '(sender As Object, e As EventArgs)
|
||||
Try
|
||||
If dgv.SelectedRows.Count > 0 Then
|
||||
Dim i As Integer = dgv.SelectedRows(0).Index
|
||||
If (i > 0) Then
|
||||
'dgv.CurrentCell = dgv.Item(2, i - 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(i - 1).Selected = True
|
||||
End If
|
||||
Else
|
||||
If dgv.Rows.Count > 0 Then 'dgv.CurrentCell = dgv.Item(2, dgv.Rows.Count - 1)
|
||||
dgv.ClearSelection()
|
||||
dgv.Rows(dgv.Rows.Count - 1).Selected = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03,2: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub usrcntl_CLOSE(sender As Object, e As EventArgs) Handles usrcntl.CLOSE
|
||||
hideDgv(usrcntl)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As EventArgs) Handles usrcntl.DGV_Click
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenAktiv
|
||||
If .SelectedRows.Count > 0 Then
|
||||
' If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
setMeValue(ToDataRow(.SelectedRows(0)))
|
||||
hideDgv(usrcntl)
|
||||
'End If
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 07: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Function ToDataRow(ByVal Value As DataGridViewRow) As DataRow
|
||||
Try
|
||||
Dim dv As System.Data.DataRowView = CType(Value.DataBoundItem, DataRowView)
|
||||
Return dv.Row
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub TextBox1_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
If e.KeyData = Keys.Tab And usrcntl.Visible Then ' wenn usrcntl eingeblendet, soll der TABULATOR als InputKey gesehen werden.
|
||||
If usrcntl.dgvKundenAktiv.SelectedRows.Count > 0 Then e.IsInputKey = True Else usrcntl.Visible = False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 09: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, usrcntl.DGV_KeyDown
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
With usrcntl.dgvKundenAktiv
|
||||
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
|
||||
If e.KeyCode = Keys.Return And .RowCount > 0 And .SelectedRows.Count = 0 Then .Rows(0).Selected = True
|
||||
|
||||
If .SelectedRows.Count > 0 Then
|
||||
' If IsNumeric(.SelectedRows(0).Cells("KdNr").Value) Then
|
||||
setMeValue(ToDataRow(.SelectedRows(0)))
|
||||
hideDgv(usrcntl)
|
||||
'End If
|
||||
Else
|
||||
usrcntl.Visible = False
|
||||
End If
|
||||
e.Handled = True
|
||||
e.SuppressKeyPress = True
|
||||
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 10: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub setMeValue(row As DataRow)
|
||||
Try
|
||||
If Not active Then Exit Sub
|
||||
Me.DR = row
|
||||
Me._value = ""
|
||||
If Me.DR Is Nothing Then
|
||||
Me.Text = ""
|
||||
Else
|
||||
Me._value = row(KEYPARAM).ToString
|
||||
Me.Text = row(If(DISPLAY_PARAM = "", KEYPARAM, DISPLAY_PARAM)).ToString
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
RaiseEvent VALUE_CHANGED()
|
||||
If Me.Text.Length > Me.MaxLength Then Me.Text = Me.Text.Substring(0, Me.MaxLength)
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 12: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub KdSearchBox_PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Handles Me.PropertyChanged
|
||||
' setMeValue() ???????????????
|
||||
End Sub
|
||||
|
||||
Sub initSearchBox(control As Control, SQL_SELECT As String, SQL_WhereParamList() As String, SQL_WHERE As String, SQL_ORDER_BY As String, KEYPARAM As String, Optional DISPLAY_PARAM As String = "", Optional conn_art As String = "FMZOLL", Optional key_visible As Boolean = True, Optional SrchWidth As Integer = 300, Optional Srchheight As Integer = 300, Optional INVISIBLE_COLUMNS() As String = Nothing)
|
||||
Try
|
||||
If control Is Nothing Then Exit Sub
|
||||
Me.form = control
|
||||
Me.usrcntl = New usrcntlKdSearch
|
||||
control.Controls.Add(usrcntl)
|
||||
|
||||
Me.SQL_WhereParamList = SQL_WhereParamList
|
||||
Me.SQL_SELECT = SQL_SELECT
|
||||
Me.SQL_WHERE = SQL_WHERE
|
||||
Me.KEYPARAM = KEYPARAM
|
||||
Me.DISPLAY_PARAM = DISPLAY_PARAM
|
||||
Me.SQL_ORDER_BY = SQL_ORDER_BY
|
||||
Me.conn_art = conn_art
|
||||
Me.key_visible = key_visible
|
||||
|
||||
Me.SrchHeight = Srchheight
|
||||
Me.SrchWidth = SrchWidth
|
||||
Me.INVISIBLE_COLUMNS = INVISIBLE_COLUMNS
|
||||
|
||||
'Me.usrcntl = usrcntl
|
||||
hideDgv(Me.usrcntl)
|
||||
active = True
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 13: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub KdSearchBox_LostFocus(sender As Object, e As EventArgs) Handles Me.LostFocus
|
||||
'THREADING ThreadWaitAndSee
|
||||
Dim ThreadWaitAndSee = New System.Threading.Thread(Sub()
|
||||
Try
|
||||
Threading.Thread.Sleep(300)
|
||||
' MsgBox(Me.form.ActiveControl.Name)
|
||||
If Me.form Is Nothing Then Exit Sub
|
||||
If Me.form.ActiveControl Is Nothing Then Exit Sub
|
||||
If Me.form.ActiveControl IsNot Me Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub)
|
||||
ThreadWaitAndSee.IsBackground = True
|
||||
ThreadWaitAndSee.Start()
|
||||
|
||||
Try
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
If usrcntl.dgvKundenAktiv.SelectedCells.Count = 0 And usrcntl.dgvKundenInAktiv.SelectedCells.Count = 0 Then
|
||||
Me.SelectionLength = 0
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("KdSearchBox_LostFocus: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub KdSearchBox_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
If _autoSizeGross Then
|
||||
Me.CharacterCasing = Windows.Forms.CharacterCasing.Upper
|
||||
' If Me.Text <> "" Then Me.Text = Me.Text.ToUpper
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_TextChanged(sender As Object, e As EventArgs) Handles Me.TextChanged
|
||||
If Me.Text.Length > Me.MaxLength Then Me.Text = Me.Text.Substring(0, Me.MaxLength)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub MySearchBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
|
||||
If Me._value = "" And Me.Text <> "" Then
|
||||
SET_VALUE(Me.Text, False) 'Versucht, ob der Wert genau passt
|
||||
End If
|
||||
' hideDgv(usrcntl) 'Geht ned, sonst kann man auch keinen Mausklick auf die DGV machen!!
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,709 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Globalization
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class MyTextBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
Implements INotifyPropertyChanged
|
||||
Property _numbersOnly As Boolean = False
|
||||
Property _numbersOnlyKommastellen As String = ""
|
||||
Property _numbersOnlyTrennzeichen As Boolean = True
|
||||
Property _ShortDateOnly As Boolean = False ' nicht mehr public , da fehler
|
||||
Property _ShortDateNew As Boolean = False
|
||||
Property _DateTimeOnly As Boolean = False
|
||||
Property _TimeOnly As Boolean = False
|
||||
Property _TimeOnly_Seconds As Boolean = False
|
||||
Property _Waehrung As Boolean = False
|
||||
Property _WaehrungZeichen As Boolean = True
|
||||
Property _Prozent As Boolean = False
|
||||
' Property MaxLines As String = ""
|
||||
Property MaxLines_Warning As String = ""
|
||||
Property MaxLines_Warning_Label As Label = Nothing
|
||||
Property MaxLineLength As Integer = -1
|
||||
|
||||
Public Event ValueChanged()
|
||||
|
||||
Public Sub New()
|
||||
|
||||
If _Waehrung Then MyBase.TextAlign = HorizontalAlignment.Right
|
||||
' Me.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_BindingContextChanged(sender As Object, e As EventArgs) Handles Me.BindingContextChanged
|
||||
' If _ShortDateOnly Then
|
||||
'If IsDate(sender.text) Then sender.text = CDate(sender.text).ToShortDateString
|
||||
' End If
|
||||
|
||||
' If _Waehrung Then
|
||||
'If IsNumeric(sender.text) Then sender.text = String.Format("{0:N2}", CDbl(sender.text))
|
||||
'End If
|
||||
' If _ShortDateNew Then
|
||||
'If IsDate(sender._value) Then
|
||||
'sender._value = MyBase.Text
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub fillWithSQL(sql As String, Optional conn As String = "SDL")
|
||||
' MsgBox((New SQL).getValueTxtBySql(sql, conn))
|
||||
Me._value = (New SQL).getValueTxtBySql(sql, conn)
|
||||
' MsgBox(Me._value)
|
||||
'Me.Text = Me._value
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_KeyDown(sender As Object, e As KeyPressEventArgs) Handles Me.KeyPress
|
||||
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
If False Then
|
||||
'geht end
|
||||
If MaxLineLength > 0 And e.KeyChar <> Chr(13) Then
|
||||
Dim str() As String = Me.Text.Split(vbNewLine)
|
||||
For Each s In Me.Lines
|
||||
If s.Length > MaxLineLength Then
|
||||
s = s.Substring(0, MaxLineLength)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If _numbersOnly Then
|
||||
|
||||
If (Microsoft.VisualBasic.Asc(e.KeyChar) < 48) _
|
||||
Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 57) Then
|
||||
e.Handled = True
|
||||
End If
|
||||
If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) Then
|
||||
e.Handled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
MyBase.CausesValidation = True
|
||||
If _ShortDateOnly Then MyBase.MaxLength = 10
|
||||
If _ShortDateNew Then MyBase.MaxLength = 10 ': addPicToGueltigBis()
|
||||
If _DateTimeOnly Then MyBase.MaxLength = 16 ': addPicToGueltigBis()
|
||||
|
||||
If _TimeOnly Then MyBase.MaxLength = 8
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Sub initDatePicture()
|
||||
addNowBtnToDate()
|
||||
'addPicToGueltigBis()
|
||||
End Sub
|
||||
Sub initDatePicture2()
|
||||
addNowBtnToDate2()
|
||||
'addPicToGueltigBis()
|
||||
End Sub
|
||||
|
||||
Sub initPINSHowPic()
|
||||
addNowBtnToPIN()
|
||||
'addPicToGueltigBis()
|
||||
End Sub
|
||||
Public Sub addNowBtnToDate()
|
||||
Dim tb = Me
|
||||
Dim pb As New MyLinkPicBoxVALUE
|
||||
tb.Parent.Controls.Add(pb)
|
||||
pb.Tag = "Heute"
|
||||
pb.Left = tb.Left + tb.Width + 5 : pb.Top = tb.Top
|
||||
pb.Height = 18 : pb.Width = 20
|
||||
pb.Anchor = tb.Anchor
|
||||
pb.SizeMode = PictureBoxSizeMode.Zoom
|
||||
pb.Cursor = Cursors.Hand
|
||||
pb.Image = My.Resources.today
|
||||
pb.linkedTextBox = tb
|
||||
|
||||
' ToolTip Text zuordnen
|
||||
Dim tooltip As New ToolTip '
|
||||
tooltip.SetToolTip(pb, "Heute")
|
||||
|
||||
AddHandler pb.Click, AddressOf linkclicked
|
||||
End Sub
|
||||
Public Sub addNowBtnToDate2()
|
||||
Dim tb As MyTextBox = Me
|
||||
Dim pb As New MyLinkPicBoxVALUE
|
||||
tb.Parent.Controls.Add(pb)
|
||||
pb.Tag = "Heute"
|
||||
pb.Left = tb.Left + tb.Width - 11 : pb.Top = tb.Top + tb.Height - 11
|
||||
pb.Height = 10 : pb.Width = 10
|
||||
pb.Anchor = tb.Anchor
|
||||
pb.SizeMode = PictureBoxSizeMode.Zoom
|
||||
'pb.Cursor = Cursors.Hand
|
||||
' pb.Image = My.Resources.ok
|
||||
'pb.BackColor = Color.Green
|
||||
pb.linkedTextBox = tb
|
||||
pb.BringToFront()
|
||||
' ToolTip Text zuordnen
|
||||
'Dim tooltip As New ToolTip '
|
||||
'tooltip.SetToolTip(pb, "Gül")
|
||||
|
||||
pb.Image = Nothing
|
||||
If tb.Text.Length = 10 AndAlso IsDate(tb.Text) Then
|
||||
If CDate(tb.Text) >= Now.ToShortDateString Then
|
||||
pb.Image = My.Resources.ok
|
||||
Else
|
||||
pb.Image = My.Resources.del
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
AddHandler tb.TextChanged, Sub(send As Object, ev As EventArgs)
|
||||
pb.Image = Nothing
|
||||
If send.text.length = 10 AndAlso IsDate(send.text) Then
|
||||
If CDate(send.text) >= Now.ToShortDateString Then
|
||||
pb.Image = My.Resources.ok
|
||||
Else
|
||||
pb.Image = My.Resources.del
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub addNowBtnToPIN()
|
||||
Dim tb = Me
|
||||
Dim pb As New MyLinkPicBoxVALUE
|
||||
tb.Parent.Controls.Add(pb)
|
||||
pb.Tag = "Feld bearbeiten"
|
||||
pb.Left = tb.Left + tb.Width + 5 : pb.Top = tb.Top
|
||||
pb.Height = 15 : pb.Width = 15
|
||||
pb.Anchor = tb.Anchor
|
||||
pb.SizeMode = PictureBoxSizeMode.Zoom
|
||||
pb.Cursor = Cursors.Hand
|
||||
pb.Image = My.Resources.stift
|
||||
pb.linkedTextBox = tb
|
||||
|
||||
' ToolTip Text zuordnen
|
||||
Dim tooltip As New ToolTip '
|
||||
tooltip.SetToolTip(pb, "Heute")
|
||||
|
||||
AddHandler pb.Click, AddressOf linkclickedPIN
|
||||
|
||||
'AddHandler tb.EnabledChanged, Sub(send, ev)
|
||||
' tb.ForeColor = Color.Black
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub linkclicked(sender As Object, e As EventArgs)
|
||||
'Dim DateTimePicker1 As New DateTimePicker
|
||||
' Me.Parent.Controls.Add(DateTimePicker1)
|
||||
Try
|
||||
Dim tb As TextBox = sender.linkedTextBox
|
||||
tb.Text = Now.ToShortDateString
|
||||
' DateTimePicker1.Focus()
|
||||
' SendKeys.Send("{F4}")
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub linkclickedPIN(sender As Object, e As EventArgs)
|
||||
'Dim DateTimePicker1 As New DateTimePicker
|
||||
' Me.Parent.Controls.Add(DateTimePicker1)
|
||||
Try
|
||||
Dim tb As TextBox = sender.linkedTextBox
|
||||
' tb.Enabled = True
|
||||
tb.ReadOnly = False
|
||||
tb.BackColor = Color.White
|
||||
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub addPicToGueltigBis()
|
||||
Dim tb As MyTextBox = Me
|
||||
Dim pb As New MyLinkPicBoxVALUE
|
||||
tb.Parent.Controls.Add(pb)
|
||||
pb.Tag = "Gültig Bis"
|
||||
pb.Left = tb.Left + tb.Width + 5 : pb.Top = tb.Top
|
||||
pb.Height = 18 : pb.Width = 20
|
||||
pb.SizeMode = PictureBoxSizeMode.Zoom
|
||||
pb.Name = "picGueltigBisUhr"
|
||||
' pb = checkGueltigBis(pb, tb)
|
||||
pb.linkedTextBox = tb
|
||||
pb.linkedPictureBox = pb
|
||||
pb.Image = My.Resources.uhr_notime
|
||||
|
||||
Dim tgb As New Label
|
||||
tb.Parent.Controls.Add(tgb)
|
||||
tgb.Name = "txtGueltigBisUhr"
|
||||
tgb.Left = tb.Left + tb.Width + pb.Width + 5 : tgb.Top = tb.Top
|
||||
' tgb.Visible = False
|
||||
' tgb.Text = "abgelaufen"
|
||||
tgb.ForeColor = Color.Red
|
||||
|
||||
AddHandler tb.TextChanged, AddressOf checkGueltigBis
|
||||
|
||||
checkGueltigBis(tb, New EventArgs)
|
||||
End Sub
|
||||
Sub checkGueltigBis(sender As Object, e As EventArgs)
|
||||
' MsgBox("änderung")
|
||||
Try
|
||||
Dim tb As TextBox = sender
|
||||
Dim pb As MyLinkPicBoxVALUE = CType(tb.FindForm.Controls.Find("picGueltigBisUhr", True)(0), MyLinkPicBoxVALUE)
|
||||
Dim tgb As Label = CType(tb.FindForm.Controls.Find("txtGueltigBisUhr", True)(0), Label)
|
||||
' MsgBox(tgb.Name)
|
||||
|
||||
|
||||
If tb.Text.Length = 10 And IsDate(tb.Text) Then
|
||||
If CDate(tb.Text) < Now Then
|
||||
pb.Image = My.Resources.uhr_red
|
||||
tgb.Text = "abgelaufen"
|
||||
tgb.Visible = True
|
||||
tgb.ForeColor = Color.Red
|
||||
ElseIf CDate(tb.Text) >= Now Then
|
||||
pb.Image = My.Resources.uhr_green
|
||||
tgb.Text = "gültig"
|
||||
'tgb.Visible = False
|
||||
tgb.ForeColor = Color.Green
|
||||
End If
|
||||
Else
|
||||
pb.Image = My.Resources.uhr_notime
|
||||
' tgb.Visible = False
|
||||
tgb.Text = ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Return
|
||||
End Sub
|
||||
Private Sub MyTextBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
|
||||
' If _DateOnly AndAlso Not isShortDate(sender.text) Then sender.focus()
|
||||
Dim pruefungHandled = False
|
||||
|
||||
If _numbersOnly Then
|
||||
'If sender.text.ToString.StartsWith("21") Then
|
||||
' For Each s In sender.text.ToString
|
||||
' MsgBox(s & " - " & Convert.ToByte(s))
|
||||
' Next
|
||||
|
||||
' ' MsgBox(CInt(sender.text.ToString.Chars(3)))
|
||||
'End If
|
||||
|
||||
|
||||
sender.text = sender.text.ToString.Replace(" ", "").Replace(Chr(160), "") ' 160: irgend ein Sonder-Leerzeichen
|
||||
pruefungHandled = True
|
||||
Try
|
||||
If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then
|
||||
Me._value = CInt(sender.text)
|
||||
ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then
|
||||
sender.text = CDbl(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
|
||||
Me._value = CDbl(sender.text)
|
||||
' Else
|
||||
' sender.text = CDbl(sender.text)
|
||||
ElseIf IsNumeric(sender.text) Then
|
||||
Me._value = CDbl(sender.text)
|
||||
Else
|
||||
Me._value = ""
|
||||
End If
|
||||
Catch : sender.ForeColor = System.Drawing.Color.Red
|
||||
End Try
|
||||
End If
|
||||
|
||||
If _Waehrung Then
|
||||
pruefungHandled = True
|
||||
Try
|
||||
' sender.text = String.Format("{0:N2}", CDbl(sender.text))
|
||||
If sender.text = "" Then
|
||||
Me._value = Nothing
|
||||
End If
|
||||
sender.text = CDbl(sender.text).ToString(If(_WaehrungZeichen, "C2", "N2")) ' String.Format("C2", CDbl(sender.text))
|
||||
sender.ForeColor = System.Drawing.Color.Black
|
||||
Me._value = CDbl(sender.text) 'sender.text)
|
||||
Catch ex As Exception
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
End Try
|
||||
|
||||
End If
|
||||
If _ShortDateOnly Then
|
||||
pruefungHandled = True
|
||||
Try 'wenn datetime wird es in shortdate umgewandelt
|
||||
If Me.Text <> "" Then sender.text = Convert.ToDateTime(sender.text).ToShortDateString
|
||||
Catch : Me.Text = "" : Me._value = Nothing 'Me.Focus()
|
||||
End Try
|
||||
If Not isShortDate(sender.text) Then sender.ForeColor = System.Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If _TimeOnly Then
|
||||
If Me.Text <> "" AndAlso IsNumeric(Me.Text) AndAlso CInt(Me.Text) >= 0 AndAlso CInt(Me.Text) < 24 Then
|
||||
pruefungHandled = True
|
||||
If _TimeOnly_Seconds Then
|
||||
Me.Text &= ":00:00"
|
||||
Else
|
||||
Me.Text &= ":00"
|
||||
End If
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
End If
|
||||
|
||||
If _ShortDateNew Then
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
|
||||
'------ falls Jahr zweistellig:
|
||||
Me.Text = Me.Text.Replace(",", ".")
|
||||
If Me.Text.Length = 8 Then
|
||||
Dim split = Me.Text.Split(".")
|
||||
If split.Count = 3 Then
|
||||
Me.Text = split(0) & "." & split(1) & ".20" & split(2)
|
||||
End If
|
||||
End If
|
||||
|
||||
' +2 = zwei Tage von heute weg
|
||||
If Me.Text <> "" AndAlso Not IsDate(Me.Text) AndAlso IsNumeric(Me.Text) Then
|
||||
Me.Text = Now.AddDays(Int(Me.Text)).ToShortDateString
|
||||
End If
|
||||
If (Me.Text.Length >= 6 And Me.Text.Length <= 10) AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900") Then
|
||||
'MsgBox(Me.Text)
|
||||
''------ falls Jahr zweistellig:
|
||||
'Dim split = Me.Text.Replace(",", ".").Split
|
||||
'If split.Count = 3 Then
|
||||
' Me.Text = split(0) & "." & split(1) & ".20" & split(2)
|
||||
'End If
|
||||
'MsgBox(Me.Text)
|
||||
'------
|
||||
Me._value = CDate(Me.Text).ToShortDateString 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToShortDateString
|
||||
ElseIf Me.Text = "" Then
|
||||
Me._value = ""
|
||||
Else
|
||||
Me.ForeColor = Color.Red
|
||||
End If
|
||||
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
If _DateTimeOnly Then
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
If Me.Text.Length > 16 Then Me.Text = Me.Text.Substring(0, 16)
|
||||
If (Me.Text.Length >= 6 And Me.Text.Length <= 16) AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900") Then
|
||||
'------ falls Jahr zweistellig:
|
||||
Dim split = Me.Text.Replace(",", ".").Split
|
||||
If split.Count = 3 Then
|
||||
Me.Text = split(0) & "." & split(1) & ".20" & split(2)
|
||||
End If
|
||||
'------
|
||||
Me._value = CDate(Me.Text).ToString("dd.MM.yyyy HH:mm") 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToString("dd.MM.yyyy HH:mm")
|
||||
ElseIf Me.Text = "" Then
|
||||
Me._value = ""
|
||||
Else
|
||||
Me.ForeColor = Color.Red
|
||||
End If
|
||||
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
|
||||
|
||||
If _Prozent Then
|
||||
pruefungHandled = True
|
||||
Try
|
||||
If sender.text = "" Then
|
||||
Me._value = "" : Propvalue = ""
|
||||
Else
|
||||
Me._value = CDbl(sender.text.ToString.Replace("%", "")) / 100
|
||||
End If
|
||||
Catch ex As Exception
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
Me._value = Propvalue
|
||||
End Try
|
||||
End If
|
||||
|
||||
If MaxLineLength > 0 Then
|
||||
Dim str() As String = Me.Lines
|
||||
For i = 0 To Me.Lines.Count - 1
|
||||
If str(i).Length > MaxLineLength Then
|
||||
str(i) = str(i).Substring(0, MaxLineLength)
|
||||
End If
|
||||
Next
|
||||
Me.Lines = str
|
||||
End If
|
||||
|
||||
|
||||
If Not pruefungHandled Then
|
||||
Me._value = Me.Text
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MyTextBox_Textchanged(sender As Object, e As EventArgs) Handles Me.TextChanged
|
||||
sender.ForeColor = System.Drawing.Color.Black
|
||||
Dim pruefungHandled = False
|
||||
|
||||
If _numbersOnly Then
|
||||
pruefungHandled = True
|
||||
If Not IsNumeric(sender.text) Then sender.ForeColor = System.Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If _TimeOnly Then
|
||||
pruefungHandled = True
|
||||
|
||||
Dim regTime1 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9])$")
|
||||
Dim regTime2 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$")
|
||||
If Not regTime1.IsMatch(sender.Text) And Not regTime2.IsMatch(sender.Text) Then
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
|
||||
If _Waehrung Then
|
||||
pruefungHandled = True
|
||||
End If
|
||||
If _Waehrung And False Then 'sonst bei jedem Zeichen kontrolle, zeiger hüpft
|
||||
pruefungHandled = True
|
||||
Try
|
||||
sender.text = CDbl(sender.text).ToString(If(_WaehrungZeichen, "C2", "N2")) ' String.Format("{0:N2}", CDbl(sender.text))
|
||||
Me._value = CDbl(sender.text)
|
||||
Catch ex As Exception
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
End Try
|
||||
End If
|
||||
|
||||
If _ShortDateNew Then
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
If Me.Text.Length = 10 AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900") Then
|
||||
Try
|
||||
Me._value = CDate(Me.Text).ToShortDateString 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToShortDateString
|
||||
Catch ex As Exception
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
End Try
|
||||
ElseIf Me.Text = "" Then
|
||||
Me._value = ""
|
||||
Else
|
||||
Me.ForeColor = Color.Red
|
||||
End If
|
||||
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
|
||||
If _Prozent Then
|
||||
'pruefungHandled = True
|
||||
'Dim txt = sender.text
|
||||
'If Not sender.text.ToString.Contains("%") Then txt = sender.text & " %"
|
||||
Me._value = sender.text
|
||||
End If
|
||||
|
||||
If _DateTimeOnly Then
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
If Me.Text.Length = 16 AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900 00:00") Then
|
||||
Me._value = CDate(Me.Text).ToString("dd.MM.yyyy HH:mm") 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToString("dd.MM.yyyy HH:mm")
|
||||
ElseIf Me.Text = "" Then
|
||||
Me._value = ""
|
||||
Else
|
||||
Me.ForeColor = Color.Red
|
||||
End If
|
||||
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
|
||||
|
||||
' If Me.Multiline And IsNumeric(MaxLines) Then
|
||||
'If Me.Lines.Length > MaxLines Then
|
||||
'Dim s() As String = Me.Text.Split(vbNewLine)
|
||||
' If s.Count > 3 Then
|
||||
'Me.Text = s(0) & vbNewLine & s(1) & vbNewLine & s(2)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
If Me.Multiline And IsNumeric(MaxLines_Warning) Then
|
||||
' If Me.Lines.Length > MaxLines Then
|
||||
If MaxLines_Warning_Label IsNot Nothing Then
|
||||
MaxLines_Warning_Label.Visible = CBool(Me.Lines.Length > MaxLines_Warning)
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
If Not pruefungHandled Then
|
||||
Me._value = Me.Text
|
||||
End If
|
||||
End Sub
|
||||
Function isShortDate(d) As Boolean
|
||||
Return CBool(IsDate(d) And d.length = 10)
|
||||
End Function
|
||||
|
||||
|
||||
Public Propvalue As String
|
||||
Public Property _value As String
|
||||
Get
|
||||
Return Propvalue
|
||||
End Get
|
||||
Set(v As String)
|
||||
' MsgBox(v)
|
||||
If _Prozent Then
|
||||
If IsNumeric(v) Then
|
||||
Propvalue = v
|
||||
Me.Text = String.Format("{0:P2}", CDbl(v))
|
||||
' OnPropertyChanged("_value")
|
||||
' MsgBox(String.Format("{0:P2}", CDbl(v)))
|
||||
End If
|
||||
ElseIf _ShortDateOnly Then
|
||||
If v Is Nothing Then
|
||||
Propvalue = ""
|
||||
Me.Text = ""
|
||||
Else
|
||||
Propvalue = v
|
||||
Me.Text = v
|
||||
End If
|
||||
ElseIf _Waehrung Then
|
||||
If v IsNot Nothing AndAlso IsNumeric(v) Then
|
||||
Propvalue = CDbl(v)
|
||||
Me.Text = CDbl(v).ToString(If(_WaehrungZeichen, "C2", "N2"))
|
||||
Else
|
||||
Propvalue = ""
|
||||
Me.Text = ""
|
||||
End If
|
||||
ElseIf _ShortDateNew Then
|
||||
If v Is Nothing Then
|
||||
Propvalue = ""
|
||||
Me.Text = ""
|
||||
Else
|
||||
Propvalue = v
|
||||
Me.Text = v
|
||||
End If
|
||||
ElseIf _DateTimeOnly Then
|
||||
If v Is Nothing Then
|
||||
Propvalue = ""
|
||||
Me.Text = ""
|
||||
Else
|
||||
If v.Length > 16 Then v = v.Substring(0, 16)
|
||||
Propvalue = v
|
||||
Me.Text = v
|
||||
End If
|
||||
ElseIf _numbersOnly Then
|
||||
|
||||
If Not _numbersOnlyTrennzeichen And IsNumeric(v) Then
|
||||
Propvalue = CInt(v)
|
||||
Me.Text = v
|
||||
ElseIf IsNumeric(Me._numbersOnlyKommastellen) And IsNumeric(v) Then
|
||||
Propvalue = CDbl(v)
|
||||
Me.Text = CDbl(v).ToString("N" & Me._numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
|
||||
ElseIf IsNumeric(v) Then
|
||||
Propvalue = CDbl(v)
|
||||
Me.Text = v
|
||||
Else
|
||||
Propvalue = ""
|
||||
Me.Text = ""
|
||||
End If
|
||||
Else
|
||||
If v IsNot Nothing AndAlso v.ToString.Length > Me.MaxLength Then
|
||||
Me.Text = v.Substring(0, Me.MaxLength)
|
||||
Propvalue = v.Substring(0, Me.MaxLength)
|
||||
Else
|
||||
Me.Text = v
|
||||
Propvalue = v
|
||||
End If
|
||||
End If
|
||||
RaiseEvent ValueChanged()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler _
|
||||
Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub OnPropertyChanged(ByVal name As String)
|
||||
' MsgBox("AHAASO")
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name))
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_Validating(sender As Object, e As CancelEventArgs) Handles Me.Validating
|
||||
If sender.text = "" Then e.Cancel = False : Exit Sub 'wenn der Test leer ist, stimmt die Eingabe
|
||||
|
||||
Dim errMessage As String = "Es ist ein Validierungsfehler aufgetreten:" & vbNewLine
|
||||
Dim errDescription As String = "Überprüfen Sie die Eingabe!"
|
||||
|
||||
If _numbersOnly Then
|
||||
Try
|
||||
'String.Format("{0:N2}", CDbl(sender.text))
|
||||
If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then
|
||||
sender.text = CInt(sender.text)
|
||||
ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then
|
||||
sender.text = CDbl(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
|
||||
Else
|
||||
sender.text = CDbl(sender.text)
|
||||
End If
|
||||
e.Cancel = False
|
||||
Catch ex As Exception
|
||||
errDescription = "Die Eingabe muss eine Zahl sein! (z.B. 123,45)"
|
||||
e.Cancel = True
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
If _Waehrung Then
|
||||
Try
|
||||
'String.Format("{0:N2}", CDbl(sender.text))
|
||||
CDbl(sender.text).ToString(If(_WaehrungZeichen, "C2", "N2"))
|
||||
e.Cancel = False
|
||||
Catch ex As Exception
|
||||
errDescription = "Die Eingabe muss eine Zahl sein! (z.B. 123,45)"
|
||||
e.Cancel = True
|
||||
End Try
|
||||
End If
|
||||
|
||||
If _Prozent Then
|
||||
e.Cancel = False
|
||||
End If
|
||||
|
||||
If _ShortDateOnly Then
|
||||
If isShortDate(sender.text) Then
|
||||
e.Cancel = False
|
||||
Else
|
||||
e.Cancel = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If _TimeOnly Then
|
||||
Me.Text = Me.Text.Replace(",", ":")
|
||||
Me.Text = Me.Text.Replace("-", ":")
|
||||
Me.Text = Me.Text.Replace(".", ":")
|
||||
Me.Text = Me.Text.Replace("/", ":")
|
||||
Dim regTime1 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9])$")
|
||||
Dim regTime2 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$")
|
||||
If _TimeOnly_Seconds Then
|
||||
|
||||
If regTime1.IsMatch(sender.Text) Then
|
||||
Me.Text += ":00"
|
||||
End If
|
||||
If regTime2.IsMatch(sender.Text) Then
|
||||
e.Cancel = False
|
||||
Else
|
||||
e.Cancel = True
|
||||
End If
|
||||
Else
|
||||
If regTime1.IsMatch(sender.Text) Then
|
||||
e.Cancel = False
|
||||
Else
|
||||
e.Cancel = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If e.Cancel Then
|
||||
'Try
|
||||
'DirectCast(Me.FindForm, frmKundenblatt).setInfo("err", errMessage & errDescription, 3)
|
||||
' Catch ex As Exception
|
||||
MsgBox(errMessage & errDescription)
|
||||
' End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox_Validated(sender As Object, e As EventArgs) Handles Me.Validated
|
||||
|
||||
'Wenns stimmt
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,187 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class NumericUpDownColumnRight
|
||||
Inherits DataGridViewColumn
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New(New NumericUpDownRightCell())
|
||||
End Sub
|
||||
|
||||
Public Overrides Property CellTemplate() As DataGridViewCell
|
||||
Get
|
||||
Return MyBase.CellTemplate
|
||||
End Get
|
||||
Set(ByVal value As DataGridViewCell)
|
||||
|
||||
' Ensure that the cell used for the template is a NumericUpDownCell.
|
||||
If Not (value Is Nothing) AndAlso Not value.GetType().IsAssignableFrom(GetType(NumericUpDownRightCell)) Then
|
||||
Throw New InvalidCastException("Must be a NumericUpDown")
|
||||
End If
|
||||
MyBase.CellTemplate = value
|
||||
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Public Class NumericUpDownRightCell
|
||||
Inherits DataGridViewTextBoxCell
|
||||
Public Sub New()
|
||||
'Me.Style.Format = "#.##"
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InitializeEditingControl(ByVal rowIndex As Integer, ByVal initialFormattedValue As Object, ByVal dataGridViewCellStyle As DataGridViewCellStyle)
|
||||
|
||||
' Set the value of the editing control to the current cell value.
|
||||
MyBase.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle)
|
||||
|
||||
Dim ctl As NumericUpDownRightEditingControl = CType(DataGridView.EditingControl, NumericUpDownRightEditingControl)
|
||||
ctl.Minimum = 0
|
||||
|
||||
Dim CurrentValue As Decimal = 0
|
||||
If Not DBNull.Value.Equals(Me.Value) Then
|
||||
If Not IsNumeric(Me.Value) Then
|
||||
Me.Value = 0
|
||||
End If
|
||||
If Integer.TryParse(Me.Value.ToString, CurrentValue) Then
|
||||
ctl.Value = CurrentValue
|
||||
End If
|
||||
Else
|
||||
ctl.Value = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Overrides ReadOnly Property EditType() As Type
|
||||
Get
|
||||
' Return the type of the editing contol that NumericUpDownCell uses.
|
||||
Return GetType(NumericUpDownRightEditingControl)
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides ReadOnly Property ValueType() As Type
|
||||
Get
|
||||
' Return the type of the value that NumericUpDownCell contains.
|
||||
Return GetType(Decimal)
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides ReadOnly Property DefaultNewRowValue() As Object
|
||||
Get
|
||||
' Use as the current default value.
|
||||
Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Class NumericUpDownRightEditingControl
|
||||
Inherits NumericUpDown
|
||||
Implements IDataGridViewEditingControl
|
||||
|
||||
Private dataGridViewControl As DataGridView
|
||||
Private valueIsChanged As Boolean = False
|
||||
Private rowIndexNum As Integer
|
||||
|
||||
Public Sub New()
|
||||
Me.DecimalPlaces = 0
|
||||
Me.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
|
||||
Me.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Right
|
||||
End Sub
|
||||
|
||||
Public Property EditingControlFormattedValue() As Object Implements IDataGridViewEditingControl.EditingControlFormattedValue
|
||||
|
||||
Get
|
||||
Return Me.Value.ToString("#")
|
||||
End Get
|
||||
|
||||
Set(ByVal value As Object)
|
||||
If TypeOf value Is Decimal Then
|
||||
Me.Value = Decimal.Parse(CStr(value))
|
||||
End If
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Public Function GetEditingControlFormattedValue(ByVal context As DataGridViewDataErrorContexts) As Object _
|
||||
Implements IDataGridViewEditingControl.GetEditingControlFormattedValue
|
||||
|
||||
Return Me.Value.ToString() ' Me.Value.ToString("#.##")
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub ApplyCellStyleToEditingControl(ByVal dataGridViewCellStyle As DataGridViewCellStyle) _
|
||||
Implements IDataGridViewEditingControl.ApplyCellStyleToEditingControl
|
||||
|
||||
Me.Font = dataGridViewCellStyle.Font
|
||||
Me.ForeColor = dataGridViewCellStyle.ForeColor
|
||||
Me.BackColor = dataGridViewCellStyle.BackColor
|
||||
|
||||
End Sub
|
||||
|
||||
Public Property EditingControlRowIndex() As Integer _
|
||||
Implements IDataGridViewEditingControl.EditingControlRowIndex
|
||||
|
||||
Get
|
||||
Return rowIndexNum
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
rowIndexNum = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Public Function EditingControlWantsInputKey(ByVal key As Keys, ByVal dataGridViewWantsInputKey As Boolean) As Boolean Implements IDataGridViewEditingControl.EditingControlWantsInputKey
|
||||
|
||||
' Let the NumericUpDown handle the keys listed.
|
||||
Select Case key And Keys.KeyCode
|
||||
Case Keys.Left, Keys.Up, Keys.Down, Keys.Right, Keys.Home, Keys.End, Keys.PageDown, Keys.PageUp
|
||||
|
||||
Return True
|
||||
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub PrepareEditingControlForEdit(ByVal selectAll As Boolean) _
|
||||
Implements IDataGridViewEditingControl.PrepareEditingControlForEdit
|
||||
|
||||
' No preparation needs to be done.
|
||||
|
||||
End Sub
|
||||
Public ReadOnly Property RepositionEditingControlOnValueChange() As Boolean Implements IDataGridViewEditingControl.RepositionEditingControlOnValueChange
|
||||
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
|
||||
End Property
|
||||
Public Property EditingControlDataGridView() As DataGridView Implements IDataGridViewEditingControl.EditingControlDataGridView
|
||||
|
||||
Get
|
||||
Return dataGridViewControl
|
||||
End Get
|
||||
Set(ByVal value As DataGridView)
|
||||
dataGridViewControl = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
Public Property EditingControlValueChanged() As Boolean Implements IDataGridViewEditingControl.EditingControlValueChanged
|
||||
|
||||
Get
|
||||
Return valueIsChanged
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
valueIsChanged = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
Public ReadOnly Property EditingControlCursor() As Cursor Implements IDataGridViewEditingControl.EditingPanelCursor
|
||||
Get
|
||||
Return MyBase.Cursor
|
||||
End Get
|
||||
End Property
|
||||
Protected Overrides Sub OnValueChanged(ByVal eventargs As EventArgs)
|
||||
|
||||
' Notify the DataGridView that the contents of the cell have changed.
|
||||
valueIsChanged = True
|
||||
Me.EditingControlDataGridView.NotifyCurrentCellDirty(True)
|
||||
MyBase.OnValueChanged(eventargs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
297
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/RichTextBoxEx.Designer.vb
generated
Normal file
297
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/RichTextBoxEx.Designer.vb
generated
Normal file
@@ -0,0 +1,297 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class RichTextBoxEx
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl1 overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(RichTextBoxEx))
|
||||
Me.rtb = New System.Windows.Forms.RichTextBox()
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.NewToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.OpenToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.SaveToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.PrintToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.FontToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.FontColorToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BoldToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.UnderlineToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.LeftToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.CenterToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.RightToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.BulletsToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.CutToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.CopyToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.PasteToolStripButton = New System.Windows.Forms.ToolStripButton()
|
||||
Me.toolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.SpellChecker = New NetSpell.SpellChecker.Spelling(Me.components)
|
||||
Me.FontDlg = New System.Windows.Forms.FontDialog()
|
||||
Me.ColorDlg = New System.Windows.Forms.ColorDialog()
|
||||
Me.OpenFileDlg = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.SaveFileDlg = New System.Windows.Forms.SaveFileDialog()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'rtb
|
||||
'
|
||||
Me.rtb.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.rtb.Location = New System.Drawing.Point(0, 25)
|
||||
Me.rtb.Name = "rtb"
|
||||
Me.rtb.Size = New System.Drawing.Size(412, 317)
|
||||
Me.rtb.TabIndex = 0
|
||||
Me.rtb.Text = ""
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripButton, Me.OpenToolStripButton, Me.SaveToolStripButton, Me.PrintToolStripButton, Me.toolStripSeparator, Me.FontToolStripButton, Me.FontColorToolStripButton, Me.BoldToolStripButton, Me.UnderlineToolStripButton, Me.ToolStripSeparator4, Me.LeftToolStripButton, Me.CenterToolStripButton, Me.RightToolStripButton, Me.ToolStripSeparator3, Me.BulletsToolStripButton, Me.ToolStripSeparator2, Me.CutToolStripButton, Me.CopyToolStripButton, Me.PasteToolStripButton, Me.toolStripSeparator1})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(412, 25)
|
||||
Me.ToolStrip1.TabIndex = 1
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'NewToolStripButton
|
||||
'
|
||||
Me.NewToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.NewToolStripButton.Image = CType(resources.GetObject("NewToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.NewToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.NewToolStripButton.Name = "NewToolStripButton"
|
||||
Me.NewToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.NewToolStripButton.Text = "&New"
|
||||
Me.NewToolStripButton.Visible = False
|
||||
'
|
||||
'OpenToolStripButton
|
||||
'
|
||||
Me.OpenToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.OpenToolStripButton.Image = CType(resources.GetObject("OpenToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.OpenToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.OpenToolStripButton.Name = "OpenToolStripButton"
|
||||
Me.OpenToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.OpenToolStripButton.Text = "&Open"
|
||||
Me.OpenToolStripButton.Visible = False
|
||||
'
|
||||
'SaveToolStripButton
|
||||
'
|
||||
Me.SaveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.SaveToolStripButton.Image = CType(resources.GetObject("SaveToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.SaveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.SaveToolStripButton.Name = "SaveToolStripButton"
|
||||
Me.SaveToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.SaveToolStripButton.Text = "&Save"
|
||||
Me.SaveToolStripButton.Visible = False
|
||||
'
|
||||
'PrintToolStripButton
|
||||
'
|
||||
Me.PrintToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.PrintToolStripButton.Image = CType(resources.GetObject("PrintToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.PrintToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.PrintToolStripButton.Name = "PrintToolStripButton"
|
||||
Me.PrintToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.PrintToolStripButton.Text = "&Print"
|
||||
Me.PrintToolStripButton.Visible = False
|
||||
'
|
||||
'toolStripSeparator
|
||||
'
|
||||
Me.toolStripSeparator.Name = "toolStripSeparator"
|
||||
Me.toolStripSeparator.Size = New System.Drawing.Size(6, 25)
|
||||
Me.toolStripSeparator.Visible = False
|
||||
'
|
||||
'FontToolStripButton
|
||||
'
|
||||
Me.FontToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.FontToolStripButton.Image = CType(resources.GetObject("FontToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.FontToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.FontToolStripButton.Name = "FontToolStripButton"
|
||||
Me.FontToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.FontToolStripButton.Text = "Font"
|
||||
'
|
||||
'FontColorToolStripButton
|
||||
'
|
||||
Me.FontColorToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.FontColorToolStripButton.Image = CType(resources.GetObject("FontColorToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.FontColorToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.FontColorToolStripButton.Name = "FontColorToolStripButton"
|
||||
Me.FontColorToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.FontColorToolStripButton.Text = "Font Color"
|
||||
'
|
||||
'BoldToolStripButton
|
||||
'
|
||||
Me.BoldToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.BoldToolStripButton.Image = CType(resources.GetObject("BoldToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.BoldToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BoldToolStripButton.Name = "BoldToolStripButton"
|
||||
Me.BoldToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.BoldToolStripButton.Text = "Bold"
|
||||
'
|
||||
'UnderlineToolStripButton
|
||||
'
|
||||
Me.UnderlineToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.UnderlineToolStripButton.Image = CType(resources.GetObject("UnderlineToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.UnderlineToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.UnderlineToolStripButton.Name = "UnderlineToolStripButton"
|
||||
Me.UnderlineToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.UnderlineToolStripButton.Text = "Underline"
|
||||
'
|
||||
'ToolStripSeparator4
|
||||
'
|
||||
Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
|
||||
Me.ToolStripSeparator4.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'LeftToolStripButton
|
||||
'
|
||||
Me.LeftToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.LeftToolStripButton.Image = CType(resources.GetObject("LeftToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.LeftToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.LeftToolStripButton.Name = "LeftToolStripButton"
|
||||
Me.LeftToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.LeftToolStripButton.Text = "Left"
|
||||
'
|
||||
'CenterToolStripButton
|
||||
'
|
||||
Me.CenterToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.CenterToolStripButton.Image = CType(resources.GetObject("CenterToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.CenterToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.CenterToolStripButton.Name = "CenterToolStripButton"
|
||||
Me.CenterToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.CenterToolStripButton.Text = "Center"
|
||||
'
|
||||
'RightToolStripButton
|
||||
'
|
||||
Me.RightToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.RightToolStripButton.Image = CType(resources.GetObject("RightToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.RightToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.RightToolStripButton.Name = "RightToolStripButton"
|
||||
Me.RightToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.RightToolStripButton.Text = "Right"
|
||||
'
|
||||
'ToolStripSeparator3
|
||||
'
|
||||
Me.ToolStripSeparator3.Name = "ToolStripSeparator3"
|
||||
Me.ToolStripSeparator3.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'BulletsToolStripButton
|
||||
'
|
||||
Me.BulletsToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.BulletsToolStripButton.Image = CType(resources.GetObject("BulletsToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.BulletsToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BulletsToolStripButton.Name = "BulletsToolStripButton"
|
||||
Me.BulletsToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.BulletsToolStripButton.Text = "Bullets"
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
|
||||
Me.ToolStripSeparator2.Visible = False
|
||||
'
|
||||
'CutToolStripButton
|
||||
'
|
||||
Me.CutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.CutToolStripButton.Image = CType(resources.GetObject("CutToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.CutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.CutToolStripButton.Name = "CutToolStripButton"
|
||||
Me.CutToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.CutToolStripButton.Text = "C&ut"
|
||||
Me.CutToolStripButton.Visible = False
|
||||
'
|
||||
'CopyToolStripButton
|
||||
'
|
||||
Me.CopyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.CopyToolStripButton.Image = CType(resources.GetObject("CopyToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.CopyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.CopyToolStripButton.Name = "CopyToolStripButton"
|
||||
Me.CopyToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.CopyToolStripButton.Text = "&Copy"
|
||||
Me.CopyToolStripButton.Visible = False
|
||||
'
|
||||
'PasteToolStripButton
|
||||
'
|
||||
Me.PasteToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.PasteToolStripButton.Image = CType(resources.GetObject("PasteToolStripButton.Image"), System.Drawing.Image)
|
||||
Me.PasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.PasteToolStripButton.Name = "PasteToolStripButton"
|
||||
Me.PasteToolStripButton.Size = New System.Drawing.Size(23, 22)
|
||||
Me.PasteToolStripButton.Text = "&Paste"
|
||||
Me.PasteToolStripButton.Visible = False
|
||||
'
|
||||
'toolStripSeparator1
|
||||
'
|
||||
Me.toolStripSeparator1.Name = "toolStripSeparator1"
|
||||
Me.toolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'SpellChecker
|
||||
'
|
||||
Me.SpellChecker.Dictionary = Nothing
|
||||
'
|
||||
'OpenFileDlg
|
||||
'
|
||||
Me.OpenFileDlg.FileName = "OpenFileDialog1"
|
||||
'
|
||||
'RichTextBoxEx
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Controls.Add(Me.rtb)
|
||||
Me.Name = "RichTextBoxEx"
|
||||
Me.Size = New System.Drawing.Size(412, 342)
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Public WithEvents rtb As System.Windows.Forms.RichTextBox
|
||||
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
|
||||
Friend WithEvents NewToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents OpenToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents SaveToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents PrintToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents toolStripSeparator As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents CutToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents CopyToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents PasteToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents toolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents SpellChecker As NetSpell.SpellChecker.Spelling
|
||||
Friend WithEvents FontDlg As System.Windows.Forms.FontDialog
|
||||
Friend WithEvents ColorDlg As System.Windows.Forms.ColorDialog
|
||||
Friend WithEvents OpenFileDlg As System.Windows.Forms.OpenFileDialog
|
||||
Friend WithEvents SaveFileDlg As System.Windows.Forms.SaveFileDialog
|
||||
Friend WithEvents FontToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents FontColorToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents BoldToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents UnderlineToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents LeftToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents CenterToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents RightToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents BulletsToolStripButton As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator4 As System.Windows.Forms.ToolStripSeparator
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,299 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="NewToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAERSURBVDhPrZDbSgJRGIXnpewd6jXsjSQvIrwoI0RQMChU
|
||||
0iiDPCGiE3ZCRkvR8VzTeBhnyR5/ccaZNnPhB4t9sdf6Ln5hb8QeathNJFVFKF5C8DqL4ksDVHWGDf7j
|
||||
LHyPg6NjviSaFqlu5yQYR+KpupaIkrMknCxT3Y7v/NYYb0ITK1c3BarbWWhLQ7IR0cTKReyZ6lZ0XYei
|
||||
ztHpK4bAc+h1FgQijzSxMptrGIxVSO0xX3AaStFki7bUMVFmaMm/eJMGfIH/MkGzLep0AXn4h/r3CJV3
|
||||
mS9gn2bY4UY/UzQ7E9TqfeTFtnuB+XAfzSHKr11kSl/uBebDiZ89ZCst3OUkdwL28sIVsE83ock+EIQV
|
||||
2Mz2wxeg6/UAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="OpenToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJHSURBVDhPxZBdSNNhFMb/F110ZZEVhVBgeeHNICiiuggp
|
||||
olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdNKMwr7kApFItTUkWZqVhSVYmao5Nevvy7UoYR3HXh4
|
||||
4XCe33nOKyy3lAY7l9RWMo0O/raWXxEyo5spVYTNvOGyfIRPfW+ptOkXqaPl6T83hcRmExSdgzAz3NVm
|
||||
YWyoYla/B+1M9JtxWLPpaH22JORIjI6gKAMB0jyEimIdo4OlbuaprwVMOOMovammpDADc34qppwUrmnl
|
||||
5Kni3aFlFg2j3y1z5mnRTJccnNIltQhwq0jFry+mOXNtpWZWDx1Z1NhV3C3JwGFOw25SYjVe5oYhiUKd
|
||||
HKMmwQUrMWUw/CF3NnZvvYKqUh1TvUroS3fXe7HXkwidMngTS2t5KLbregSzMY2f3Wr4qKW6LJvGR1rX
|
||||
0MLor8OhKYTJBn/GHvvxrliCTBrsOqXIoOBHh5K+hmSq7FqmexTQHuUytkaKxuNMNgYyVneA4Qd7GKjc
|
||||
hjLaRzxH7gIU6JIZaEvgtk1D8wsxSWecCDgNzWFMvwxm/PkhRmr3Mli1nW9lvjRdWc0Jf+/5jzRmyWmv
|
||||
S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt
|
||||
5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg
|
||||
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="SaveToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIySURBVDhPrZLfS5NRGMfff6H7boIuuq2pMZyL1eAt11CW
|
||||
DcOKsB9vpFmaLtNExco0av6CbIVLJ61Wk3BSkT/AFCkRZSpZmrmiJQ41xSaCwdfznL15XEUX0Reem5f3
|
||||
8znnec4j/Zc8fxYGla91CS3eRTx0z6OpMYS7jmnU1X6B/VYA18snUVoyjsKCt8jLHcH5c36ouCQR2NUJ
|
||||
1Nas4G9ZXlmFKbULh1Kf8lJxSfI+WeCCyopv6q+/h+DQ/DJ2WV5Ao1FgPegRAveDOS4oLfmq/h6dn/DH
|
||||
4AJizD4UXJrCAUuzEDgbZrjgou2DiohshIcnQtgme5GTPYbkJKcQ1N8OckHW2REVi+RXuM8fxGaDG4oy
|
||||
ALPZIQQ11Z+5QDk1oKJ/hjv7P2FTfCMOH3mFxMQ6IbhROYWOdrCnBI4dfwPr0V4+bRoY9UzXppMjcDdS
|
||||
rC8hy3YhuFI2gTYf2A4Aza4f7N2/o/zaLB8qDYx6zszwr8P7k1thNFYIweXCMXgeAfedq2xxwjClZUeV
|
||||
Jd2GtDNFETiJwfs8MBjKhMCWN8pgoLoqzE8miH1GjE7G4PsZjE7OQsm9ij2mFg7rdrug1xcJAa2l4w7W
|
||||
r00Cgk/n38S7wBwC04u4UGxHrMHF4CbEJtyDLj5fCDIzhljfSxzeavRgyw4Zj9t64GvvQ0d3P3pfD2Kv
|
||||
2QqNvgFxDN6urYdWmyMElJMnevh60obRktA701PRtGlg1DOdSkXwzrisaMG/RZLWAE60OMW5fNhvAAAA
|
||||
AElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PrintToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIpSURBVDhPtZL/T1JRGMb5p1itrVZbbRpqZbawnBENV1I0
|
||||
jGlByTSyJTXJwq2oKZQb1KAv6JCYWSxvBrkkZUq4CeQEiRABFeLL072Xa0zRra31bO8v57zP5znnPYf1
|
||||
X+TxhWF6O7VtGYcnwbSWijKPOLzYrPSvLPwLS3huGUMlT7o9wGD9grVUBj+icdid03S9tDmgNxNwTgVQ
|
||||
J+rA8XNtWwM+uuZATMwxmQVRycuJFNyzIRitDlScugKzjSgFRGJJaIwEsrk8AsHIhnSL/Ssck37UNipQ
|
||||
I5DjtuYV7uksRYhr2kebhx2eP6nrycFIEh5fBA/1Nvru8q5+PDaOovK0rABwfwugWzcErfkzHhjsePL6
|
||||
E7q1VrTdNUDcrgGvSYlDZHN5XTNOnL8BVe8AJAoNDtZfLgDu9L1BPJmikzcrk81hlRwodZJwdBXziwnI
|
||||
OrVoaOkiT8C8hKLHBPO7CbywOaE1jeC+bhAd6meQdvZC1KoG/5IS3MZ2HObLUHZSggvkWq3wOvbWiAqA
|
||||
VpWeyStVfCUNf3AZ4zNhfHCFMEDMgye+hYr6FrDLzxQAUuVTpr0ocn74mchg5vsKRt1RcHp2Qv9+kZ78
|
||||
UcE17KkWFgHNN/uQzgBkGKLJPBZiecyGchjzrmFwPIF++xJUbDbUQzEacIArLpopSRSP4CUN1Obf1Abz
|
||||
uqob5KjiXwWH/GVl5HPt5zZh37GL2H1EiF1VZ7GDI6CNW5r/TSzWbwHYL0mKJ5czAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="FontToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABfSURBVDhPvY0LCsAgDEN79N3cWSQQqo2/sQfBiXmZ/UQp
|
||||
LUdAPhpgeXuAJf5+6umRsODgDlkOoBzDcjqAcoSldGBFdroBiByA8ihTsuLSgCrJATxyGPX2DfEPs1xj
|
||||
9gIL0Y8M2yQbFgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="FontColorToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABfSURBVDhP1Y9bCgAgCAQ7uje3QkV7SGX9NLAkluuWfAC5
|
||||
OAegDgPSGYIMQilkuyiQQob7egPdbuujFDo0aoHd3kL9jRRzA/sVbo3421sDJ4U+IFn6O9FLih3e6HuD
|
||||
hBmOGN7KIoUY1gAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BoldToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA8SURBVDhP7ctBCgAgEMPA/f+n9broFD2LgV5CWp+NcdgV
|
||||
OshFFMtFFMtFerzuCh3kIorlIorlSA+196ia6kE6xgBns7MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="UnderlineToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA3SURBVDhPYxh+4D8aBgFsYngBNoVEawaBUQOoZUBDQwNY
|
||||
A5QmyQAQQNZEsmaKADab0fGgAgwMAAIENs2gnDUTAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="LeftToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAxSURBVDhPYxg04D+ZmHoAm+nYMO0ANtuIwdQD2EzHhmkH
|
||||
sNlGDKYewGY6Njz8AAMDAGJeR7nOul6/AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="CenterToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAwSURBVDhP3c2xCQAACMTA339pXSCFSArxIHVyRi3z0YXy
|
||||
0WWSjy6Ujy6TfHSh/kgacz9HucQTphAAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="RightToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAxSURBVDhPYxg+4D+ZmHYAm23YMPUANtOJwbQD2GzDhqkH
|
||||
sJlODKYdwGYbNjzggIEBAE1aR7nHB4ecAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="BulletsToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABkSURBVDhPY6AKyO86WFDQfeg/iIYKkQZAmkNbnvyXta76
|
||||
DxViYGFi+Y8PQ5VBAMhmkGYgJs8FAw9GA5EKILFiWUFixfL/IBoqRBoAafYsOvpf0jiTvEAE2QzSLGmU
|
||||
MeQCkYEBAD3tUdo+/cEPAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="CutToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGDSURBVDhPrZFNSwJRGIX9NYGbFoUlFElY1EJQKEYhCJsi
|
||||
LaVsERnRF5iCaSZJO1toCDVGFkgoFpWQWWRR2aIvUxm1BKN1wSnHCFw4TOCzue+9nPNw4eVVnav4Izzb
|
||||
QfxeGZ5TWaxT/rK3irzmC7CsusvC1G4IkbNLboIiDieF4GGUKeTeClDpppF8eeEu2PIfwfrzizSdw3Hk
|
||||
EnKlFpkMzV2wH77AosOFTV8A+vkl9CiHuJeLJNNZjM8tYWB0FkTvMAwmy/8ERTR6CwjlGAi1Ccence6C
|
||||
1NsXzN4PKIxJLLgeIJ2MoXvmFraNBKK3eXZRIveJPvs7FIYniEkXZENOdE+GIZ2Ko10TwLK7tJmKmL0F
|
||||
EEYarYM+NMnt0C1sQzpx/lcSEnZ2gcKY/gs0dlmZuWvmjjmpwA1qxVp2AWFIMAF/OAGBzMjMI7ZrtJCb
|
||||
4Df3o4Zfxy7QrdxDRFKol5khkpR2H4qmIOzUQNBGwrsXYxccnNOQqNbQ0KGGZ+eEPVwdeLxvqqrf4wGh
|
||||
TNAAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="CopyToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHkSURBVDhPvZHfS1NhHIf3p5QypLr2D4goMwoMCi/qIugH
|
||||
Xe1Cr7qKDIMkZixwNhfWLGWbnuki0kXKzLU023KubBNPJrbRdOzocm6e2dPOO21mMS+CHvjcvOf9PF++
|
||||
79H9M+7RT2iRRsIi9sEAXe43yAvf2LpSHq28G9uAnytNT4jMLewtcQ2Ht2pF8ps/aOt+gccX5lxD694S
|
||||
+1BQFD1RkN5DSFa4Z3uONKbgHE3h8KZ4OJTC1J8UiSzmfhd2uf1CoJHbyKOsZokl0kKwm+aeJaov+wjO
|
||||
rpQkVqdXfOz0bWAcVLghfaXxkUz3y2VxvpMGSwL3uMKh+gHezSSLEnNhX23vtYzKUirDfGyFj/Iy1mdx
|
||||
UWqR8iKhwtQLxjgH659y4EwvVXWPiwJt3/Ws+muywRrlqvkDdx3zQrCN8l1ldnEd3/QqFmkS/akHJYGS
|
||||
zjLzOUEwEsMf+sLI2zmaOou/93pPGoM5zvk7UU7fnBKxSBPoT7SXBNW1F/9Io2lKCNTCeomUyrS8xnBA
|
||||
wfUqyf1eP5U1ptJD/o1LzeNCsHPydtqdr6k4aiwvOHvNSya3ibU/QIdrEkvfhJislc32MfYfuV1eUGPw
|
||||
FF7bIVJVZ0N/soPK421UHGstlFvYd/hWecF/Qqf7CR0A5wwgSQA2AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PasteToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJSSURBVDhPtZJrSJNRGMdf6IN9KbpQn/pUEH2JIoLqQ0Zh
|
||||
FqYZRmJG1iKmUqKyLB2pqSm6vC1Nm5GXoeatEsVJ0RASR3eNzegikRq5lrV3857Fr/d9ddlICoL+8OfA
|
||||
Oef/e57zcIT/os7WLMw302muSGJ2689qqi7A44q8IzjtNYzarzHQm8tZtT8FmRqu6LToMxN+B8qhCbGR
|
||||
KVcDE85ajKUaxoaryEuL4UVXIudPB5Ko2oy98xjDptXERuz3hsgAOTzlqqMk6yjdllzE90UM9Wp5azlB
|
||||
S1kwkeG+1CSv4mmBQPThfd6Ahqq8GYB4A11yBKmaMLQxoZyLDkGjDiZOFUhUuB+FsWsUQFiArzegtlzH
|
||||
pFjPpMPA2GA2jucx2KqWK7ZWLqO7dBGP9D5KWLbfto3eAKMhi3FHBeP9GYy9PMXos4OIrYvJrzSRbWjm
|
||||
wuV6EnVG4tLLiEzSExGf4w0oL05nZEDPaK+akceBuO9v4uPtFUrYo6npbzhdE/QPOQmNSiPouHYOUpaf
|
||||
gvgqA/dDf9wd63G1r2SgUlAqyyq/1anYUGfG2mdXwne7bOwJUc1AinOS+NxzBpd5HWLbUhyNPvRdF5S2
|
||||
v05/54tbqvzBifWNHUvPOwLC4/CXwrv2HsB3+w6EwosJOB5ESeElfGpayGD1AmwlArHSm+W2PR1clToo
|
||||
MrbT0mFTVtlbN6xFuJQar3wQz5Q9VksD+7XyPctrJdx4p5s605M5gKz8lJPSDwtGFbKboJ1blAN52vKb
|
||||
PdXm80/AfDokTVu+8DfPXv9XCcIPTvjvLQ8YoakAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="SpellChecker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>119, 17</value>
|
||||
</metadata>
|
||||
<metadata name="FontDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>234, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ColorDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>345, 17</value>
|
||||
</metadata>
|
||||
<metadata name="OpenFileDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>459, 17</value>
|
||||
</metadata>
|
||||
<metadata name="SaveFileDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>591, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,139 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class RichTextBoxEx
|
||||
|
||||
Private Sub RichTextBoxEx_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||
' Load control
|
||||
rtb.Focus()
|
||||
End Sub
|
||||
|
||||
' Spell checking thanks to: http://www.codeproject.com/KB/string/netspell.aspx
|
||||
|
||||
' Handles when user chooses to delete in spell cehck
|
||||
Private Sub SpellChecker_DeletedWord(ByVal sender As Object, ByVal e As NetSpell.SpellChecker.SpellingEventArgs) Handles SpellChecker.DeletedWord
|
||||
'save existing selecting
|
||||
Dim start As Integer = rtb.SelectionStart
|
||||
Dim length As Integer = rtb.SelectionLength
|
||||
|
||||
'select word for this event
|
||||
rtb.Select(e.TextIndex, e.Word.Length)
|
||||
|
||||
'delete word
|
||||
rtb.SelectedText = ""
|
||||
|
||||
If ((start + length) > rtb.Text.Length) Then
|
||||
length = 0
|
||||
End If
|
||||
|
||||
'restore selection
|
||||
rtb.Select(start, length)
|
||||
|
||||
End Sub
|
||||
|
||||
' Handles replacing a word from spell checking
|
||||
Private Sub SpellChecker_ReplacedWord(ByVal sender As Object, ByVal e As NetSpell.SpellChecker.ReplaceWordEventArgs) Handles SpellChecker.ReplacedWord
|
||||
'save existing selecting
|
||||
Dim start As Integer = rtb.SelectionStart
|
||||
Dim length As Integer = rtb.SelectionLength
|
||||
|
||||
'select word for this event
|
||||
rtb.Select(e.TextIndex, e.Word.Length)
|
||||
|
||||
'replace word
|
||||
rtb.SelectedText = e.ReplacementWord
|
||||
|
||||
If ((start + length) > rtb.Text.Length) Then
|
||||
length = 0
|
||||
End If
|
||||
|
||||
'restore selection
|
||||
rtb.Select(start, length)
|
||||
End Sub
|
||||
|
||||
' Update buttons when text is selected
|
||||
Private Sub rtb_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtb.SelectionChanged
|
||||
' see which buttons should be checked or unchecked
|
||||
BoldToolStripButton.Checked = rtb.SelectionFont.Bold
|
||||
UnderlineToolStripButton.Checked = rtb.SelectionFont.Underline
|
||||
LeftToolStripButton.Checked = IIf(rtb.SelectionAlignment = System.Windows.Forms.HorizontalAlignment.Left, True, False)
|
||||
CenterToolStripButton.Checked = IIf(rtb.SelectionAlignment = System.Windows.Forms.HorizontalAlignment.Center, True, False)
|
||||
RightToolStripButton.Checked = IIf(rtb.SelectionAlignment = System.Windows.Forms.HorizontalAlignment.Right, True, False)
|
||||
BulletsToolStripButton.Checked = rtb.SelectionBullet
|
||||
|
||||
'cmbFontName.Text = rtb.SelectionFont.Name
|
||||
'cmbFontSize.Text = rtb.SelectionFont.SizeInPoints
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub checkBullets()
|
||||
If rtb.SelectionBullet = True Then
|
||||
BulletsToolStripButton.Checked = True
|
||||
Else
|
||||
BulletsToolStripButton.Checked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FontToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripButton.Click
|
||||
If FontDlg.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
|
||||
rtb.SelectionFont = FontDlg.Font
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FontColorToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontColorToolStripButton.Click
|
||||
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
|
||||
rtb.SelectionColor = ColorDlg.Color
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BoldToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BoldToolStripButton.Click
|
||||
' Switch Bold
|
||||
Dim currentFont As System.Drawing.Font = rtb.SelectionFont
|
||||
Dim newFontStyle As System.Drawing.FontStyle
|
||||
If rtb.SelectionFont.Bold = True Then
|
||||
newFontStyle = currentFont.Style - Drawing.FontStyle.Bold
|
||||
Else
|
||||
newFontStyle = currentFont.Style + Drawing.FontStyle.Bold
|
||||
End If
|
||||
rtb.SelectionFont = New Drawing.Font(currentFont.FontFamily, currentFont.Size, newFontStyle)
|
||||
|
||||
' Check/Uncheck Bold button
|
||||
BoldToolStripButton.Checked = IIf(rtb.SelectionFont.Bold, True, False)
|
||||
End Sub
|
||||
|
||||
Private Sub SpellcheckToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
SpellChecker.Text = rtb.Text
|
||||
''SpellChecker.SpellCheck()
|
||||
End Sub
|
||||
|
||||
Private Sub UnderlineToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UnderlineToolStripButton.Click
|
||||
' Switch Underline
|
||||
Dim currentFont As System.Drawing.Font = rtb.SelectionFont
|
||||
Dim newFontStyle As System.Drawing.FontStyle
|
||||
If rtb.SelectionFont.Underline = True Then
|
||||
newFontStyle = currentFont.Style - Drawing.FontStyle.Underline
|
||||
Else
|
||||
newFontStyle = currentFont.Style + Drawing.FontStyle.Underline
|
||||
End If
|
||||
rtb.SelectionFont = New Drawing.Font(currentFont.FontFamily, currentFont.Size, newFontStyle)
|
||||
|
||||
' Check/Uncheck Underline button
|
||||
UnderlineToolStripButton.Checked = IIf(rtb.SelectionFont.Underline, True, False)
|
||||
End Sub
|
||||
|
||||
Private Sub LeftToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeftToolStripButton.Click
|
||||
rtb.SelectionAlignment = HorizontalAlignment.Left
|
||||
End Sub
|
||||
|
||||
Private Sub CenterToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CenterToolStripButton.Click
|
||||
rtb.SelectionAlignment = HorizontalAlignment.Center
|
||||
End Sub
|
||||
|
||||
Private Sub RightToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RightToolStripButton.Click
|
||||
rtb.SelectionAlignment = HorizontalAlignment.Right
|
||||
End Sub
|
||||
|
||||
Private Sub BulletsToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BulletsToolStripButton.Click
|
||||
rtb.SelectionBullet = Not rtb.SelectionBullet
|
||||
BulletsToolStripButton.Checked = rtb.SelectionBullet
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,254 @@
|
||||
'2007 KLEINMA
|
||||
'www.zerosandtheone.com
|
||||
|
||||
Option Strict On
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Security.Permissions
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace Kleinma.Controls
|
||||
|
||||
Public Class WebBrowserEx
|
||||
Inherits WebBrowser
|
||||
|
||||
Private cookie As AxHost.ConnectionPointCookie
|
||||
Private helper As WebBrowser2EventHelper
|
||||
|
||||
'NEW EVENTS THAT WILL NOW BE EXPOSED
|
||||
Public Event NewWindow2 As WebBrowserNewWindow2EventHandler
|
||||
Public Event NavigateError As WebBrowserNavigateErrorEventHandler
|
||||
|
||||
'DELEGATES TO HANDLE PROCESSING OF THE EVENTS
|
||||
Public Delegate Sub WebBrowserNewWindow2EventHandler(ByVal sender As Object, ByVal e As WebBrowserNewWindow2EventArgs)
|
||||
Public Delegate Sub WebBrowserNavigateErrorEventHandler(ByVal sender As Object, ByVal e As WebBrowserNavigateErrorEventArgs)
|
||||
|
||||
#Region " PROTECTED METHODS FOR EXTENDED EVENTS "
|
||||
Protected Overridable Sub OnNewWindow2(ByVal e As WebBrowserNewWindow2EventArgs)
|
||||
RaiseEvent NewWindow2(Me, e)
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnNavigateError(ByVal e As WebBrowserNavigateErrorEventArgs)
|
||||
RaiseEvent NavigateError(Me, e)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "WB SINK ROUTINES"
|
||||
|
||||
<PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
|
||||
Protected Overrides Sub CreateSink()
|
||||
MyBase.CreateSink()
|
||||
helper = New WebBrowser2EventHelper(Me)
|
||||
cookie = New AxHost.ConnectionPointCookie(Me.ActiveXInstance, helper, GetType(DWebBrowserEvents2))
|
||||
End Sub
|
||||
|
||||
<PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
|
||||
Protected Overrides Sub DetachSink()
|
||||
If cookie IsNot Nothing Then
|
||||
cookie.Disconnect()
|
||||
cookie = Nothing
|
||||
End If
|
||||
MyBase.DetachSink()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PROPERTIES EXPOSED THROUGH THE COM OBJECT"
|
||||
|
||||
<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
<System.Runtime.InteropServices.DispIdAttribute(200)> _
|
||||
Public ReadOnly Property Application() As Object
|
||||
Get
|
||||
If IsNothing(Me.ActiveXInstance) Then
|
||||
Throw New AxHost.InvalidActiveXStateException("Application", AxHost.ActiveXInvokeKind.PropertyGet)
|
||||
End If
|
||||
|
||||
Return CallByName(Me.ActiveXInstance, "Application", CallType.Get, Nothing)
|
||||
'THIS IS COMMENTED. UNCOMMENT AND REMOVE LINE BEFORE IF YOU CAN NOT USE CALLBYNAME()
|
||||
'Return Me.ActiveXInstance.Application
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
<System.Runtime.InteropServices.DispIdAttribute(552)> _
|
||||
Public Property RegisterAsBrowser() As Boolean
|
||||
Get
|
||||
If IsNothing(Me.ActiveXInstance) Then
|
||||
Throw New AxHost.InvalidActiveXStateException("RegisterAsBrowser", AxHost.ActiveXInvokeKind.PropertyGet)
|
||||
End If
|
||||
|
||||
Dim RetVal As Boolean = False
|
||||
If Not Boolean.TryParse(CallByName(Me.ActiveXInstance, "RegisterAsBrowser", CallType.Get, Nothing).ToString, RetVal) Then RetVal = False
|
||||
Return RetVal
|
||||
'THIS IS COMMENTED. UNCOMMENT AND REMOVE 3 LINES BEFORE IF YOU CAN NOT USE CALLBYNAME()
|
||||
'Return Me.ActiveXInstance.RegisterAsBrowser
|
||||
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
If IsNothing(Me.ActiveXInstance) Then
|
||||
Throw New AxHost.InvalidActiveXStateException("RegisterAsBrowser", AxHost.ActiveXInvokeKind.PropertySet)
|
||||
End If
|
||||
|
||||
CallByName(Me.ActiveXInstance, "RegisterAsBrowser", CallType.Let, True)
|
||||
'THIS IS COMMENTED. UNCOMMENT AND REMOVE LINE BEFORE IF YOU CAN NOT USE CALLBYNAME()
|
||||
'Me.ActiveXInstance.RegisterAsBrowser = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
'HELPER CLASS TO FIRE OFF THE EVENTS
|
||||
Private Class WebBrowser2EventHelper
|
||||
Inherits StandardOleMarshalObject
|
||||
Implements DWebBrowserEvents2
|
||||
|
||||
Private parent As WebBrowserEx
|
||||
|
||||
Public Sub New(ByVal parent As WebBrowserEx)
|
||||
Me.parent = parent
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub NewWindow2(ByRef ppDisp As Object, ByRef cancel As Boolean) Implements DWebBrowserEvents2.NewWindow2
|
||||
Dim e As New WebBrowserNewWindow2EventArgs(ppDisp)
|
||||
Me.parent.OnNewWindow2(e)
|
||||
ppDisp = e.ppDisp
|
||||
cancel = e.Cancel
|
||||
End Sub
|
||||
|
||||
Public Sub NavigateError(ByVal pDisp As Object, ByRef URL As Object, ByRef frame As Object, ByRef statusCode As Object, ByRef cancel As Boolean) Implements DWebBrowserEvents2.NavigateError
|
||||
' Raise the NavigateError event.
|
||||
Me.parent.OnNavigateError( _
|
||||
New WebBrowserNavigateErrorEventArgs( _
|
||||
CStr(URL), CStr(frame), CInt(statusCode), cancel))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
' Define constants from winuser.h
|
||||
Private Const WM_PARENTNOTIFY As Integer = &H210
|
||||
Private Const WM_DESTROY As Integer = 2
|
||||
|
||||
'Define New event to fire
|
||||
Public Event WBWantsToClose()
|
||||
|
||||
Protected Overrides Sub WndProc(ByRef m As Message)
|
||||
Select Case m.Msg
|
||||
Case WM_PARENTNOTIFY
|
||||
If (Not DesignMode) Then
|
||||
If (CInt(m.WParam) = WM_DESTROY) Then
|
||||
' Tell whoever cares we are closing
|
||||
RaiseEvent WBWantsToClose()
|
||||
End If
|
||||
End If
|
||||
DefWndProc(m)
|
||||
Case Else
|
||||
MyBase.WndProc(m)
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Public Class WebBrowserNewWindow2EventArgs
|
||||
Inherits System.ComponentModel.CancelEventArgs
|
||||
|
||||
Private ppDispValue As Object
|
||||
|
||||
Public Sub New(ByVal ppDisp As Object)
|
||||
Me.ppDispValue = ppDisp
|
||||
End Sub
|
||||
|
||||
Public Property ppDisp() As Object
|
||||
Get
|
||||
Return ppDispValue
|
||||
End Get
|
||||
Set(ByVal value As Object)
|
||||
ppDispValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
Public Class WebBrowserNavigateErrorEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Private urlValue As String
|
||||
Private frameValue As String
|
||||
Private statusCodeValue As Int32
|
||||
Private cancelValue As Boolean
|
||||
|
||||
Public Sub New( _
|
||||
ByVal url As String, ByVal frame As String, _
|
||||
ByVal statusCode As Int32, ByVal cancel As Boolean)
|
||||
|
||||
Me.urlValue = url
|
||||
Me.frameValue = frame
|
||||
Me.statusCodeValue = statusCode
|
||||
Me.cancelValue = cancel
|
||||
|
||||
End Sub
|
||||
|
||||
Public Property Url() As String
|
||||
Get
|
||||
Return urlValue
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
urlValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Frame() As String
|
||||
Get
|
||||
Return frameValue
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
frameValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property StatusCode() As Int32
|
||||
Get
|
||||
Return statusCodeValue
|
||||
End Get
|
||||
Set(ByVal value As Int32)
|
||||
statusCodeValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Cancel() As Boolean
|
||||
Get
|
||||
Return cancelValue
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
cancelValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
<ComImport(), Guid("34A715A0-6587-11D0-924A-0020AFC7AC4D"), _
|
||||
InterfaceType(ComInterfaceType.InterfaceIsIDispatch), _
|
||||
TypeLibType(TypeLibTypeFlags.FHidden)> _
|
||||
Public Interface DWebBrowserEvents2
|
||||
|
||||
<DispId(DISPID.NEWWINDOW2)> Sub NewWindow2( _
|
||||
<InAttribute(), OutAttribute(), MarshalAs(UnmanagedType.IDispatch)> ByRef ppDisp As Object, _
|
||||
<InAttribute(), OutAttribute()> ByRef cancel As Boolean)
|
||||
|
||||
<DispId(DISPID.NAVIGATERROR)> Sub NavigateError( _
|
||||
<InAttribute(), MarshalAs(UnmanagedType.IDispatch)> _
|
||||
ByVal pDisp As Object, _
|
||||
<InAttribute()> ByRef URL As Object, _
|
||||
<InAttribute()> ByRef frame As Object, _
|
||||
<InAttribute()> ByRef statusCode As Object, _
|
||||
<InAttribute(), OutAttribute()> ByRef cancel As Boolean)
|
||||
End Interface
|
||||
|
||||
Public Enum DISPID
|
||||
NEWWINDOW2 = 251
|
||||
NAVIGATERROR = 271
|
||||
End Enum
|
||||
|
||||
|
||||
|
||||
End Namespace
|
||||
|
||||
222
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/frmPDFScanList.Designer.vb
generated
Normal file
222
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/frmPDFScanList.Designer.vb
generated
Normal file
@@ -0,0 +1,222 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmPDFScanList
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip()
|
||||
Me.DateiScannenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.KopierenZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.AlsEmailSendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ArchivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.pnlTop = New System.Windows.Forms.Panel()
|
||||
Me.lblDateien = New System.Windows.Forms.Label()
|
||||
Me.FlatButton1 = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.listlOld = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.pnlOldHeader = New System.Windows.Forms.Panel()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.cntxtMulti.SuspendLayout()
|
||||
Me.pnlTop.SuspendLayout()
|
||||
Me.pnlOldHeader.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'FlowLayoutPanel
|
||||
'
|
||||
Me.FlowLayoutPanel.AutoSize = True
|
||||
Me.FlowLayoutPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.FlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.FlowLayoutPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
|
||||
Me.FlowLayoutPanel.Location = New System.Drawing.Point(0, 20)
|
||||
Me.FlowLayoutPanel.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.FlowLayoutPanel.MaximumSize = New System.Drawing.Size(200, 500)
|
||||
Me.FlowLayoutPanel.Name = "FlowLayoutPanel"
|
||||
Me.FlowLayoutPanel.Size = New System.Drawing.Size(200, 14)
|
||||
Me.FlowLayoutPanel.TabIndex = 1
|
||||
'
|
||||
'cntxtMulti
|
||||
'
|
||||
Me.cntxtMulti.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxtMulti.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiScannenToolStripMenuItem, Me.DateiHochladenToolStripMenuItem, Me.ToolStripSeparator1, Me.KopierenZwischenablageToolStripMenuItem, Me.AlsEmailSendenToolStripMenuItem, Me.ToolStripSeparator2, Me.ArchivierenToolStripMenuItem})
|
||||
Me.cntxtMulti.Name = "cntxt"
|
||||
Me.cntxtMulti.Size = New System.Drawing.Size(218, 126)
|
||||
'
|
||||
'DateiScannenToolStripMenuItem
|
||||
'
|
||||
Me.DateiScannenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.scanner
|
||||
Me.DateiScannenToolStripMenuItem.Name = "DateiScannenToolStripMenuItem"
|
||||
Me.DateiScannenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.DateiScannenToolStripMenuItem.Text = "Datei scannen..."
|
||||
'
|
||||
'DateiHochladenToolStripMenuItem
|
||||
'
|
||||
Me.DateiHochladenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf
|
||||
Me.DateiHochladenToolStripMenuItem.Name = "DateiHochladenToolStripMenuItem"
|
||||
Me.DateiHochladenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.DateiHochladenToolStripMenuItem.Text = "Datei hochladen..."
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'KopierenZwischenablageToolStripMenuItem
|
||||
'
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Name = "KopierenZwischenablageToolStripMenuItem"
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Text = "Kopieren (Zwischenablage)"
|
||||
'
|
||||
'AlsEmailSendenToolStripMenuItem
|
||||
'
|
||||
Me.AlsEmailSendenToolStripMenuItem.Name = "AlsEmailSendenToolStripMenuItem"
|
||||
Me.AlsEmailSendenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.AlsEmailSendenToolStripMenuItem.Text = "Als Email senden"
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'ArchivierenToolStripMenuItem
|
||||
'
|
||||
Me.ArchivierenToolStripMenuItem.Name = "ArchivierenToolStripMenuItem"
|
||||
Me.ArchivierenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.ArchivierenToolStripMenuItem.Text = "Archivieren"
|
||||
'
|
||||
'pnlTop
|
||||
'
|
||||
Me.pnlTop.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.pnlTop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.pnlTop.Controls.Add(Me.lblDateien)
|
||||
Me.pnlTop.Controls.Add(Me.FlatButton1)
|
||||
Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.pnlTop.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnlTop.Name = "pnlTop"
|
||||
Me.pnlTop.Size = New System.Drawing.Size(222, 20)
|
||||
Me.pnlTop.TabIndex = 4
|
||||
'
|
||||
'lblDateien
|
||||
'
|
||||
Me.lblDateien.AutoSize = True
|
||||
Me.lblDateien.Location = New System.Drawing.Point(4, 3)
|
||||
Me.lblDateien.Name = "lblDateien"
|
||||
Me.lblDateien.Size = New System.Drawing.Size(47, 13)
|
||||
Me.lblDateien.TabIndex = 1
|
||||
Me.lblDateien.Text = "Dateien:"
|
||||
'
|
||||
'FlatButton1
|
||||
'
|
||||
Me.FlatButton1.allowBorder = False
|
||||
Me.FlatButton1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.FlatButton1.BackColor = System.Drawing.Color.Red
|
||||
Me.FlatButton1.FlatAppearance.BorderSize = 0
|
||||
Me.FlatButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.FlatButton1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.FlatButton1.ForeColor = System.Drawing.Color.White
|
||||
Me.FlatButton1.Location = New System.Drawing.Point(194, 0)
|
||||
Me.FlatButton1.Name = "FlatButton1"
|
||||
Me.FlatButton1.Size = New System.Drawing.Size(26, 20)
|
||||
Me.FlatButton1.TabIndex = 0
|
||||
Me.FlatButton1.Text = "X"
|
||||
Me.FlatButton1.UseVisualStyleBackColor = False
|
||||
'
|
||||
'listlOld
|
||||
'
|
||||
Me.listlOld.AutoSize = True
|
||||
Me.listlOld.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.listlOld.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.listlOld.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
|
||||
Me.listlOld.Location = New System.Drawing.Point(0, 49)
|
||||
Me.listlOld.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.listlOld.MaximumSize = New System.Drawing.Size(200, 200)
|
||||
Me.listlOld.MinimumSize = New System.Drawing.Size(2, 10)
|
||||
Me.listlOld.Name = "listlOld"
|
||||
Me.listlOld.Size = New System.Drawing.Size(200, 10)
|
||||
Me.listlOld.TabIndex = 5
|
||||
Me.listlOld.Visible = False
|
||||
'
|
||||
'pnlOldHeader
|
||||
'
|
||||
Me.pnlOldHeader.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.pnlOldHeader.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.pnlOldHeader.Controls.Add(Me.Label1)
|
||||
Me.pnlOldHeader.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.pnlOldHeader.Location = New System.Drawing.Point(0, 34)
|
||||
Me.pnlOldHeader.Name = "pnlOldHeader"
|
||||
Me.pnlOldHeader.Size = New System.Drawing.Size(222, 15)
|
||||
Me.pnlOldHeader.TabIndex = 6
|
||||
Me.pnlOldHeader.Visible = False
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(4, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(40, 13)
|
||||
Me.Label1.TabIndex = 1
|
||||
Me.Label1.Text = "Archiv:"
|
||||
'
|
||||
'frmPDFScanList
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.AutoScroll = True
|
||||
Me.AutoSize = True
|
||||
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.ClientSize = New System.Drawing.Size(222, 59)
|
||||
Me.Controls.Add(Me.FlowLayoutPanel)
|
||||
Me.Controls.Add(Me.pnlOldHeader)
|
||||
Me.Controls.Add(Me.pnlTop)
|
||||
Me.Controls.Add(Me.listlOld)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
Me.MaximumSize = New System.Drawing.Size(222, 300)
|
||||
Me.MinimumSize = New System.Drawing.Size(220, 24)
|
||||
Me.Name = "frmPDFScanList"
|
||||
Me.Text = "frmPDFScanList"
|
||||
Me.cntxtMulti.ResumeLayout(False)
|
||||
Me.pnlTop.ResumeLayout(False)
|
||||
Me.pnlTop.PerformLayout()
|
||||
Me.pnlOldHeader.ResumeLayout(False)
|
||||
Me.pnlOldHeader.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Public WithEvents FlowLayoutPanel As System.Windows.Forms.FlowLayoutPanel
|
||||
Friend WithEvents cntxtMulti As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents DateiScannenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents DateiHochladenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents pnlTop As System.Windows.Forms.Panel
|
||||
Friend WithEvents FlatButton1 As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents lblDateien As System.Windows.Forms.Label
|
||||
Public WithEvents listlOld As System.Windows.Forms.FlowLayoutPanel
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Public WithEvents pnlOldHeader As System.Windows.Forms.Panel
|
||||
Friend WithEvents ArchivierenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents KopierenZwischenablageToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents AlsEmailSendenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator1 As Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator2 As Windows.Forms.ToolStripSeparator
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="cntxtMulti.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,62 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class frmPDFScanList
|
||||
Public KdNr As Integer = -1
|
||||
'Dim DATENSERVER As New cDATENSERVER
|
||||
Public _DATENSERVER_ORDNER As String = ""
|
||||
Public _TEXT_PDF As String = ""
|
||||
' Public ScanID As String = ""
|
||||
' Public pdf_Path As String = ""
|
||||
|
||||
Public Event FileAdded(ScanID As Integer, path As String, name As String)
|
||||
Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(KdNr, _DATENSERVER_ORDNER, _TEXT_PDF)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me.KdNr = KdNr
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmPDFScanList_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
Me.Location = Windows.Forms.Cursor.Position
|
||||
End Sub
|
||||
|
||||
Private Sub frmPDFScanList_LostFocus(sender As Object, e As EventArgs) Handles Me.Deactivate, Me.LostFocus
|
||||
''Threading.Thread.Sleep(100)
|
||||
'For Each c In Me.FlowLayoutPanel.Controls
|
||||
' If DirectCast(c, usrCntLPDFScanSimple).cntxt.Visible Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
'Next
|
||||
'For Each c In Me.listlOld.Controls
|
||||
' If DirectCast(c, usrCntLPDFScanSimple).cntxt.Visible Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
'Next
|
||||
Dim trd = New System.Threading.Thread(AddressOf Me.threadClose)
|
||||
trd.IsBackground = True
|
||||
trd.Start()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub threadClose()
|
||||
Threading.Thread.Sleep(100)
|
||||
If Form.ActiveForm Is Nothing Then Exit Sub
|
||||
If Me IsNot Form.ActiveForm Then Me.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
141
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrCntLPDFScanSimple.Designer.vb
generated
Normal file
141
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrCntLPDFScanSimple.Designer.vb
generated
Normal file
@@ -0,0 +1,141 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrCntLPDFScanSimple
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.txt = New System.Windows.Forms.Label()
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.UmbenennenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.KopierenZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.AlsEmailSendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ArchivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.picPDF = New System.Windows.Forms.PictureBox()
|
||||
Me.cntxt.SuspendLayout()
|
||||
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'txt
|
||||
'
|
||||
Me.txt.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txt.AutoSize = True
|
||||
Me.txt.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txt.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txt.Location = New System.Drawing.Point(30, 3)
|
||||
Me.txt.Name = "txt"
|
||||
Me.txt.Size = New System.Drawing.Size(109, 13)
|
||||
Me.txt.TabIndex = 3
|
||||
Me.txt.Text = "Kostenaufstellung.pdf"
|
||||
Me.txt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'cntxt
|
||||
'
|
||||
Me.cntxt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UmbenennenToolStripMenuItem, Me.LöschenToolStripMenuItem, Me.ToolStripSeparator2, Me.KopierenZwischenablageToolStripMenuItem, Me.AlsEmailSendenToolStripMenuItem, Me.ToolStripSeparator1, Me.ArchivierenToolStripMenuItem})
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 126)
|
||||
'
|
||||
'UmbenennenToolStripMenuItem
|
||||
'
|
||||
Me.UmbenennenToolStripMenuItem.Name = "UmbenennenToolStripMenuItem"
|
||||
Me.UmbenennenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.UmbenennenToolStripMenuItem.Text = "Umbenennen"
|
||||
'
|
||||
'LöschenToolStripMenuItem
|
||||
'
|
||||
Me.LöschenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
|
||||
Me.LöschenToolStripMenuItem.Name = "LöschenToolStripMenuItem"
|
||||
Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.LöschenToolStripMenuItem.Text = "Löschen"
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'KopierenZwischenablageToolStripMenuItem
|
||||
'
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Name = "KopierenZwischenablageToolStripMenuItem"
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Text = "Kopieren (Zwischenablage)"
|
||||
'
|
||||
'AlsEmailSendenToolStripMenuItem
|
||||
'
|
||||
Me.AlsEmailSendenToolStripMenuItem.Name = "AlsEmailSendenToolStripMenuItem"
|
||||
Me.AlsEmailSendenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.AlsEmailSendenToolStripMenuItem.Text = "Als Email senden"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'ArchivierenToolStripMenuItem
|
||||
'
|
||||
Me.ArchivierenToolStripMenuItem.Name = "ArchivierenToolStripMenuItem"
|
||||
Me.ArchivierenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.ArchivierenToolStripMenuItem.Text = "Archivieren"
|
||||
'
|
||||
'picPDF
|
||||
'
|
||||
Me.picPDF.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf
|
||||
Me.picPDF.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.picPDF.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.picPDF.Location = New System.Drawing.Point(-1, 2)
|
||||
Me.picPDF.Name = "picPDF"
|
||||
Me.picPDF.Size = New System.Drawing.Size(29, 15)
|
||||
Me.picPDF.TabIndex = 2
|
||||
Me.picPDF.TabStop = False
|
||||
'
|
||||
'usrCntLPDFScanSimple
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.ContextMenuStrip = Me.cntxt
|
||||
Me.Controls.Add(Me.txt)
|
||||
Me.Controls.Add(Me.picPDF)
|
||||
Me.Margin = New System.Windows.Forms.Padding(1)
|
||||
Me.Name = "usrCntLPDFScanSimple"
|
||||
Me.Size = New System.Drawing.Size(218, 20)
|
||||
Me.cntxt.ResumeLayout(False)
|
||||
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents txt As System.Windows.Forms.Label
|
||||
Friend WithEvents picPDF As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents cntxt As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents LöschenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents UmbenennenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ArchivierenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator2 As Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents KopierenZwischenablageToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents AlsEmailSendenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator1 As Windows.Forms.ToolStripSeparator
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="cntxt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,72 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class usrCntLPDFScanSimple
|
||||
Public ScanID As String = ""
|
||||
Public pdf_Path As String = ""
|
||||
Public bezeichnung As String = ""
|
||||
Public archived As Boolean = False
|
||||
Public Event DELETE(ScanID As Integer, bezeichnung As String)
|
||||
Public Event RENAME(ScanID As Integer, bezeichnung As String)
|
||||
Public Event ARCHIV(ScanID As Integer, bezeichnung As String)
|
||||
Public Event CLIPBOARD(ScanID As Integer, bezeichnung As String)
|
||||
Public Event OPEN_MAIL(ScanID As Integer, bezeichnung As String)
|
||||
|
||||
Public Event CLICKED()
|
||||
|
||||
Sub New(ScanID, pdf_Path, bezeichnung, archived)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Me.ScanID = ScanID
|
||||
Me.pdf_Path = pdf_Path
|
||||
Me.bezeichnung = bezeichnung
|
||||
txt.Text = bezeichnung
|
||||
Me.archived = archived
|
||||
End Sub
|
||||
|
||||
Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LöschenToolStripMenuItem.Click
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_Datenarchiv_DELETE", "SDL") Then RaiseEvent DELETE(ScanID, bezeichnung)
|
||||
End Sub
|
||||
|
||||
Private Sub txt_Click(sender As Object, e As EventArgs) Handles txt.Click, Me.Click, picPDF.Click
|
||||
If File.Exists(pdf_Path) Then
|
||||
' Process.Start(pdf_Path)
|
||||
Process.Start(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(pdf_Path, bezeichnung))
|
||||
RaiseEvent CLICKED()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntLPDFScanSimple_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If archived Then
|
||||
ArchivierenToolStripMenuItem.Text = "Wiederherstellen"
|
||||
Me.picPDF.BackgroundImage = My.Resources.pdf_gray
|
||||
End If
|
||||
LöschenToolStripMenuItem.Enabled = VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_Datenarchiv_DELETE", "SDL")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub usrcntlPDFScan_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseEnter, txt.MouseEnter, picPDF.MouseEnter
|
||||
Me.BackColor = Drawing.Color.LightGray
|
||||
End Sub
|
||||
Private Sub usrcntlPDFScan_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave, txt.MouseLeave, picPDF.MouseLeave
|
||||
Me.BackColor = Drawing.Color.White
|
||||
End Sub
|
||||
|
||||
Private Sub UmbenennenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UmbenennenToolStripMenuItem.Click
|
||||
RaiseEvent RENAME(ScanID, bezeichnung)
|
||||
End Sub
|
||||
|
||||
Private Sub ArchivierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ArchivierenToolStripMenuItem.Click
|
||||
RaiseEvent ARCHIV(ScanID, bezeichnung)
|
||||
End Sub
|
||||
|
||||
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
|
||||
RaiseEvent CLIPBOARD(ScanID, bezeichnung)
|
||||
End Sub
|
||||
|
||||
Private Sub AlsEmailSendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlsEmailSendenToolStripMenuItem.Click
|
||||
RaiseEvent OPEN_MAIL(ScanID, bezeichnung)
|
||||
End Sub
|
||||
End Class
|
||||
56
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrCntlTestsystem.Designer.vb
generated
Normal file
56
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrCntlTestsystem.Designer.vb
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrCntlTestsystem
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.lblTESTSYSTEM = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblTESTSYSTEM
|
||||
'
|
||||
Me.lblTESTSYSTEM.AutoSize = True
|
||||
Me.lblTESTSYSTEM.Location = New System.Drawing.Point(-4, 0)
|
||||
Me.lblTESTSYSTEM.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0)
|
||||
Me.lblTESTSYSTEM.Name = "lblTESTSYSTEM"
|
||||
Me.lblTESTSYSTEM.Size = New System.Drawing.Size(146, 24)
|
||||
Me.lblTESTSYSTEM.TabIndex = 0
|
||||
Me.lblTESTSYSTEM.Text = "TESTSYSTEM"
|
||||
Me.lblTESTSYSTEM.Visible = False
|
||||
'
|
||||
'usrCntlTestsystem
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(12.0!, 24.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Controls.Add(Me.lblTESTSYSTEM)
|
||||
Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.ForeColor = System.Drawing.Color.Red
|
||||
Me.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6)
|
||||
Me.Name = "usrCntlTestsystem"
|
||||
Me.Size = New System.Drawing.Size(152, 28)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lblTESTSYSTEM As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,8 @@
|
||||
Public Class usrCntlTestsystem
|
||||
' Private Sub usrCntlTestsystem_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' lblTESTSYSTEM.Visible = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
|
||||
' End Sub
|
||||
Private Sub usrCntlTestsystem_Load(sender As Object, e As EventArgs) Handles Me.Layout
|
||||
lblTESTSYSTEM.Visible = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
|
||||
End Sub
|
||||
End Class
|
||||
133
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlKdSearch.Designer.vb
generated
Normal file
133
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlKdSearch.Designer.vb
generated
Normal file
@@ -0,0 +1,133 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrcntlKdSearch
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.dgvKundenAktiv = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.lblClose = New System.Windows.Forms.Label()
|
||||
Me.lblINAKTIVEKunden = New System.Windows.Forms.Label()
|
||||
Me.dgvKundenInAktiv = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.DirectoryEntry1 = New System.DirectoryServices.DirectoryEntry()
|
||||
CType(Me.dgvKundenAktiv, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.dgvKundenInAktiv, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'dgvKundenAktiv
|
||||
'
|
||||
Me.dgvKundenAktiv.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvKundenAktiv.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvKundenAktiv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvKundenAktiv.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.dgvKundenAktiv.Location = New System.Drawing.Point(0, 0)
|
||||
Me.dgvKundenAktiv.Name = "dgvKundenAktiv"
|
||||
Me.dgvKundenAktiv.Size = New System.Drawing.Size(564, 243)
|
||||
Me.dgvKundenAktiv.TabIndex = 0
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.AutoSize = True
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.Controls.Add(Me.dgvKundenAktiv)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Controls.Add(Me.dgvKundenInAktiv)
|
||||
Me.pnl.Location = New System.Drawing.Point(2, 3)
|
||||
Me.pnl.Name = "pnl"
|
||||
Me.pnl.Size = New System.Drawing.Size(564, 374)
|
||||
Me.pnl.TabIndex = 1
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.SystemColors.InactiveCaption
|
||||
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel1.Controls.Add(Me.lblClose)
|
||||
Me.Panel1.Controls.Add(Me.lblINAKTIVEKunden)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 243)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(564, 16)
|
||||
Me.Panel1.TabIndex = 3
|
||||
'
|
||||
'lblClose
|
||||
'
|
||||
Me.lblClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblClose.AutoSize = True
|
||||
Me.lblClose.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.lblClose.Font = New System.Drawing.Font("Arial Black", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblClose.ForeColor = System.Drawing.Color.Red
|
||||
Me.lblClose.Location = New System.Drawing.Point(542, -5)
|
||||
Me.lblClose.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.lblClose.Name = "lblClose"
|
||||
Me.lblClose.Size = New System.Drawing.Size(22, 23)
|
||||
Me.lblClose.TabIndex = 17
|
||||
Me.lblClose.Text = "X"
|
||||
'
|
||||
'lblINAKTIVEKunden
|
||||
'
|
||||
Me.lblINAKTIVEKunden.AutoSize = True
|
||||
Me.lblINAKTIVEKunden.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblINAKTIVEKunden.Location = New System.Drawing.Point(3, 0)
|
||||
Me.lblINAKTIVEKunden.Name = "lblINAKTIVEKunden"
|
||||
Me.lblINAKTIVEKunden.Size = New System.Drawing.Size(96, 13)
|
||||
Me.lblINAKTIVEKunden.TabIndex = 2
|
||||
Me.lblINAKTIVEKunden.Text = "INAKTIVE Kunden:"
|
||||
'
|
||||
'dgvKundenInAktiv
|
||||
'
|
||||
Me.dgvKundenInAktiv.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvKundenInAktiv.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvKundenInAktiv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvKundenInAktiv.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.dgvKundenInAktiv.Location = New System.Drawing.Point(0, 259)
|
||||
Me.dgvKundenInAktiv.Name = "dgvKundenInAktiv"
|
||||
Me.dgvKundenInAktiv.Size = New System.Drawing.Size(564, 115)
|
||||
Me.dgvKundenInAktiv.TabIndex = 1
|
||||
'
|
||||
'usrcntlKdSearch
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.SystemColors.MenuHighlight
|
||||
Me.Controls.Add(Me.pnl)
|
||||
Me.Name = "usrcntlKdSearch"
|
||||
Me.Size = New System.Drawing.Size(570, 380)
|
||||
CType(Me.dgvKundenAktiv, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.dgvKundenInAktiv, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents pnl As System.Windows.Forms.Panel
|
||||
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||
Friend WithEvents lblINAKTIVEKunden As System.Windows.Forms.Label
|
||||
Public WithEvents dgvKundenAktiv As MyDatagridview
|
||||
Public WithEvents dgvKundenInAktiv As MyDatagridview
|
||||
Public WithEvents lblClose As System.Windows.Forms.Label
|
||||
Friend WithEvents DirectoryEntry1 As System.DirectoryServices.DirectoryEntry
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="DirectoryEntry1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,50 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class usrcntlKdSearch
|
||||
Public Event DGV_Click(sender As Object, e As EventArgs)
|
||||
Public Event DGV_INAKTIV_Click(sender As Object, e As EventArgs)
|
||||
Public Event DGV_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
Public Event DGV_INAKTIV_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
Public Event CLOSE(sender As Object, e As EventArgs)
|
||||
|
||||
Private Sub dgvKundenAktiv_Click(sender As Object, e As EventArgs) Handles dgvKundenAktiv.Click
|
||||
RaiseEvent DGV_Click(sender, e)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dgvKundenInAktiv_Click(sender As Object, e As EventArgs) Handles dgvKundenInAktiv.Click
|
||||
RaiseEvent DGV_INAKTIV_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As KeyEventArgs) Handles dgvKundenAktiv.KeyDown
|
||||
RaiseEvent DGV_KeyDown(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub dgvFindKD_INAKTIV_Click(sender As Object, e As KeyEventArgs) Handles dgvKundenInAktiv.KeyDown
|
||||
RaiseEvent DGV_INAKTIV_KeyDown(sender, e)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub usrcntlKdSearch_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
|
||||
Me.pnl.Location = New Point(2, 2)
|
||||
Me.pnl.Size = New Size(Me.Width - 4, Me.Height - 4)
|
||||
End Sub
|
||||
|
||||
Private Sub lblClose_Click(sender As Object, e As EventArgs) Handles lblClose.Click
|
||||
RaiseEvent CLOSE(sender, e)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
|
||||
Try
|
||||
MyBase.OnPaint(e)
|
||||
Catch ex As Exception
|
||||
Me.Invalidate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub dgvKundenAktiv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvKundenAktiv.CellContentClick
|
||||
RaiseEvent DGV_Click(sender, e)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
188
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlPDFScan.Designer.vb
generated
Normal file
188
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlPDFScan.Designer.vb
generated
Normal file
@@ -0,0 +1,188 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrcntlPDFScan
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.txt = New System.Windows.Forms.Label()
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.DateiScannenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.KopierenZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.AlsEMailSendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.picPDF = New System.Windows.Forms.PictureBox()
|
||||
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ArchivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cntxt.SuspendLayout()
|
||||
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxtMulti.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'txt
|
||||
'
|
||||
Me.txt.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txt.ContextMenuStrip = Me.cntxt
|
||||
Me.txt.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txt.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txt.Location = New System.Drawing.Point(31, -1)
|
||||
Me.txt.Name = "txt"
|
||||
Me.txt.Size = New System.Drawing.Size(133, 24)
|
||||
Me.txt.TabIndex = 1
|
||||
Me.txt.Text = "Kostenaufstellung.pdf"
|
||||
Me.txt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'cntxt
|
||||
'
|
||||
Me.cntxt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiScannenToolStripMenuItem, Me.DateiHochladenToolStripMenuItem, Me.ToolStripSeparator2, Me.KopierenZwischenablageToolStripMenuItem, Me.AlsEMailSendenToolStripMenuItem, Me.ToolStripSeparator1, Me.LöschenToolStripMenuItem})
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 126)
|
||||
'
|
||||
'DateiScannenToolStripMenuItem
|
||||
'
|
||||
Me.DateiScannenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.scanner
|
||||
Me.DateiScannenToolStripMenuItem.Name = "DateiScannenToolStripMenuItem"
|
||||
Me.DateiScannenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.DateiScannenToolStripMenuItem.Text = "Datei scannen..."
|
||||
'
|
||||
'DateiHochladenToolStripMenuItem
|
||||
'
|
||||
Me.DateiHochladenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf
|
||||
Me.DateiHochladenToolStripMenuItem.Name = "DateiHochladenToolStripMenuItem"
|
||||
Me.DateiHochladenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.DateiHochladenToolStripMenuItem.Text = "Datei hochladen..."
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'KopierenZwischenablageToolStripMenuItem
|
||||
'
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Enabled = False
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Name = "KopierenZwischenablageToolStripMenuItem"
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Text = "Kopieren (Zwischenablage)"
|
||||
'
|
||||
'AlsEMailSendenToolStripMenuItem
|
||||
'
|
||||
Me.AlsEMailSendenToolStripMenuItem.Enabled = False
|
||||
Me.AlsEMailSendenToolStripMenuItem.Name = "AlsEMailSendenToolStripMenuItem"
|
||||
Me.AlsEMailSendenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.AlsEMailSendenToolStripMenuItem.Text = "Als E-Mail senden"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'LöschenToolStripMenuItem
|
||||
'
|
||||
Me.LöschenToolStripMenuItem.Enabled = False
|
||||
Me.LöschenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
|
||||
Me.LöschenToolStripMenuItem.Name = "LöschenToolStripMenuItem"
|
||||
Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.LöschenToolStripMenuItem.Text = "Löschen"
|
||||
'
|
||||
'picPDF
|
||||
'
|
||||
Me.picPDF.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.picPDF.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf_gray
|
||||
Me.picPDF.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.picPDF.ContextMenuStrip = Me.cntxt
|
||||
Me.picPDF.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.picPDF.Location = New System.Drawing.Point(0, 2)
|
||||
Me.picPDF.Name = "picPDF"
|
||||
Me.picPDF.Size = New System.Drawing.Size(29, 20)
|
||||
Me.picPDF.TabIndex = 0
|
||||
Me.picPDF.TabStop = False
|
||||
'
|
||||
'cntxtMulti
|
||||
'
|
||||
Me.cntxtMulti.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxtMulti.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.ToolStripMenuItem2, Me.ArchivierenToolStripMenuItem})
|
||||
Me.cntxtMulti.Name = "cntxt"
|
||||
Me.cntxtMulti.Size = New System.Drawing.Size(181, 92)
|
||||
'
|
||||
'ToolStripMenuItem1
|
||||
'
|
||||
Me.ToolStripMenuItem1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.scanner
|
||||
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
|
||||
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ToolStripMenuItem1.Text = "+ Datei scannen..."
|
||||
'
|
||||
'ToolStripMenuItem2
|
||||
'
|
||||
Me.ToolStripMenuItem2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf
|
||||
Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2"
|
||||
Me.ToolStripMenuItem2.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ToolStripMenuItem2.Text = "+ Datei hochladen..."
|
||||
'
|
||||
'ArchivierenToolStripMenuItem
|
||||
'
|
||||
Me.ArchivierenToolStripMenuItem.Name = "ArchivierenToolStripMenuItem"
|
||||
Me.ArchivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ArchivierenToolStripMenuItem.Text = "Archivieren"
|
||||
Me.ArchivierenToolStripMenuItem.Visible = False
|
||||
'
|
||||
'usrcntlPDFScan
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.ContextMenuStrip = Me.cntxt
|
||||
Me.Controls.Add(Me.txt)
|
||||
Me.Controls.Add(Me.picPDF)
|
||||
Me.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Name = "usrcntlPDFScan"
|
||||
Me.Size = New System.Drawing.Size(163, 24)
|
||||
Me.cntxt.ResumeLayout(False)
|
||||
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.cntxtMulti.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents picPDF As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents txt As System.Windows.Forms.Label
|
||||
Friend WithEvents cntxt As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents DateiScannenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents DateiHochladenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents LöschenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cntxtMulti As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents ToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripMenuItem2 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator2 As Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents KopierenZwischenablageToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents AlsEMailSendenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator1 As Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents ArchivierenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
End Class
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="cntxt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cntxtMulti.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>124, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,420 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.IO
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class usrcntlPDFScan
|
||||
Public Property _TEXT_PDF As String
|
||||
Public Property _DATENSERVER_KATEGORIE As String = "DOKUMENTE"
|
||||
Public Property _DATENSERVER_ORDNER As String = ""
|
||||
Public Property _DATENSERVER_UOrdner1 As String = ""
|
||||
Public Property _DATENSERVER_UOrdner2 As String = ""
|
||||
Public Property _DATENSERVER_UOrdner3 As String = ""
|
||||
Public Property _MULTI_FILES As Boolean = False
|
||||
Public Property _ARCHIV As Boolean = False
|
||||
|
||||
' Public pdf_Path As String = ""
|
||||
Dim KdNr As Integer = -1
|
||||
|
||||
'Dim DATENSERVER As New cDATENSERVER
|
||||
' Public ScanID As Integer = -1
|
||||
Public COLL_ID As Integer = -1
|
||||
'Dim DatenserverIDCollection As New cDatenserverIDCollectionList
|
||||
Dim DS As VERAG_PROG_ALLGEMEIN.cDATENSERVER
|
||||
|
||||
|
||||
Public Event FileAdded(id As String, path As String, name As String)
|
||||
|
||||
Private Sub usrcntlPDFScan_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
Me.txt.Text = _TEXT_PDF
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub INIT(KdNr)
|
||||
Me.KdNr = KdNr
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
Me._DATENSERVER_UOrdner2 = _DATENSERVER_UOrdner2
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
Me._DATENSERVER_UOrdner2 = _DATENSERVER_UOrdner2
|
||||
Me._DATENSERVER_UOrdner3 = _DATENSERVER_UOrdner3
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub usrcntlPDFScan_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Me.AllowDrop = True
|
||||
Me.txt.Text = _TEXT_PDF
|
||||
If _MULTI_FILES Then
|
||||
Me.ContextMenuStrip = cntxtMulti
|
||||
txt.ContextMenuStrip = cntxtMulti
|
||||
picPDF.ContextMenuStrip = cntxtMulti
|
||||
' Else
|
||||
' If DatenserverIDCollection.Count > 0 Then
|
||||
'pdf_Path = DATENSERVER.getPathById(ScanID)
|
||||
' End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Fill
|
||||
|
||||
' Sub addId(id)
|
||||
' If id > 0 Then
|
||||
' ScanID = id
|
||||
' pdf_Path = DATENSERVER.getPathById(ScanID)
|
||||
' initPdf()
|
||||
' End If
|
||||
' End Sub
|
||||
Sub initPdf()
|
||||
If DS Is Nothing Then Exit Sub
|
||||
txt.Name = _TEXT_PDF
|
||||
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
picPDF.Enabled = True
|
||||
txt.Enabled = True
|
||||
' picScanner.Visible = False
|
||||
picPDF.BackgroundImage = My.Resources.pdf
|
||||
setCursorHand(Me)
|
||||
setCursorHand(picPDF)
|
||||
setCursorHand(txt)
|
||||
' del.Visible = True
|
||||
If Not _MULTI_FILES Then LöschenToolStripMenuItem.Enabled = VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_Datenarchiv_DELETE", "SDL")
|
||||
KopierenZwischenablageToolStripMenuItem.Enabled = True
|
||||
AlsEMailSendenToolStripMenuItem.Enabled = True
|
||||
Else
|
||||
picPDF.Enabled = False
|
||||
txt.Enabled = False
|
||||
picPDF.BackgroundImage = My.Resources.pdf_gray
|
||||
'picScanner.Visible = True
|
||||
setCursorDefalut(Me)
|
||||
setCursorDefalut(picPDF)
|
||||
setCursorDefalut(txt)
|
||||
' del.Visible = False
|
||||
LöschenToolStripMenuItem.Enabled = False
|
||||
KopierenZwischenablageToolStripMenuItem.Enabled = False
|
||||
AlsEMailSendenToolStripMenuItem.Enabled = False
|
||||
End If
|
||||
|
||||
' ArchivierenToolStripMenuItem.Visible = If(DS.da_multifiles And DS.DATA_LIST.LIST.Count = 1, True, False)
|
||||
End Sub
|
||||
|
||||
Sub setCursorHand(c As Control)
|
||||
c.Cursor = Windows.Forms.Cursors.Hand
|
||||
End Sub
|
||||
Sub setCursorDefalut(c As Control)
|
||||
c.Cursor = Windows.Forms.Cursors.Default
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub txt_Click(sender As Object, e As EventArgs) Handles txt.Click, Me.Click, picPDF.Click
|
||||
|
||||
Try
|
||||
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
If _MULTI_FILES Then 'And DS.DATA_LIST.LIST.Count > 1 Then
|
||||
Dim list As New frmPDFScanList
|
||||
|
||||
showMulti(list)
|
||||
|
||||
list.Location = System.Windows.Forms.Cursor.Position
|
||||
list.Show() 'Me.FindForm) 'Dialog() 's(Me.FindForm)
|
||||
list.SetDesktopLocation(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
|
||||
Else
|
||||
'Process.Start(DS.DATA_LIST.LIST(0).coll_pfad)
|
||||
DS.OPEN_SINGLE(, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Form1_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter ', txt.DragEnter, Me.DragEnter, picPDF.DragEnter
|
||||
e.Effect = DragDropEffects.All
|
||||
End Sub
|
||||
Private Sub txt_Click(sender As Object, e As DragEventArgs) Handles Me.DragDrop ', txt.DragDrop, Me.DragDrop, picPDF.DragDrop
|
||||
If e.Data.GetDataPresent("FileDrop", True) = True Then
|
||||
Dim FileList As String() = CType(e.Data.GetData("FileDrop"), Object) 'Hier wird der Variable "Wert" das übergeben, was wir auf die Form gezogen haben. Bei einer Datei wäre es dann der Pfad der Datei.
|
||||
If FileList.Count > 0 Then
|
||||
If Not _MULTI_FILES And FileList.Count > 1 Then
|
||||
MsgBox("Es können nicht mehrere Dateien hochgeladen werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
For Each W In FileList
|
||||
If W.ToUpper.EndsWith(".PDF") Then
|
||||
Try
|
||||
|
||||
Dim bezeichnung = System.IO.Path.GetFileName(W).ToString
|
||||
DS.uploadDataToDATENSERVER(W, bezeichnung, ".pdf")
|
||||
|
||||
'If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!" & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
initPdf()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub showMulti(List As frmPDFScanList)
|
||||
Try
|
||||
List.listlOld.Visible = False
|
||||
List.pnlOldHeader.Visible = False
|
||||
List.FlowLayoutPanel.Controls.Clear()
|
||||
List.listlOld.Controls.Clear()
|
||||
Dim tmpHeight = 0
|
||||
For Each i In DS.DATA_LIST.LIST
|
||||
Dim u As New usrCntLPDFScanSimple(i.coll_id, i.coll_pfad, i.coll_bezeichnung, i.coll_archiv)
|
||||
AddHandler u.CLICKED, Sub()
|
||||
List.Close()
|
||||
End Sub
|
||||
AddHandler u.DELETE, Sub(coll_id, coll_bezeichnung)
|
||||
If vbYes = MsgBox("Möchten Sie die Datei '" & coll_bezeichnung & "' wirklich löschen?!? Die Daten gehen unwiederruflich verloren.", vbYesNoCancel, "Löschen") Then
|
||||
'getListItemAT Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(id)
|
||||
If Not DS.DELETE_LIST_POS(coll_id) Then
|
||||
MsgBox("Fehler beim Löschen!")
|
||||
End If
|
||||
|
||||
'DatenserverIDCollection.DELETE(id)
|
||||
' For Each c In DatenserverIDCollection.LIST
|
||||
' If c.da_id = id Then
|
||||
' DatenserverIDCollection.Remove(c)
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
initPdf()
|
||||
|
||||
List.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
AddHandler u.RENAME, Sub(coll_id, coll_bezeichnung)
|
||||
Dim bez = InputBox("Bitte geben Sie eine neue Bezeichnung ein:", , coll_bezeichnung)
|
||||
If bez <> "" Then
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = coll_id Then
|
||||
ii.coll_bezeichnung = bez
|
||||
ii.UPDATE()
|
||||
showMulti(List)
|
||||
initPdf()
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
AddHandler u.ARCHIV, Sub(coll_id, coll_bezeichnung)
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = coll_id Then
|
||||
ii.coll_archiv = Not ii.coll_archiv
|
||||
ii.UPDATE()
|
||||
showMulti(List)
|
||||
List.PerformLayout() 'IRGENDWIE NEU LAYOUTEN()
|
||||
initPdf()
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
AddHandler u.CLIPBOARD, Sub(coll_id, coll_bezeichnung)
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = coll_id Then
|
||||
'Zwischenablage
|
||||
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)}
|
||||
Dim d As New DataObject(DataFormats.FileDrop, f)
|
||||
Clipboard.SetDataObject(d, True)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
List.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
AddHandler u.OPEN_MAIL, Sub(coll_id, coll_bezeichnung)
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = coll_id Then
|
||||
'Mail
|
||||
Try
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, ii.coll_bezeichnung & ".pdf")
|
||||
Mail.Display()
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
End If
|
||||
List.Close()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
If _ARCHIV And i.coll_archiv Then
|
||||
List.listlOld.Controls.Add(u)
|
||||
List.listlOld.Visible = True
|
||||
tmpHeight += 23
|
||||
List.pnlOldHeader.Visible = True
|
||||
Else
|
||||
List.FlowLayoutPanel.Controls.Add(u)
|
||||
End If
|
||||
Next
|
||||
List.listlOld.MinimumSize = (New Drawing.Size(List.listlOld.Width, tmpHeight))
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!")
|
||||
End Try
|
||||
End Sub
|
||||
' Private Sub toolScannen_Click(sender As Object, e As EventArgs) Handles toolScannen.Click
|
||||
' Process.Start(pdf_Path)
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
Private Sub DateiScannenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiScannenToolStripMenuItem.Click, ToolStripMenuItem1.Click
|
||||
Try
|
||||
If KdNr < 0 Then Exit Sub
|
||||
Dim frmScan As New VERAG_PROG_ALLGEMEIN.frmScan("DirectScan")
|
||||
frmScan.DefaultFileName = Me._TEXT_PDF
|
||||
|
||||
If frmScan.ShowDialog(Me) = DialogResult.OK Then
|
||||
If frmScan.ReturnValue IsNot Nothing Then
|
||||
Dim Filename = _TEXT_PDF
|
||||
If frmScan.fileName <> "" Then Filename = frmScan.fileName
|
||||
' If _MULTI_FILES Then Filename &= Now.ToString("_ddMMyyyy_HHmmss")
|
||||
'Dim path = DATENSERVER.uploadDataToDATENSERVER_fromBytes(frmScan.ReturnValue, "DOKUMENTE", _DATENSERVER_ORDNER, KdNr, Filename, ".pdf")
|
||||
If DS.uploadDataToDATENSERVER_fromBytes(frmScan.ReturnValue, Filename, ".pdf") Then
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
' Me.ScanID = DATENSERVER.LAST_ID
|
||||
' Dim file As New FileInfo(frmScan.ReturnValue)
|
||||
'If file.Exists Then
|
||||
' Me.pdf_Path = path
|
||||
'DS.DATA_LIST.ADD(Path, VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath( Filename,"")
|
||||
|
||||
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
initPdf()
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub DateiHochladenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiHochladenToolStripMenuItem.Click, ToolStripMenuItem2.Click
|
||||
Try
|
||||
If _MULTI_FILES Then
|
||||
If DS.uploadDataToDATENSERVERFileDialog_MULTI(, ".pdf", , "PDF") Then
|
||||
initPdf()
|
||||
End If
|
||||
Else
|
||||
If DS.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") Then
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
End If
|
||||
End If
|
||||
initPdf()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!" & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LöschenToolStripMenuItem.Click 'NUR WENN MULTI = FALSE
|
||||
If vbYes = MsgBox("Möchten Sie die Datei wirklich löschen? Die Daten gehen unwiederruflich verloren.", vbYesNoCancel, "Löschen") Then
|
||||
DS.DELETE_COMPLETE()
|
||||
'''DATENSERVER.deleteFileByDatenarchivId(DatenserverIDCollection(0).da_id)
|
||||
'DatenserverIDCollection.DELETE(DatenserverIDCollection.LIST(0).coll_daId)
|
||||
''' DatenserverIDCollection.Clear()
|
||||
initPdf()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub usrcntlPDFScan_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseEnter, txt.MouseEnter, picPDF.MouseEnter
|
||||
Try
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then Me.BackColor = Drawing.Color.LightGray
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub usrcntlPDFScan_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave, txt.MouseLeave, picPDF.MouseLeave
|
||||
Try
|
||||
If Me.BackColor <> Drawing.Color.White Then Me.BackColor = Drawing.Color.White
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
|
||||
Try
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung)}
|
||||
Dim d As New DataObject(DataFormats.FileDrop, f)
|
||||
Clipboard.SetDataObject(d, True)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Laden der Daten!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub AlsEMailSendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlsEMailSendenToolStripMenuItem.Click
|
||||
Try
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
Mail.Display()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Private Sub ArchivierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ArchivierenToolStripMenuItem.Click
|
||||
' Try
|
||||
' If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' DS.DATA_LIST.LIST(0).coll_archiv = Not DS.DATA_LIST.LIST(0).coll_archiv
|
||||
' DS.DATA_LIST.LIST(0).UPDATE()
|
||||
' initPdf()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Fehler beim Archivieren!")
|
||||
' End Try
|
||||
'End Sub
|
||||
End Class
|
||||
155
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlPDFScanList.Designer.vb
generated
Normal file
155
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlPDFScanList.Designer.vb
generated
Normal file
@@ -0,0 +1,155 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrcntlPDFScanList
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.picAdd = New System.Windows.Forms.PictureBox()
|
||||
Me.MyListBox1 = New VERAG_PROG_ALLGEMEIN.MyListBox()
|
||||
Me.UmbenennenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.KopierenZwischenablageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.AlsEmailSendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.cntxtMulti.SuspendLayout()
|
||||
CType(Me.picAdd, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxt.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'cntxtMulti
|
||||
'
|
||||
Me.cntxtMulti.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxtMulti.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.ToolStripMenuItem2})
|
||||
Me.cntxtMulti.Name = "cntxt"
|
||||
Me.cntxtMulti.Size = New System.Drawing.Size(181, 48)
|
||||
'
|
||||
'ToolStripMenuItem1
|
||||
'
|
||||
Me.ToolStripMenuItem1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.scanner
|
||||
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
|
||||
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ToolStripMenuItem1.Text = "+ Datei scannen..."
|
||||
'
|
||||
'ToolStripMenuItem2
|
||||
'
|
||||
Me.ToolStripMenuItem2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.pdf
|
||||
Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2"
|
||||
Me.ToolStripMenuItem2.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ToolStripMenuItem2.Text = "+ Datei hochladen..."
|
||||
'
|
||||
'picAdd
|
||||
'
|
||||
Me.picAdd.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus
|
||||
Me.picAdd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.picAdd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.picAdd.Location = New System.Drawing.Point(96, 0)
|
||||
Me.picAdd.Name = "picAdd"
|
||||
Me.picAdd.Size = New System.Drawing.Size(23, 17)
|
||||
Me.picAdd.TabIndex = 3
|
||||
Me.picAdd.TabStop = False
|
||||
'
|
||||
'MyListBox1
|
||||
'
|
||||
Me.MyListBox1._value = ""
|
||||
Me.MyListBox1.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.MyListBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyListBox1.FormattingEnabled = True
|
||||
Me.MyListBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MyListBox1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.MyListBox1.Name = "MyListBox1"
|
||||
Me.MyListBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.MyListBox1.Size = New System.Drawing.Size(118, 64)
|
||||
Me.MyListBox1.TabIndex = 4
|
||||
'
|
||||
'UmbenennenToolStripMenuItem
|
||||
'
|
||||
Me.UmbenennenToolStripMenuItem.Name = "UmbenennenToolStripMenuItem"
|
||||
Me.UmbenennenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.UmbenennenToolStripMenuItem.Text = "Umbenennen"
|
||||
'
|
||||
'KopierenZwischenablageToolStripMenuItem
|
||||
'
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Name = "KopierenZwischenablageToolStripMenuItem"
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.KopierenZwischenablageToolStripMenuItem.Text = "Kopieren (Zwischenablage)"
|
||||
'
|
||||
'AlsEmailSendenToolStripMenuItem
|
||||
'
|
||||
Me.AlsEmailSendenToolStripMenuItem.Name = "AlsEmailSendenToolStripMenuItem"
|
||||
Me.AlsEmailSendenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.AlsEmailSendenToolStripMenuItem.Text = "Als Email senden"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(214, 6)
|
||||
'
|
||||
'LöschenToolStripMenuItem
|
||||
'
|
||||
Me.LöschenToolStripMenuItem.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
|
||||
Me.LöschenToolStripMenuItem.Name = "LöschenToolStripMenuItem"
|
||||
Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(217, 22)
|
||||
Me.LöschenToolStripMenuItem.Text = "Löschen"
|
||||
'
|
||||
'cntxt
|
||||
'
|
||||
Me.cntxt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UmbenennenToolStripMenuItem, Me.LöschenToolStripMenuItem, Me.ToolStripSeparator1, Me.KopierenZwischenablageToolStripMenuItem, Me.AlsEmailSendenToolStripMenuItem})
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 120)
|
||||
'
|
||||
'usrcntlPDFScanList
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.ContextMenuStrip = Me.cntxtMulti
|
||||
Me.Controls.Add(Me.picAdd)
|
||||
Me.Controls.Add(Me.MyListBox1)
|
||||
Me.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Name = "usrcntlPDFScanList"
|
||||
Me.Size = New System.Drawing.Size(118, 64)
|
||||
Me.cntxtMulti.ResumeLayout(False)
|
||||
CType(Me.picAdd, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.cntxt.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents cntxtMulti As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents ToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripMenuItem2 As System.Windows.Forms.ToolStripMenuItem
|
||||
Public WithEvents picAdd As System.Windows.Forms.PictureBox
|
||||
Public WithEvents MyListBox1 As MyListBox
|
||||
Friend WithEvents UmbenennenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents KopierenZwischenablageToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents AlsEmailSendenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripSeparator1 As Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents LöschenToolStripMenuItem As Windows.Forms.ToolStripMenuItem
|
||||
Public WithEvents cntxt As Windows.Forms.ContextMenuStrip
|
||||
End Class
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="cntxtMulti.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>129, 18</value>
|
||||
</metadata>
|
||||
<metadata name="cntxt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,366 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.IO
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class usrcntlPDFScanList
|
||||
Public Property _DATENSERVER_KATEGORIE As String = "DOKUMENTE"
|
||||
Public Property _DATENSERVER_ORDNER As String = ""
|
||||
Public Property _DATENSERVER_UOrdner1 As String = ""
|
||||
Public Property _DATENSERVER_UOrdner2 As String = ""
|
||||
Public Property _DATENSERVER_UOrdner3 As String = ""
|
||||
Public Property _OPEN_ORIGINAL As Boolean = False
|
||||
|
||||
Private Property _TEXT_PDF As String = "SONSTIGE"
|
||||
Private Property _MULTI_FILES As Boolean = True
|
||||
|
||||
Public Property _TYPE As String = "PDF"
|
||||
' Public pdf_Path As String = ""
|
||||
Dim KdNr As Integer = -1
|
||||
|
||||
'Dim DATENSERVER As New cDATENSERVER
|
||||
' Public ScanID As Integer = -1
|
||||
Public COLL_ID As Integer = -1
|
||||
'Dim DatenserverIDCollection As New cDatenserverIDCollectionList
|
||||
Public DS As VERAG_PROG_ALLGEMEIN.cDATENSERVER
|
||||
|
||||
|
||||
Public Event FileAdded(id As String, path As String, name As String)
|
||||
|
||||
Private Sub usrcntlPDFScan_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
' Me.txt.Text = _TEXT_PDF
|
||||
Me.MyListBox1.Dock = DockStyle.Fill
|
||||
End Sub
|
||||
|
||||
Public Sub INIT_daId(da_id)
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER(da_id)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Public Sub INIT(KdNr)
|
||||
Me.KdNr = KdNr
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
Me._DATENSERVER_UOrdner2 = _DATENSERVER_UOrdner2
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Public Sub INIT(KdNr, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3)
|
||||
Me.KdNr = KdNr
|
||||
Me._DATENSERVER_UOrdner1 = _DATENSERVER_UOrdner1
|
||||
Me._DATENSERVER_UOrdner2 = _DATENSERVER_UOrdner2
|
||||
Me._DATENSERVER_UOrdner3 = _DATENSERVER_UOrdner3
|
||||
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", _DATENSERVER_ORDNER, _DATENSERVER_UOrdner1, _DATENSERVER_UOrdner2, _DATENSERVER_UOrdner3, _TEXT_PDF, KdNr, _MULTI_FILES)
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub usrcntlPDFScan_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' Me.txt.Text = _TEXT_PDF
|
||||
Me.AllowDrop = True
|
||||
picAdd.ContextMenuStrip = cntxtMulti
|
||||
MyListBox1.ContextMenuStrip = cntxt
|
||||
' Else
|
||||
' If DatenserverIDCollection.Count > 0 Then
|
||||
'pdf_Path = DATENSERVER.getPathById(ScanID)
|
||||
|
||||
picAdd.Left = Me.Width - picAdd.Width - 2
|
||||
picAdd.Top = Me.Height - picAdd.Height - 2
|
||||
End Sub
|
||||
|
||||
Public Fill
|
||||
|
||||
' Sub addId(id)
|
||||
' If id > 0 Then
|
||||
' ScanID = id
|
||||
' pdf_Path = DATENSERVER.getPathById(ScanID)
|
||||
' initPdf()
|
||||
' End If
|
||||
' End Sub
|
||||
Public Sub initPdf()
|
||||
MyListBox1.Items.Clear()
|
||||
|
||||
KopierenZwischenablageToolStripMenuItem.Enabled = False
|
||||
AlsEmailSendenToolStripMenuItem.Enabled = False
|
||||
UmbenennenToolStripMenuItem.Enabled = False
|
||||
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
For Each i In DS.DATA_LIST.LIST
|
||||
MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(i.coll_bezeichnung, i.coll_id))
|
||||
Next
|
||||
KopierenZwischenablageToolStripMenuItem.Enabled = True
|
||||
AlsEmailSendenToolStripMenuItem.Enabled = True
|
||||
UmbenennenToolStripMenuItem.Enabled = True
|
||||
|
||||
LöschenToolStripMenuItem.Enabled = VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_Datenarchiv_DELETE", "SDL")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' Private Sub toolScannen_Click(sender As Object, e As EventArgs) Handles toolScannen.Click
|
||||
' Process.Start(pdf_Path)
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
Private Sub DateiScannenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem1.Click
|
||||
If KdNr < 0 Then Exit Sub
|
||||
Dim frmScan As New VERAG_PROG_ALLGEMEIN.frmScan("DirectScan")
|
||||
frmScan.DefaultFileName = Me._TEXT_PDF
|
||||
If frmScan.ShowDialog(Me) = DialogResult.OK Then
|
||||
If frmScan.ReturnValue IsNot Nothing Then
|
||||
Dim Filename = _TEXT_PDF
|
||||
If frmScan.fileName <> "" Then Filename = frmScan.fileName
|
||||
' If _MULTI_FILES Then Filename &= Now.ToString("_ddMMyyyy_HHmmss")
|
||||
'Dim path = DATENSERVER.uploadDataToDATENSERVER_fromBytes(frmScan.ReturnValue, "DOKUMENTE", _DATENSERVER_ORDNER, KdNr, Filename, ".pdf")
|
||||
If DS.uploadDataToDATENSERVER_fromBytes(frmScan.ReturnValue, Filename, ".pdf") Then
|
||||
If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
' Me.ScanID = DATENSERVER.LAST_ID
|
||||
' Dim file As New FileInfo(frmScan.ReturnValue)
|
||||
'If file.Exists Then
|
||||
' Me.pdf_Path = path
|
||||
'DS.DATA_LIST.ADD(Path, VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath( Filename,"")
|
||||
|
||||
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
initPdf()
|
||||
End Sub
|
||||
|
||||
Private Sub DateiHochladenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem2.Click
|
||||
If DS.uploadDataToDATENSERVERFileDialog_MULTI(, , , _TYPE) Then
|
||||
initPdf()
|
||||
End If
|
||||
'If DS.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") <> "" Then
|
||||
' If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'initPdf()
|
||||
|
||||
' Dim fd As New OpenFileDialog
|
||||
' fd.Filter = "PDF|*.PDF"
|
||||
' fd.DefaultExt = "pdf"
|
||||
' If fd.ShowDialog() = DialogResult.OK Then
|
||||
'Dim Filename = _TEXT_PDF
|
||||
' If _MULTI_FILES Then Filename &= Now.ToString("_ddMMyyyy_HHmmss")
|
||||
' Dim path = DATENSERVER.uploadDataToDATENSERVER(fd.FileName, "DOKUMENTE", _DATENSERVER_ORDNER, KdNr, Filename, ".pdf")
|
||||
' DatenserverIDCollection.ADD(DATENSERVER.LAST_ID, path, Filename)
|
||||
' RaiseEvent FileAdded(DATENSERVER.LAST_ID, path, Filename)
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LöschenToolStripMenuItem.Click 'NUR WENN MULTI = FALSE
|
||||
Try
|
||||
If vbYes = MsgBox("Möchten Sie die '" & MyListBox1.SelectedItems.Count & "' selektierte(n) Datei(en) wirklich löschen? Die Daten gehen unwiederruflich verloren.", vbYesNoCancel, "Löschen") Then
|
||||
For Each SI In MyListBox1.SelectedItems
|
||||
Dim DelItem As VERAG_PROG_ALLGEMEIN.MyListItem = DirectCast(SI, VERAG_PROG_ALLGEMEIN.MyListItem)
|
||||
DS.DELETE_LIST_POS(DelItem.Value)
|
||||
Next
|
||||
If DS.DATA_LIST.LIST.Count = 0 Then
|
||||
DS.DELETE_COMPLETE()
|
||||
End If
|
||||
initPdf()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub picAdd_Click(sender As Object, e As EventArgs) Handles picAdd.Click
|
||||
cntxtMulti.Show(Windows.Forms.Cursor.Position)
|
||||
End Sub
|
||||
|
||||
Private Sub MyListBox1_DoubleClick(sender As Object, e As EventArgs) Handles MyListBox1.DoubleClick
|
||||
Try
|
||||
If _OPEN_ORIGINAL Then
|
||||
Dim collId = DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value
|
||||
For Each i In DS.DATA_LIST.LIST
|
||||
If i.coll_id = collId Then
|
||||
Process.Start(i.coll_pfad)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
DS.OPEN(DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value,, True)
|
||||
End If
|
||||
|
||||
|
||||
' VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Öffnen!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub MyListBox1_MouseClick(sender As Object, e As MouseEventArgs) Handles MyListBox1.MouseClick
|
||||
If e.Button = Windows.Forms.MouseButtons.Right Then
|
||||
Dim i = MyListBox1.IndexFromPoint(e.X, e.Y)
|
||||
If i > 0 Then
|
||||
MyListBox1.SelectedIndex = i
|
||||
If MyListBox1.SelectedItems.Count > 0 Then cntxt.Show(Windows.Forms.Cursor.Position)
|
||||
Else
|
||||
cntxt.Hide()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UmbenennenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UmbenennenToolStripMenuItem.Click
|
||||
Try
|
||||
If MyListBox1.SelectedItems.Count = 1 Then
|
||||
Dim item As MyListItem = DirectCast(MyListBox1.SelectedItems(0), MyListItem)
|
||||
Dim bez = InputBox("Bitte geben Sie eine neue Bezeichnung ein:", , item.Text)
|
||||
If bez <> "" Then
|
||||
For Each i In DS.DATA_LIST.LIST
|
||||
If i.coll_id = item.Value Then
|
||||
i.coll_bezeichnung = bez
|
||||
i.UPDATE()
|
||||
initPdf()
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Dim fired = False
|
||||
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
|
||||
Try
|
||||
If keyData = (Keys.Control Or Keys.C) Then
|
||||
KopierenZwischenablageToolStripMenuItem_Click(KopierenZwischenablageToolStripMenuItem, New EventArgs)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
|
||||
Dim f(MyListBox1.SelectedItems.Count - 1) As String
|
||||
Dim cnt = 0
|
||||
If MyListBox1.SelectedItems.Count >= 1 Then
|
||||
For Each SI In MyListBox1.SelectedItems
|
||||
Dim item As MyListItem = DirectCast(SI, MyListItem) 'DirectCast(MyListBox1.SelectedItems(0), MyListItem)
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = item.Value Then
|
||||
'Dim f() As String = {ii.coll_pfad}
|
||||
If ii.coll_pfad <> "" Then
|
||||
f(cnt) = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
|
||||
cnt += 1
|
||||
'Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
'Zwischenablage
|
||||
Clipboard.Clear()
|
||||
Dim d As New DataObject(DataFormats.FileDrop, f)
|
||||
Clipboard.SetDataObject(d, True)
|
||||
Exit Sub
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Laden der Daten!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub AlsEmailSendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlsEmailSendenToolStripMenuItem.Click
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
|
||||
If MyListBox1.SelectedItems.Count >= 1 Then
|
||||
Try
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
For Each SI In MyListBox1.SelectedItems
|
||||
Dim item As MyListItem = DirectCast(SI, MyListItem) 'DirectCast(MyListBox1.SelectedItems(0), MyListItem)
|
||||
For Each ii In DS.DATA_LIST.LIST
|
||||
If ii.coll_id = item.Value Then
|
||||
If ii.coll_pfad <> "" Then
|
||||
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Mail.Display()
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Öffnen der Mail!")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Form1_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter ', txt.DragEnter, Me.DragEnter, picPDF.DragEnter
|
||||
e.Effect = DragDropEffects.All
|
||||
End Sub
|
||||
Private Sub txt_Click(sender As Object, e As DragEventArgs) Handles Me.DragDrop ', txt.DragDrop, Me.DragDrop, picPDF.DragDrop
|
||||
If e.Data.GetDataPresent("FileDrop", True) = True Then
|
||||
Dim FileList As String() = CType(e.Data.GetData("FileDrop"), Object) 'Hier wird der Variable "Wert" das übergeben, was wir auf die Form gezogen haben. Bei einer Datei wäre es dann der Pfad der Datei.
|
||||
If FileList.Count > 0 Then
|
||||
If Not _MULTI_FILES And FileList.Count > 1 Then
|
||||
MsgBox("Es können nicht mehrere Dateien hochgeladen werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
For Each W In FileList
|
||||
If W.ToUpper.EndsWith(".PDF") Then
|
||||
Try
|
||||
Dim bezeichnung = System.IO.Path.GetFileName(W).ToString
|
||||
DS.uploadDataToDATENSERVER(W, bezeichnung, ".pdf")
|
||||
'Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
'RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
'If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!" & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
initPdf()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cntxt_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles cntxt.Opening
|
||||
UmbenennenToolStripMenuItem.Visible = (MyListBox1.SelectedItems.Count = 1)
|
||||
End Sub
|
||||
End Class
|
||||
104
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlSearch.Designer.vb
generated
Normal file
104
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlSearch.Designer.vb
generated
Normal file
@@ -0,0 +1,104 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrcntlSearch
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.dgvKundenAktiv = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.DirectoryEntry1 = New System.DirectoryServices.DirectoryEntry()
|
||||
Me.lblClose = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
CType(Me.dgvKundenAktiv, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'dgvKundenAktiv
|
||||
'
|
||||
Me.dgvKundenAktiv.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvKundenAktiv.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvKundenAktiv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvKundenAktiv.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.dgvKundenAktiv.Location = New System.Drawing.Point(0, 0)
|
||||
Me.dgvKundenAktiv.Name = "dgvKundenAktiv"
|
||||
Me.dgvKundenAktiv.Size = New System.Drawing.Size(564, 358)
|
||||
Me.dgvKundenAktiv.TabIndex = 0
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.AutoSize = True
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.Controls.Add(Me.dgvKundenAktiv)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Location = New System.Drawing.Point(2, 3)
|
||||
Me.pnl.Name = "pnl"
|
||||
Me.pnl.Size = New System.Drawing.Size(564, 374)
|
||||
Me.pnl.TabIndex = 1
|
||||
'
|
||||
'lblClose
|
||||
'
|
||||
Me.lblClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblClose.AutoSize = True
|
||||
Me.lblClose.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.lblClose.Font = New System.Drawing.Font("Arial Black", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblClose.ForeColor = System.Drawing.Color.Red
|
||||
Me.lblClose.Location = New System.Drawing.Point(542, -5)
|
||||
Me.lblClose.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.lblClose.Name = "lblClose"
|
||||
Me.lblClose.Size = New System.Drawing.Size(22, 23)
|
||||
Me.lblClose.TabIndex = 17
|
||||
Me.lblClose.Text = "X"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.SystemColors.InactiveCaption
|
||||
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel1.Controls.Add(Me.lblClose)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 358)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(564, 16)
|
||||
Me.Panel1.TabIndex = 3
|
||||
'
|
||||
'usrcntlSearch
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.SystemColors.MenuHighlight
|
||||
Me.Controls.Add(Me.pnl)
|
||||
Me.Name = "usrcntlSearch"
|
||||
Me.Size = New System.Drawing.Size(570, 380)
|
||||
CType(Me.dgvKundenAktiv, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents pnl As System.Windows.Forms.Panel
|
||||
Public WithEvents dgvKundenAktiv As MyDatagridview
|
||||
Friend WithEvents DirectoryEntry1 As System.DirectoryServices.DirectoryEntry
|
||||
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||
Public WithEvents lblClose As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="DirectoryEntry1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,37 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class usrcntlSearch
|
||||
Public Event DGV_Click(sender As Object, e As EventArgs)
|
||||
Public Event DGV_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
Public Event CLOSE(sender As Object, e As EventArgs)
|
||||
|
||||
Private Sub dgvKundenAktiv_Click(sender As Object, e As EventArgs) Handles dgvKundenAktiv.Click
|
||||
RaiseEvent DGV_Click(sender, e)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dgvFindKD_Click(sender As Object, e As KeyEventArgs) Handles dgvKundenAktiv.KeyDown
|
||||
RaiseEvent DGV_KeyDown(sender, e)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub usrcntlKdSearch_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
|
||||
Me.pnl.Location = New Point(2, 2)
|
||||
Me.pnl.Size = New Size(Me.Width - 4, Me.Height - 4)
|
||||
End Sub
|
||||
|
||||
Private Sub lblClose_Click(sender As Object, e As EventArgs) Handles lblClose.Click
|
||||
RaiseEvent CLOSE(sender, e)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
|
||||
Try
|
||||
MyBase.OnPaint(e)
|
||||
Catch ex As Exception
|
||||
Me.Invalidate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
74
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlUnterposEntry.Designer.vb
generated
Normal file
74
VERAG_PROG_ALLGEMEIN/Benutzerdefinierte Steuerelemente/usrcntlUnterposEntry.Designer.vb
generated
Normal file
@@ -0,0 +1,74 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class usrcntlUnterposEntry
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.lblBezeichnung = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'txtAnzahl
|
||||
'
|
||||
Me.txtAnzahl._DateTimeOnly = False
|
||||
Me.txtAnzahl._numbersOnly = True
|
||||
Me.txtAnzahl._numbersOnlyKommastellen = ""
|
||||
Me.txtAnzahl._Prozent = False
|
||||
Me.txtAnzahl._ShortDateNew = False
|
||||
Me.txtAnzahl._ShortDateOnly = False
|
||||
Me.txtAnzahl._TimeOnly = False
|
||||
Me.txtAnzahl._value = ""
|
||||
Me.txtAnzahl._Waehrung = False
|
||||
Me.txtAnzahl._WaehrungZeichen = True
|
||||
Me.txtAnzahl.Location = New System.Drawing.Point(3, 0)
|
||||
Me.txtAnzahl.MaxLength = 4
|
||||
Me.txtAnzahl.MaxLineLength = -1
|
||||
Me.txtAnzahl.MaxLines_Warning = ""
|
||||
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
|
||||
Me.txtAnzahl.Name = "txtAnzahl"
|
||||
Me.txtAnzahl.Size = New System.Drawing.Size(41, 20)
|
||||
Me.txtAnzahl.TabIndex = 106
|
||||
'
|
||||
'lblBezeichnung
|
||||
'
|
||||
Me.lblBezeichnung.AutoSize = True
|
||||
Me.lblBezeichnung.Location = New System.Drawing.Point(45, 3)
|
||||
Me.lblBezeichnung.Name = "lblBezeichnung"
|
||||
Me.lblBezeichnung.Size = New System.Drawing.Size(28, 13)
|
||||
Me.lblBezeichnung.TabIndex = 107
|
||||
Me.lblBezeichnung.Text = "TXT"
|
||||
'
|
||||
'usrcntlUnterposEntry
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.txtAnzahl)
|
||||
Me.Controls.Add(Me.lblBezeichnung)
|
||||
Me.Name = "usrcntlUnterposEntry"
|
||||
Me.Size = New System.Drawing.Size(200, 20)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Public WithEvents txtAnzahl As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Public WithEvents lblBezeichnung As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,15 @@
|
||||
Public Class usrcntlUnterposEntry
|
||||
' Property AbfertigungsartNr = -1
|
||||
Property UnterPosArt = -1
|
||||
|
||||
Property Anzahl = 0
|
||||
|
||||
Private Sub txtAnzahl_LostFocus(sender As Object, e As EventArgs) Handles txtAnzahl.LostFocus
|
||||
If IsNumeric(sender.text) Then
|
||||
Anzahl = CInt(sender.text)
|
||||
Else
|
||||
Anzahl = 0
|
||||
sender.text = 0
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user