Common: organize modules
This commit is contained in:
parent
e78ea65d27
commit
a0fdf95772
@ -173,10 +173,10 @@
|
|||||||
<Compile Include="DocumentResultList\Helpers.vb" />
|
<Compile Include="DocumentResultList\Helpers.vb" />
|
||||||
<Compile Include="DocumentResultList\Watcher.vb" />
|
<Compile Include="DocumentResultList\Watcher.vb" />
|
||||||
<Compile Include="DocumentResultList\Params.vb" />
|
<Compile Include="DocumentResultList\Params.vb" />
|
||||||
<Compile Include="frmDocumentResultList.Designer.vb">
|
<Compile Include="DocumentResultList\frmDocumentResultList.Designer.vb">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmDocumentResultList.vb">
|
<Compile Include="DocumentResultList\frmDocumentResultList.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="DocumentResultList\Cache.vb" />
|
<Compile Include="DocumentResultList\Cache.vb" />
|
||||||
@ -204,10 +204,10 @@
|
|||||||
<Compile Include="frmSQLConfig.vb">
|
<Compile Include="frmSQLConfig.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmSQLEditor.Designer.vb">
|
<Compile Include="SQLEditor\frmSQLEditor.Designer.vb">
|
||||||
<DependentUpon>frmSQLEditor.vb</DependentUpon>
|
<DependentUpon>frmSQLEditor.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmSQLEditor.vb">
|
<Compile Include="SQLEditor\frmSQLEditor.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmSQLResult.Designer.vb">
|
<Compile Include="frmSQLResult.Designer.vb">
|
||||||
@ -225,12 +225,6 @@
|
|||||||
<Compile Include="GridBuilder.vb" />
|
<Compile Include="GridBuilder.vb" />
|
||||||
<Compile Include="IBaseForm.vb" />
|
<Compile Include="IBaseForm.vb" />
|
||||||
<Compile Include="IResultForm.vb" />
|
<Compile Include="IResultForm.vb" />
|
||||||
<Compile Include="NNMsgBoxEx.Designer.vb">
|
|
||||||
<DependentUpon>NNMsgBoxEx.vb</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="NNMsgBoxEx.vb">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
<Compile Include="My Project\Resources.Designer.vb">
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@ -267,13 +261,13 @@
|
|||||||
<EmbeddedResource Include="frmDialog.resx">
|
<EmbeddedResource Include="frmDialog.resx">
|
||||||
<DependentUpon>frmDialog.vb</DependentUpon>
|
<DependentUpon>frmDialog.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmDocumentResultList.en.resx">
|
<EmbeddedResource Include="DocumentResultList\frmDocumentResultList.en.resx">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmDocumentResultList.fr.resx">
|
<EmbeddedResource Include="DocumentResultList\frmDocumentResultList.fr.resx">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmDocumentResultList.resx">
|
<EmbeddedResource Include="DocumentResultList\frmDocumentResultList.resx">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -286,7 +280,7 @@
|
|||||||
<EmbeddedResource Include="frmSQLConfig.resx">
|
<EmbeddedResource Include="frmSQLConfig.resx">
|
||||||
<DependentUpon>frmSQLConfig.vb</DependentUpon>
|
<DependentUpon>frmSQLConfig.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmSQLEditor.resx">
|
<EmbeddedResource Include="SQLEditor\frmSQLEditor.resx">
|
||||||
<DependentUpon>frmSQLEditor.vb</DependentUpon>
|
<DependentUpon>frmSQLEditor.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmSQLResult.resx">
|
<EmbeddedResource Include="frmSQLResult.resx">
|
||||||
@ -295,9 +289,6 @@
|
|||||||
<EmbeddedResource Include="frmWorkflow_Adhoc_start.resx">
|
<EmbeddedResource Include="frmWorkflow_Adhoc_start.resx">
|
||||||
<DependentUpon>frmWorkflow_Adhoc_start.vb</DependentUpon>
|
<DependentUpon>frmWorkflow_Adhoc_start.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="NNMsgBoxEx.resx">
|
|
||||||
<DependentUpon>NNMsgBoxEx.vb</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
|||||||
135
GUIs.Common/NNMsgBoxEx.Designer.vb
generated
135
GUIs.Common/NNMsgBoxEx.Designer.vb
generated
@ -1,135 +0,0 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
|
||||||
Partial Class NNMsgBoxEx
|
|
||||||
Inherits DevExpress.XtraEditors.XtraForm
|
|
||||||
|
|
||||||
'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.chkBx = New System.Windows.Forms.CheckBox()
|
|
||||||
Me.btn1 = New System.Windows.Forms.Button()
|
|
||||||
Me.btn2 = New System.Windows.Forms.Button()
|
|
||||||
Me.messageLbl = New System.Windows.Forms.Label()
|
|
||||||
Me.btn3 = New System.Windows.Forms.Button()
|
|
||||||
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
|
||||||
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.PanelControl1.SuspendLayout()
|
|
||||||
Me.SuspendLayout()
|
|
||||||
'
|
|
||||||
'chkBx
|
|
||||||
'
|
|
||||||
Me.chkBx.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.chkBx.AutoSize = True
|
|
||||||
Me.chkBx.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.chkBx.Location = New System.Drawing.Point(12, 76)
|
|
||||||
Me.chkBx.Name = "chkBx"
|
|
||||||
Me.chkBx.Size = New System.Drawing.Size(152, 20)
|
|
||||||
Me.chkBx.TabIndex = 22
|
|
||||||
Me.chkBx.Text = "Don't show this again"
|
|
||||||
Me.chkBx.UseVisualStyleBackColor = True
|
|
||||||
Me.chkBx.Visible = False
|
|
||||||
'
|
|
||||||
'btn1
|
|
||||||
'
|
|
||||||
Me.btn1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.btn1.AutoSize = True
|
|
||||||
Me.btn1.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
|
||||||
Me.btn1.Location = New System.Drawing.Point(161, 12)
|
|
||||||
Me.btn1.Name = "btn1"
|
|
||||||
Me.btn1.Size = New System.Drawing.Size(100, 23)
|
|
||||||
Me.btn1.TabIndex = 5
|
|
||||||
Me.btn1.Text = "Button1"
|
|
||||||
Me.btn1.UseVisualStyleBackColor = True
|
|
||||||
Me.btn1.Visible = False
|
|
||||||
'
|
|
||||||
'btn2
|
|
||||||
'
|
|
||||||
Me.btn2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.btn2.AutoSize = True
|
|
||||||
Me.btn2.Location = New System.Drawing.Point(267, 12)
|
|
||||||
Me.btn2.Name = "btn2"
|
|
||||||
Me.btn2.Size = New System.Drawing.Size(100, 23)
|
|
||||||
Me.btn2.TabIndex = 6
|
|
||||||
Me.btn2.Text = "Button2"
|
|
||||||
Me.btn2.UseVisualStyleBackColor = True
|
|
||||||
Me.btn2.Visible = False
|
|
||||||
'
|
|
||||||
'messageLbl
|
|
||||||
'
|
|
||||||
Me.messageLbl.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.messageLbl.Location = New System.Drawing.Point(58, 10)
|
|
||||||
Me.messageLbl.Name = "messageLbl"
|
|
||||||
Me.messageLbl.Size = New System.Drawing.Size(415, 63)
|
|
||||||
Me.messageLbl.TabIndex = 19
|
|
||||||
Me.messageLbl.Text = "[Message]"
|
|
||||||
'
|
|
||||||
'btn3
|
|
||||||
'
|
|
||||||
Me.btn3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.btn3.AutoSize = True
|
|
||||||
Me.btn3.Location = New System.Drawing.Point(373, 12)
|
|
||||||
Me.btn3.Name = "btn3"
|
|
||||||
Me.btn3.Size = New System.Drawing.Size(100, 23)
|
|
||||||
Me.btn3.TabIndex = 7
|
|
||||||
Me.btn3.Text = "Button3"
|
|
||||||
Me.btn3.UseVisualStyleBackColor = True
|
|
||||||
Me.btn3.Visible = False
|
|
||||||
'
|
|
||||||
'PanelControl1
|
|
||||||
'
|
|
||||||
Me.PanelControl1.Controls.Add(Me.btn1)
|
|
||||||
Me.PanelControl1.Controls.Add(Me.btn3)
|
|
||||||
Me.PanelControl1.Controls.Add(Me.btn2)
|
|
||||||
Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Bottom
|
|
||||||
Me.PanelControl1.Location = New System.Drawing.Point(0, 102)
|
|
||||||
Me.PanelControl1.Name = "PanelControl1"
|
|
||||||
Me.PanelControl1.Size = New System.Drawing.Size(485, 47)
|
|
||||||
Me.PanelControl1.TabIndex = 23
|
|
||||||
'
|
|
||||||
'NNMsgBoxEx
|
|
||||||
'
|
|
||||||
Me.Appearance.BackColor = System.Drawing.SystemColors.ControlLightLight
|
|
||||||
Me.Appearance.Options.UseBackColor = True
|
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
|
|
||||||
Me.CancelButton = Me.btn1
|
|
||||||
Me.ClientSize = New System.Drawing.Size(485, 149)
|
|
||||||
Me.Controls.Add(Me.PanelControl1)
|
|
||||||
Me.Controls.Add(Me.chkBx)
|
|
||||||
Me.Controls.Add(Me.messageLbl)
|
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
|
||||||
Me.MaximizeBox = False
|
|
||||||
Me.MinimizeBox = False
|
|
||||||
Me.Name = "NNMsgBoxEx"
|
|
||||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
|
||||||
Me.Text = "[Title]"
|
|
||||||
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.PanelControl1.ResumeLayout(False)
|
|
||||||
Me.PanelControl1.PerformLayout()
|
|
||||||
Me.ResumeLayout(False)
|
|
||||||
Me.PerformLayout()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private chkBx As System.Windows.Forms.CheckBox
|
|
||||||
Private WithEvents btn1 As System.Windows.Forms.Button
|
|
||||||
Private WithEvents btn2 As System.Windows.Forms.Button
|
|
||||||
Private messageLbl As System.Windows.Forms.Label
|
|
||||||
Private WithEvents btn3 As System.Windows.Forms.Button
|
|
||||||
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
|
||||||
End Class
|
|
||||||
@ -1,120 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@ -1,196 +0,0 @@
|
|||||||
Imports System.Drawing
|
|
||||||
Imports System.Windows.Forms
|
|
||||||
|
|
||||||
Public Class NNMsgBoxEx
|
|
||||||
Public Sub New(message As String, title As String)
|
|
||||||
Me.New(message, title, MessageBoxIcon.None)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(message As String, title As String, icon As MessageBoxIcon)
|
|
||||||
Me.New(message, title, getMessageBoxIcon(icon))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(message As String, title As String, icon As Icon)
|
|
||||||
InitializeComponent()
|
|
||||||
messageLbl.Text = message
|
|
||||||
Text = title
|
|
||||||
m_sysIcon = icon
|
|
||||||
If m_sysIcon Is Nothing Then messageLbl.Location = New System.Drawing.Point(FORM_X_MARGIN, FORM_Y_MARGIN)
|
|
||||||
SetButtons("OK")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Shared Function getMessageBoxIcon(icon As MessageBoxIcon) As Icon
|
|
||||||
Dim oIcon As Icon = Nothing
|
|
||||||
|
|
||||||
Select Case icon
|
|
||||||
Case MessageBoxIcon.Asterisk
|
|
||||||
oIcon = SystemIcons.Asterisk
|
|
||||||
Case MessageBoxIcon.[Error]
|
|
||||||
oIcon = SystemIcons.[Error]
|
|
||||||
Case MessageBoxIcon.Exclamation
|
|
||||||
oIcon = SystemIcons.Exclamation
|
|
||||||
Case MessageBoxIcon.Question
|
|
||||||
oIcon = SystemIcons.Question
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If oIcon IsNot Nothing Then
|
|
||||||
Return DevExpress.Utils.Drawing.Helpers.StockIconHelper.GetWindows8AssociatedIcon(oIcon)
|
|
||||||
Else
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private m_minWidth As Integer
|
|
||||||
Private m_minHeight As Integer
|
|
||||||
|
|
||||||
Public Sub SetMinSize(width As Integer, height As Integer)
|
|
||||||
m_minWidth = width
|
|
||||||
m_minHeight = height
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub SetButtons(ParamArray names As String())
|
|
||||||
Dim drs As DialogResult() = New DialogResult(names.Length - 1) {}
|
|
||||||
|
|
||||||
For i As Integer = 0 To names.Length - 1
|
|
||||||
drs(i) = DialogResult.None
|
|
||||||
Next
|
|
||||||
|
|
||||||
SetButtons(names, drs)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub SetButtons(names As String(), results As DialogResult())
|
|
||||||
SetButtons(names, results, 1)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub SetButtons(names As String(), results As DialogResult(), def As Integer)
|
|
||||||
If names Is Nothing Then Throw New ArgumentNullException("btnText", "Button Text is null")
|
|
||||||
Dim count As Integer = names.Length
|
|
||||||
If count < 1 OrElse count > 3 Then Throw New ArgumentException("Invalid number of buttons. Must be between 1 and 3.")
|
|
||||||
m_minButtonRowWidth = setButtonParams(btn1, names(0), If(def = 1, 1, 2), results(0))
|
|
||||||
|
|
||||||
If count > 1 Then
|
|
||||||
m_minButtonRowWidth += setButtonParams(btn2, names(1), If(def = 2, 1, 3), results(1)) + BUTTON_SPACE
|
|
||||||
End If
|
|
||||||
|
|
||||||
If count > 2 Then
|
|
||||||
m_minButtonRowWidth += setButtonParams(btn3, names(2), If(def = 3, 1, 4), results(2)) + BUTTON_SPACE
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_minButtonRowWidth As Integer
|
|
||||||
|
|
||||||
Private Shared Function setButtonParams(btn As Button, text As String, tab As Integer, dr As DialogResult) As Integer
|
|
||||||
btn.Text = text
|
|
||||||
btn.Visible = True
|
|
||||||
btn.DialogResult = dr
|
|
||||||
btn.TabIndex = tab
|
|
||||||
Return btn.Size.Width
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Sub SetCheckbox(text As String)
|
|
||||||
SetCheckbox(text, False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub SetCheckbox(text As String, chcked As Boolean)
|
|
||||||
chkBx.Visible = True
|
|
||||||
chkBx.Text = text
|
|
||||||
chkBx.Checked = chcked
|
|
||||||
m_minButtonRowWidth += chkBx.Size.Width + CHECKBOX_SPACE
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub DialogBox_Load(sender As Object, e As EventArgs)
|
|
||||||
If Not btn1.Visible Then SetButtons(New String() {"OK"}, New DialogResult() {DialogResult.OK})
|
|
||||||
m_minButtonRowWidth += 2 * FORM_X_MARGIN
|
|
||||||
setDialogSize()
|
|
||||||
setButtonRowLocations()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Const FORM_Y_MARGIN As Integer = 10
|
|
||||||
Const FORM_X_MARGIN As Integer = 16
|
|
||||||
Const BUTTON_SPACE As Integer = 5
|
|
||||||
Const CHECKBOX_SPACE As Integer = 15
|
|
||||||
Const TEXT_Y_MARGIN As Integer = 30
|
|
||||||
|
|
||||||
Private Sub setDialogSize()
|
|
||||||
Dim requiredWidth As Integer = messageLbl.Location.X + messageLbl.Size.Width + FORM_X_MARGIN
|
|
||||||
requiredWidth = If(requiredWidth > m_minButtonRowWidth, requiredWidth, m_minButtonRowWidth)
|
|
||||||
Dim requiredHeight As Integer = messageLbl.Location.Y + messageLbl.Size.Height - btn2.Location.Y + ClientSize.Height + TEXT_Y_MARGIN
|
|
||||||
Dim minSetWidth As Integer = If(ClientSize.Width > m_minWidth, ClientSize.Width, m_minWidth)
|
|
||||||
Dim minSetHeight As Integer = If(ClientSize.Height > m_minHeight, ClientSize.Height, m_minHeight)
|
|
||||||
Dim s As Size = New Size()
|
|
||||||
s.Width = If(requiredWidth > minSetWidth, requiredWidth, minSetWidth)
|
|
||||||
s.Height = If(requiredHeight > minSetHeight, requiredHeight, minSetHeight)
|
|
||||||
ClientSize = s
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub setButtonRowLocations()
|
|
||||||
Dim formWidth As Integer = ClientRectangle.Width
|
|
||||||
Dim x As Integer = formWidth - FORM_X_MARGIN
|
|
||||||
Dim y As Integer = btn1.Location.Y
|
|
||||||
|
|
||||||
If btn3.Visible Then
|
|
||||||
x -= btn3.Size.Width
|
|
||||||
btn3.Location = New Point(x, y)
|
|
||||||
x -= BUTTON_SPACE
|
|
||||||
End If
|
|
||||||
|
|
||||||
If btn2.Visible Then
|
|
||||||
x -= btn2.Size.Width
|
|
||||||
btn2.Location = New Point(x, y)
|
|
||||||
x -= BUTTON_SPACE
|
|
||||||
End If
|
|
||||||
|
|
||||||
x -= btn1.Size.Width
|
|
||||||
btn1.Location = New Point(x, y)
|
|
||||||
If chkBx.Visible Then chkBx.Location = New Point(FORM_X_MARGIN, chkBx.Location.Y)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_sysIcon As Icon
|
|
||||||
|
|
||||||
Protected Overrides Sub OnPaint(e As PaintEventArgs)
|
|
||||||
If m_sysIcon IsNot Nothing Then
|
|
||||||
Dim g As Graphics = e.Graphics
|
|
||||||
g.DrawIconUnstretched(m_sysIcon, New Rectangle(FORM_X_MARGIN, FORM_Y_MARGIN, m_sysIcon.Width, m_sysIcon.Height))
|
|
||||||
End If
|
|
||||||
|
|
||||||
MyBase.OnPaint(e)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public ReadOnly Property CheckboxChecked As Boolean
|
|
||||||
Get
|
|
||||||
Return chkBx.Checked
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_result As DialogBoxResult
|
|
||||||
|
|
||||||
Public ReadOnly Property Result As DialogBoxResult
|
|
||||||
Get
|
|
||||||
Return m_result
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn1.Click, btn2.Click, btn3.Click
|
|
||||||
If sender.Equals(btn1) Then
|
|
||||||
m_result = DialogBoxResult.Button1
|
|
||||||
ElseIf sender.Equals(btn2) Then
|
|
||||||
m_result = DialogBoxResult.Button2
|
|
||||||
ElseIf sender.Equals(btn3) Then
|
|
||||||
m_result = DialogBoxResult.Button3
|
|
||||||
End If
|
|
||||||
|
|
||||||
If (CType(sender, Button)).DialogResult = DialogResult.None Then
|
|
||||||
Close()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Enum DialogBoxResult
|
|
||||||
Button1
|
|
||||||
Button2
|
|
||||||
Button3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Private Sub NNMsgBoxEx_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@ -1,8 +1,6 @@
|
|||||||
Imports System.ComponentModel
|
Imports System.Data.SqlClient
|
||||||
Imports System.Data.SqlClient
|
Imports System.Windows.Forms
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Encryption
|
|
||||||
Imports DigitalData.Modules.Filesystem
|
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class frmSQLConfig
|
Public Class frmSQLConfig
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user