Zooflow: Add Active Directory User Import

This commit is contained in:
Jonathan Jenne
2022-03-07 15:51:27 +01:00
parent 4dec4be471
commit 6ffc699fb1
30 changed files with 1514 additions and 348 deletions

View File

@@ -0,0 +1,302 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_ImportUser
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'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.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.btnImportUsers = New DevExpress.XtraBars.BarButtonItem()
Me.btnImportGroups = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
Me.gridGroupList = New DevExpress.XtraGrid.GridControl()
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colCount = New DevExpress.XtraGrid.Columns.GridColumn()
Me.gridUserList = New DevExpress.XtraGrid.GridControl()
Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn3 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.SplashScreenManager1 = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.DigitalData.GUIs.ZooFlow.frmWaitForm), True, True)
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.Panel1.SuspendLayout()
CType(Me.SplitContainerControl1.Panel2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.Panel2.SuspendLayout()
Me.SplitContainerControl1.SuspendLayout()
CType(Me.gridGroupList, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.gridUserList, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'RibbonControl1
'
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnImportUsers, Me.btnImportGroups, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 7
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
Me.RibbonControl1.ShowToolbarCustomizeItem = False
Me.RibbonControl1.Size = New System.Drawing.Size(1012, 132)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
Me.RibbonControl1.Toolbar.ShowCustomizeItem = False
'
'btnImportUsers
'
Me.btnImportUsers.Caption = "Benutzer Importieren"
Me.btnImportUsers.Id = 1
Me.btnImportUsers.Name = "btnImportUsers"
'
'btnImportGroups
'
Me.btnImportGroups.Caption = "Gruppen Importieren"
Me.btnImportGroups.Id = 2
Me.btnImportGroups.Name = "btnImportGroups"
'
'BarButtonItem1
'
Me.BarButtonItem1.Caption = "Import von ausgewählten Benutzern Starten"
Me.BarButtonItem1.Id = 3
Me.BarButtonItem1.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.actions_send1
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'BarButtonItem2
'
Me.BarButtonItem2.Caption = "Import von ausgewählten Gruppen starten"
Me.BarButtonItem2.Id = 4
Me.BarButtonItem2.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.actions_send2
Me.BarButtonItem2.Name = "BarButtonItem2"
'
'BarButtonItem3
'
Me.BarButtonItem3.Caption = "Gruppen laden"
Me.BarButtonItem3.Id = 5
Me.BarButtonItem3.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.actions_check1
Me.BarButtonItem3.Name = "BarButtonItem3"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "RibbonPage1"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
Me.RibbonPageGroup1.Text = "Daten laden"
'
'RibbonPageGroup2
'
Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "Import"
'
'RibbonStatusBar1
'
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 525)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(1012, 24)
'
'RibbonPage2
'
Me.RibbonPage2.Name = "RibbonPage2"
Me.RibbonPage2.Text = "RibbonPage2"
'
'SplitContainerControl1
'
Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 132)
Me.SplitContainerControl1.Name = "SplitContainerControl1"
'
'SplitContainerControl1.Panel1
'
Me.SplitContainerControl1.Panel1.Controls.Add(Me.gridGroupList)
Me.SplitContainerControl1.Panel1.Text = "Panel1"
'
'SplitContainerControl1.Panel2
'
Me.SplitContainerControl1.Panel2.Controls.Add(Me.gridUserList)
Me.SplitContainerControl1.Panel2.Text = "Panel2"
Me.SplitContainerControl1.Size = New System.Drawing.Size(1012, 393)
Me.SplitContainerControl1.SplitterPosition = 263
Me.SplitContainerControl1.TabIndex = 2
'
'gridGroupList
'
Me.gridGroupList.Dock = System.Windows.Forms.DockStyle.Fill
Me.gridGroupList.Location = New System.Drawing.Point(0, 0)
Me.gridGroupList.MainView = Me.GridView1
Me.gridGroupList.MenuManager = Me.RibbonControl1
Me.gridGroupList.Name = "gridGroupList"
Me.gridGroupList.Size = New System.Drawing.Size(263, 393)
Me.gridGroupList.TabIndex = 0
Me.gridGroupList.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
'
'GridView1
'
Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colCount})
Me.GridView1.GridControl = Me.gridGroupList
Me.GridView1.Name = "GridView1"
Me.GridView1.OptionsView.ShowAutoFilterRow = True
'
'colName
'
Me.colName.Caption = "Name"
Me.colName.FieldName = "Name"
Me.colName.Name = "colName"
Me.colName.Visible = True
Me.colName.VisibleIndex = 0
'
'colCount
'
Me.colCount.Caption = "Benutzer"
Me.colCount.FieldName = "Count"
Me.colCount.Name = "colCount"
Me.colCount.Visible = True
Me.colCount.VisibleIndex = 1
'
'gridUserList
'
Me.gridUserList.Dock = System.Windows.Forms.DockStyle.Fill
Me.gridUserList.Location = New System.Drawing.Point(0, 0)
Me.gridUserList.MainView = Me.GridView2
Me.gridUserList.MenuManager = Me.RibbonControl1
Me.gridUserList.Name = "gridUserList"
Me.gridUserList.Size = New System.Drawing.Size(739, 393)
Me.gridUserList.TabIndex = 0
Me.gridUserList.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView2})
'
'GridView2
'
Me.GridView2.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn1, Me.GridColumn2, Me.GridColumn3, Me.GridColumn4})
Me.GridView2.GridControl = Me.gridUserList
Me.GridView2.Name = "GridView2"
Me.GridView2.OptionsSelection.MultiSelect = True
Me.GridView2.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect
Me.GridView2.OptionsView.ShowAutoFilterRow = True
'
'GridColumn1
'
Me.GridColumn1.Caption = "Benutzername"
Me.GridColumn1.FieldName = "samAccountName"
Me.GridColumn1.Name = "GridColumn1"
Me.GridColumn1.Visible = True
Me.GridColumn1.VisibleIndex = 1
'
'GridColumn2
'
Me.GridColumn2.Caption = "Vorname"
Me.GridColumn2.FieldName = "Surname"
Me.GridColumn2.Name = "GridColumn2"
Me.GridColumn2.Visible = True
Me.GridColumn2.VisibleIndex = 2
'
'GridColumn3
'
Me.GridColumn3.Caption = "Nachname"
Me.GridColumn3.FieldName = "GivenName"
Me.GridColumn3.Name = "GridColumn3"
Me.GridColumn3.Visible = True
Me.GridColumn3.VisibleIndex = 3
'
'GridColumn4
'
Me.GridColumn4.Caption = "Email"
Me.GridColumn4.FieldName = "Email"
Me.GridColumn4.Name = "GridColumn4"
Me.GridColumn4.Visible = True
Me.GridColumn4.VisibleIndex = 4
'
'SplashScreenManager1
'
Me.SplashScreenManager1.ClosingDelay = 500
'
'frmAdmin_ImportUser
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1012, 549)
Me.Controls.Add(Me.SplitContainerControl1)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.text
Me.Name = "frmAdmin_ImportUser"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "Active Directory Import"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.Panel1.ResumeLayout(False)
CType(Me.SplitContainerControl1.Panel2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.Panel2.ResumeLayout(False)
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.ResumeLayout(False)
CType(Me.gridGroupList, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.gridUserList, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents gridGroupList As DevExpress.XtraGrid.GridControl
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents gridUserList As DevExpress.XtraGrid.GridControl
Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents btnImportUsers As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnImportGroups As DevExpress.XtraBars.BarButtonItem
Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn3 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn4 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents colCount As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents SplashScreenManager1 As DevExpress.XtraSplashScreen.SplashScreenManager
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
End Class

View File

@@ -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>

View File

@@ -0,0 +1,231 @@
Imports DevExpress.XtraSplashScreen
Imports DigitalData.Modules.Interfaces
Imports DigitalData.Modules.Logging
Imports DigitalData.GUIs.Common
Imports DevExpress.XtraGrid.Views.Grid
Public Class frmAdmin_ImportUser
Private ReadOnly Logger As Logger = My.LogConfig.GetLogger
Private ActiveDirectory As ActiveDirectoryInterface
Private Sub frmAdmin_ImportUser_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ActiveDirectory = New ActiveDirectoryInterface(My.LogConfig, Nothing)
Dim oGridManager = New GridBuilder(GridView1, GridView2)
oGridManager.
WithDefaults().
WithReadOnlyOptions().
WithClipboardHandler()
End Sub
Private Async Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
SplashScreenManager1.ShowWaitForm()
SplashScreenManager1.SetWaitFormCaption("Loading Groups")
Try
Dim oGroups As List(Of ADGroup) = Await ActiveDirectory.ListGroupsAsync()
Dim oGroupList As New List(Of GroupListing)
For Each oGroup As ADGroup In oGroups
Try
SplashScreenManager1.SetWaitFormDescription(oGroup.SAMAccountName)
Dim oUsers As List(Of ADUser) = Await ActiveDirectory.ListUsersAsync(oGroup.Name)
Dim oListing As New GroupListing(oGroup) With {
.Count = oUsers.Count,
.Users = oUsers
}
If oUsers.Count > 0 Then
oGroupList.Add(oListing)
End If
Catch ex As Exception
Logger.Error(ex)
End Try
Next
gridGroupList.ForceInitialize()
gridGroupList.DataSource = oGroupList
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager1.CloseWaitForm()
End Try
End Sub
Private Sub btnImportUsers_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnImportUsers.ItemClick
Dim oForm As New frmAdmin_ImportUser()
oForm.ShowDialog()
End Sub
Private Sub GridView1_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridView1.FocusedRowChanged
Dim oGroup As GroupListing = GridView1.GetRow(e.FocusedRowHandle)
If Not IsNothing(oGroup) Then
Try
gridUserList.DataSource = oGroup.Users
Catch ex As Exception
Logger.Error(ex)
End Try
End If
End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
Dim oSelected = GridView2.GetSelectedRows()
Dim oDialogResult = MsgBox($"Wollen Sie die ausgewählten [{oSelected.Count}] Benutzer importieren?",
MsgBoxStyle.Question Or MsgBoxStyle.YesNo,
"Import von Benutzern")
If DialogResult.No = oDialogResult Then
Exit Sub
End If
Dim oImported = 0
Dim oSkipped = 0
Try
For Each oHandle In oSelected
Dim oRow As ADUser = GridView2.GetRow(oHandle)
If Not UserExists(oRow.samAccountName) Then
If InsertUser(oRow.samAccountName, oRow.Surname, oRow.GivenName, oRow.Email) Then
oImported += 1
Else
Logger.Warn("User [{0}] could not be imported!", oRow.samAccountName)
End If
Else
oSkipped += 1
End If
Next
If oImported = 0 Then
Logger.Warn("No new users imported. All selected users are already in database.")
MsgBox($"Es wurden keine neuen Benutzer importiert, da alle ausgewählten Benutzer bereits in der Benutzerverwaltung vorhanden sind.", MsgBoxStyle.Exclamation, "UserManager")
Else
Logger.Info($"Import successful!{vbNewLine}{vbNewLine}{oImported} users imported{vbNewLine}{oSkipped} users skipped")
MsgBox($"{oImported} Benutzer wurden erfolgreich importiert!", MsgBoxStyle.Information, Text)
End If
Catch ex As Exception
Logger.Error(ex, "Error while importing users")
MsgBox($"Error while importing users: {ex.Message}", MsgBoxStyle.Critical)
End Try
End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Dim oSelected = GridView1.GetSelectedRows()
Dim oMessage = $"Wollen Sie die ausgewählten [{oSelected.Count}] Gruppen importieren? Achtung: Es werden NUR die GRUPPEN importiert, nicht die enthaltenen Benutzer!"
Dim oDialogResult = MsgBox(oMessage,
MsgBoxStyle.Question Or MsgBoxStyle.YesNo,
"Import von Gruppen")
If DialogResult.No = oDialogResult Then
Exit Sub
End If
Dim oImported = 0
Dim oSkipped = 0
Try
For Each oHandle In oSelected
Dim oRow As ADGroup = GridView2.GetRow(oHandle)
If Not GroupExists(oRow.SAMAccountName) Then
If InsertGroup(oRow.SAMAccountName) Then
oImported += 1
Else
Logger.Warn("Group [{0}] could not be imported!", oRow.SAMAccountName)
End If
Else
oSkipped += 1
End If
Next
If oImported = 0 Then
Logger.Warn("No new groups imported. All selected groups are already in database.")
MsgBox($"Es wurden keine neuen Gruppen importiert, da alle ausgewählten Gruppen bereits in der Gruppenverwaltung vorhanden sind.", MsgBoxStyle.Exclamation, "UserManager")
Else
Logger.Info($"Import successful!{vbNewLine}{vbNewLine}{oImported} groups imported{vbNewLine}{oSkipped} groups skipped")
MsgBox($"{oImported} Gruppen wurden erfolgreich importiert!", MsgBoxStyle.Information, Text)
End If
Catch ex As Exception
Logger.Error(ex, "Error while importing users")
MsgBox($"Error while importing users: {ex.Message}", MsgBoxStyle.Critical)
End Try
End Sub
Public Function GroupExists(groupName As String) As Boolean
Try
Dim oSql As String = $"SELECT COUNT(GUID) FROM TBDD_GROUPS WHERE NAME = '{groupName}'"
Dim oResult = My.DatabaseECM.GetScalarValue(oSql)
Return Convert.ToBoolean(oResult)
Catch ex As Exception
Logger.Error($"Error in GroupExists: {ex.Message}")
Return Nothing
End Try
End Function
Public Function UserExists(userName As String) As Boolean
Try
Dim oSql As String = $"SELECT COUNT(GUID) FROM TBDD_USER WHERE USERNAME = '{userName}'"
Dim oResult = My.DatabaseECM.GetScalarValue(oSql)
Return Convert.ToBoolean(oResult)
Catch ex As Exception
Logger.Error($"Error in UserExists: {ex.Message}")
Return Nothing
End Try
End Function
Public Function InsertUser(username As String, prename As String, name As String, email As String)
Try
Dim oAddedWho As String = Environment.UserName
Dim oSql As String = $"INSERT INTO TBDD_USER (PRENAME, NAME, USERNAME, EMAIL, ADDED_WHO)
VALUES ('{prename}','{name}','{username}','{email}','{oAddedWho}')"
Dim oResult = My.DatabaseECM.ExecuteNonQuery(oSql)
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Function InsertGroup(name As String, Optional ECM_FK_ID As Integer = 1, Optional adSync As Boolean = True, Optional internal As Boolean = False, Optional active As Boolean = True)
Try
Dim addedWho As String = Environment.UserName
Dim sql As String = $"INSERT INTO TBDD_GROUPS (NAME, ADDED_WHO, ECM_FK_ID, AD_SYNC, INTERNAL, ACTIVE)
VALUES ('{name}', '{addedWho}', {ECM_FK_ID},
{Convert.ToInt32(adSync)},
{Convert.ToInt32(internal)},
{Convert.ToInt32(active)})"
Dim oResult = My.DatabaseECM.ExecuteNonQuery(sql)
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Private Class GroupListing
Public Group As ADGroup
Public Users As List(Of ADUser)
Public Property Count As Integer
Public ReadOnly Property Name As String
Get
Return Group?.Name
End Get
End Property
Public Sub New(pGroup As ADGroup)
Group = pGroup
Count = 0
End Sub
End Class
End Class

View File

@@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_User
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -20,13 +20,13 @@ Partial Class frmAdmin_User
'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()> _
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.txtStatus = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@@ -44,23 +44,23 @@ Partial Class frmAdmin_User
Me.TextEdit6 = New DevExpress.XtraEditors.TextEdit()
Me.TextEdit7 = New DevExpress.XtraEditors.TextEdit()
Me.TextEdit8 = New DevExpress.XtraEditors.TextEdit()
Me.txtAddedWho = New DevExpress.XtraEditors.TextEdit()
Me.txtChangedWho = New DevExpress.XtraEditors.TextEdit()
Me.TextEdit61 = New DevExpress.XtraEditors.TextEdit()
Me.TextEdit81 = New DevExpress.XtraEditors.TextEdit()
Me.Root = New DevExpress.XtraLayout.LayoutControlGroup()
Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
Me.TextEdit61 = New DevExpress.XtraEditors.TextEdit()
Me.txtAddedWho = New DevExpress.XtraEditors.TextEdit()
Me.txtChangedWho = New DevExpress.XtraEditors.TextEdit()
Me.TextEdit81 = New DevExpress.XtraEditors.TextEdit()
Me.LayoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem11 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem12 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DSDD_Stammdaten, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBDD_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -74,48 +74,41 @@ Partial Class frmAdmin_User
CType(Me.TextEdit6.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit7.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit8.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtAddedWho.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtChangedWho.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit61.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit81.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit61.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtAddedWho.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtChangedWho.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEdit81.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'RibbonControl1
'
Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3})
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem2, Me.BarButtonItem3, Me.txtStatus})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 4
Me.RibbonControl1.MaxItemId = 5
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
Me.RibbonControl1.ShowToolbarCustomizeItem = False
Me.RibbonControl1.Size = New System.Drawing.Size(816, 63)
Me.RibbonControl1.Size = New System.Drawing.Size(639, 63)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
Me.RibbonControl1.Toolbar.ShowCustomizeItem = False
'
'BarButtonItem1
'
Me.BarButtonItem1.Caption = "Speichern und Schließen"
Me.BarButtonItem1.Id = 1
Me.BarButtonItem1.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.bo_validation1
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'BarButtonItem2
'
Me.BarButtonItem2.Caption = "Speichern"
@@ -130,6 +123,12 @@ Partial Class frmAdmin_User
Me.BarButtonItem3.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.delete1
Me.BarButtonItem3.Name = "BarButtonItem3"
'
'txtStatus
'
Me.txtStatus.Caption = "Status"
Me.txtStatus.Id = 4
Me.txtStatus.Name = "txtStatus"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
@@ -138,7 +137,6 @@ Partial Class frmAdmin_User
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
@@ -146,10 +144,11 @@ Partial Class frmAdmin_User
'
'RibbonStatusBar1
'
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 517)
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtStatus)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 406)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(816, 24)
Me.RibbonStatusBar1.Size = New System.Drawing.Size(639, 24)
'
'RibbonPage2
'
@@ -196,7 +195,7 @@ Partial Class frmAdmin_User
Me.LayoutControl1.Name = "LayoutControl1"
Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(688, 133, 1038, 537)
Me.LayoutControl1.Root = Me.Root
Me.LayoutControl1.Size = New System.Drawing.Size(816, 454)
Me.LayoutControl1.Size = New System.Drawing.Size(639, 343)
Me.LayoutControl1.TabIndex = 2
Me.LayoutControl1.Text = "LayoutControl1"
'
@@ -206,7 +205,7 @@ Partial Class frmAdmin_User
Me.TextEdit1.Location = New System.Drawing.Point(114, 20)
Me.TextEdit1.MenuManager = Me.RibbonControl1
Me.TextEdit1.Name = "TextEdit1"
Me.TextEdit1.Size = New System.Drawing.Size(682, 20)
Me.TextEdit1.Size = New System.Drawing.Size(505, 20)
Me.TextEdit1.StyleController = Me.LayoutControl1
Me.TextEdit1.TabIndex = 4
'
@@ -216,7 +215,7 @@ Partial Class frmAdmin_User
Me.TextEdit2.Location = New System.Drawing.Point(114, 60)
Me.TextEdit2.MenuManager = Me.RibbonControl1
Me.TextEdit2.Name = "TextEdit2"
Me.TextEdit2.Size = New System.Drawing.Size(682, 20)
Me.TextEdit2.Size = New System.Drawing.Size(195, 20)
Me.TextEdit2.StyleController = Me.LayoutControl1
Me.TextEdit2.TabIndex = 5
'
@@ -226,67 +225,99 @@ Partial Class frmAdmin_User
Me.TextEdit3.Location = New System.Drawing.Point(114, 100)
Me.TextEdit3.MenuManager = Me.RibbonControl1
Me.TextEdit3.Name = "TextEdit3"
Me.TextEdit3.Size = New System.Drawing.Size(682, 20)
Me.TextEdit3.Size = New System.Drawing.Size(195, 20)
Me.TextEdit3.StyleController = Me.LayoutControl1
Me.TextEdit3.TabIndex = 6
'
'TextEdit4
'
Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_USERBindingSource, "NAME", True))
Me.TextEdit4.Location = New System.Drawing.Point(114, 140)
Me.TextEdit4.Location = New System.Drawing.Point(423, 100)
Me.TextEdit4.MenuManager = Me.RibbonControl1
Me.TextEdit4.Name = "TextEdit4"
Me.TextEdit4.Size = New System.Drawing.Size(682, 20)
Me.TextEdit4.Size = New System.Drawing.Size(196, 20)
Me.TextEdit4.StyleController = Me.LayoutControl1
Me.TextEdit4.TabIndex = 7
'
'TextEdit5
'
Me.TextEdit5.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_USERBindingSource, "SHORTNAME", True))
Me.TextEdit5.Location = New System.Drawing.Point(114, 180)
Me.TextEdit5.Location = New System.Drawing.Point(423, 60)
Me.TextEdit5.MenuManager = Me.RibbonControl1
Me.TextEdit5.Name = "TextEdit5"
Me.TextEdit5.Size = New System.Drawing.Size(682, 20)
Me.TextEdit5.Size = New System.Drawing.Size(196, 20)
Me.TextEdit5.StyleController = Me.LayoutControl1
Me.TextEdit5.TabIndex = 8
'
'TextEdit6
'
Me.TextEdit6.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_USERBindingSource, "EMAIL", True))
Me.TextEdit6.Location = New System.Drawing.Point(114, 220)
Me.TextEdit6.Location = New System.Drawing.Point(114, 140)
Me.TextEdit6.MenuManager = Me.RibbonControl1
Me.TextEdit6.Name = "TextEdit6"
Me.TextEdit6.Size = New System.Drawing.Size(682, 20)
Me.TextEdit6.Size = New System.Drawing.Size(505, 20)
Me.TextEdit6.StyleController = Me.LayoutControl1
Me.TextEdit6.TabIndex = 9
'
'TextEdit7
'
Me.TextEdit7.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_USERBindingSource, "LANGUAGE", True))
Me.TextEdit7.Location = New System.Drawing.Point(114, 260)
Me.TextEdit7.Location = New System.Drawing.Point(114, 180)
Me.TextEdit7.MenuManager = Me.RibbonControl1
Me.TextEdit7.Name = "TextEdit7"
Me.TextEdit7.Size = New System.Drawing.Size(682, 20)
Me.TextEdit7.Size = New System.Drawing.Size(195, 20)
Me.TextEdit7.StyleController = Me.LayoutControl1
Me.TextEdit7.TabIndex = 10
'
'TextEdit8
'
Me.TextEdit8.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_USERBindingSource, "DATE_FORMAT", True))
Me.TextEdit8.Location = New System.Drawing.Point(114, 300)
Me.TextEdit8.Location = New System.Drawing.Point(423, 180)
Me.TextEdit8.MenuManager = Me.RibbonControl1
Me.TextEdit8.Name = "TextEdit8"
Me.TextEdit8.Size = New System.Drawing.Size(682, 20)
Me.TextEdit8.Size = New System.Drawing.Size(196, 20)
Me.TextEdit8.StyleController = Me.LayoutControl1
Me.TextEdit8.TabIndex = 11
'
'txtAddedWho
'
Me.txtAddedWho.Location = New System.Drawing.Point(114, 220)
Me.txtAddedWho.Name = "txtAddedWho"
Me.txtAddedWho.Size = New System.Drawing.Size(195, 20)
Me.txtAddedWho.StyleController = Me.LayoutControl1
Me.txtAddedWho.TabIndex = 9
'
'txtChangedWho
'
Me.txtChangedWho.Location = New System.Drawing.Point(114, 260)
Me.txtChangedWho.Name = "txtChangedWho"
Me.txtChangedWho.Size = New System.Drawing.Size(195, 20)
Me.txtChangedWho.StyleController = Me.LayoutControl1
Me.txtChangedWho.TabIndex = 11
'
'TextEdit61
'
Me.TextEdit61.Location = New System.Drawing.Point(423, 220)
Me.TextEdit61.Name = "TextEdit61"
Me.TextEdit61.Size = New System.Drawing.Size(196, 20)
Me.TextEdit61.StyleController = Me.LayoutControl1
Me.TextEdit61.TabIndex = 10
'
'TextEdit81
'
Me.TextEdit81.Location = New System.Drawing.Point(423, 260)
Me.TextEdit81.Name = "TextEdit81"
Me.TextEdit81.Size = New System.Drawing.Size(196, 20)
Me.TextEdit81.StyleController = Me.LayoutControl1
Me.TextEdit81.TabIndex = 12
'
'Root
'
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
Me.Root.GroupBordersVisible = False
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.LayoutControlItem7, Me.LayoutControlItem8, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem11, Me.LayoutControlItem12})
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem6, Me.LayoutControlItem7, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem11, Me.LayoutControlItem12, Me.LayoutControlItem5, Me.LayoutControlItem4, Me.LayoutControlItem8})
Me.Root.Name = "Root"
Me.Root.Size = New System.Drawing.Size(816, 454)
Me.Root.Size = New System.Drawing.Size(639, 343)
Me.Root.TextVisible = False
'
'LayoutControlItem1
@@ -296,7 +327,7 @@ Partial Class frmAdmin_User
Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlItem1.Name = "LayoutControlItem1"
Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem1.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem1.Size = New System.Drawing.Size(619, 40)
Me.LayoutControlItem1.Text = "ID"
Me.LayoutControlItem1.TextSize = New System.Drawing.Size(82, 13)
'
@@ -306,7 +337,7 @@ Partial Class frmAdmin_User
Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 40)
Me.LayoutControlItem2.Name = "LayoutControlItem2"
Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem2.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem2.Size = New System.Drawing.Size(309, 40)
Me.LayoutControlItem2.Text = "Benutzername"
Me.LayoutControlItem2.TextSize = New System.Drawing.Size(82, 13)
'
@@ -316,101 +347,39 @@ Partial Class frmAdmin_User
Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 80)
Me.LayoutControlItem3.Name = "LayoutControlItem3"
Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem3.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem3.Size = New System.Drawing.Size(309, 40)
Me.LayoutControlItem3.Text = "Vorname"
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem4
'
Me.LayoutControlItem4.Control = Me.TextEdit4
Me.LayoutControlItem4.Location = New System.Drawing.Point(0, 120)
Me.LayoutControlItem4.Name = "LayoutControlItem4"
Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem4.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem4.Text = "Nachname"
Me.LayoutControlItem4.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem5
'
Me.LayoutControlItem5.Control = Me.TextEdit5
Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 160)
Me.LayoutControlItem5.Name = "LayoutControlItem5"
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem5.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem5.Text = "Kurzname"
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem6
'
Me.LayoutControlItem6.Control = Me.TextEdit6
Me.LayoutControlItem6.Location = New System.Drawing.Point(0, 200)
Me.LayoutControlItem6.Location = New System.Drawing.Point(0, 120)
Me.LayoutControlItem6.Name = "LayoutControlItem6"
Me.LayoutControlItem6.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem6.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem6.Size = New System.Drawing.Size(619, 40)
Me.LayoutControlItem6.Text = "Email Adresse"
Me.LayoutControlItem6.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem7
'
Me.LayoutControlItem7.Control = Me.TextEdit7
Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 240)
Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 160)
Me.LayoutControlItem7.Name = "LayoutControlItem7"
Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem7.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem7.Size = New System.Drawing.Size(309, 40)
Me.LayoutControlItem7.Text = "Sprache"
Me.LayoutControlItem7.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem8
'
Me.LayoutControlItem8.Control = Me.TextEdit8
Me.LayoutControlItem8.Location = New System.Drawing.Point(0, 280)
Me.LayoutControlItem8.Name = "LayoutControlItem8"
Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem8.Size = New System.Drawing.Size(796, 40)
Me.LayoutControlItem8.Text = "Datumsformat"
Me.LayoutControlItem8.TextSize = New System.Drawing.Size(82, 13)
'
'TextEdit61
'
Me.TextEdit61.Location = New System.Drawing.Point(511, 340)
Me.TextEdit61.Name = "TextEdit61"
Me.TextEdit61.Size = New System.Drawing.Size(285, 20)
Me.TextEdit61.StyleController = Me.LayoutControl1
Me.TextEdit61.TabIndex = 10
'
'txtAddedWho
'
Me.txtAddedWho.Location = New System.Drawing.Point(114, 340)
Me.txtAddedWho.Name = "txtAddedWho"
Me.txtAddedWho.Size = New System.Drawing.Size(283, 20)
Me.txtAddedWho.StyleController = Me.LayoutControl1
Me.txtAddedWho.TabIndex = 9
'
'txtChangedWho
'
Me.txtChangedWho.Location = New System.Drawing.Point(114, 380)
Me.txtChangedWho.Name = "txtChangedWho"
Me.txtChangedWho.Size = New System.Drawing.Size(283, 20)
Me.txtChangedWho.StyleController = Me.LayoutControl1
Me.txtChangedWho.TabIndex = 11
'
'TextEdit81
'
Me.TextEdit81.Location = New System.Drawing.Point(511, 380)
Me.TextEdit81.Name = "TextEdit81"
Me.TextEdit81.Size = New System.Drawing.Size(285, 20)
Me.TextEdit81.StyleController = Me.LayoutControl1
Me.TextEdit81.TabIndex = 12
'
'LayoutControlItem9
'
Me.LayoutControlItem9.Control = Me.txtAddedWho
Me.LayoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft
Me.LayoutControlItem9.CustomizationFormText = "Erstellt Wer"
Me.LayoutControlItem9.Location = New System.Drawing.Point(0, 320)
Me.LayoutControlItem9.Location = New System.Drawing.Point(0, 200)
Me.LayoutControlItem9.Name = "LayoutControlItem9"
Me.LayoutControlItem9.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem9.Size = New System.Drawing.Size(397, 40)
Me.LayoutControlItem9.Size = New System.Drawing.Size(309, 40)
Me.LayoutControlItem9.Text = "Erstellt Wer"
Me.LayoutControlItem9.TextSize = New System.Drawing.Size(82, 13)
'
@@ -419,10 +388,10 @@ Partial Class frmAdmin_User
Me.LayoutControlItem10.Control = Me.txtChangedWho
Me.LayoutControlItem10.ControlAlignment = System.Drawing.ContentAlignment.TopLeft
Me.LayoutControlItem10.CustomizationFormText = "Geändert Wer"
Me.LayoutControlItem10.Location = New System.Drawing.Point(0, 360)
Me.LayoutControlItem10.Location = New System.Drawing.Point(0, 240)
Me.LayoutControlItem10.Name = "LayoutControlItem10"
Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem10.Size = New System.Drawing.Size(397, 74)
Me.LayoutControlItem10.Size = New System.Drawing.Size(309, 83)
Me.LayoutControlItem10.Text = "Geändert Wer"
Me.LayoutControlItem10.TextSize = New System.Drawing.Size(82, 13)
'
@@ -431,10 +400,10 @@ Partial Class frmAdmin_User
Me.LayoutControlItem11.Control = Me.TextEdit61
Me.LayoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft
Me.LayoutControlItem11.CustomizationFormText = "Erstellt Wann"
Me.LayoutControlItem11.Location = New System.Drawing.Point(397, 320)
Me.LayoutControlItem11.Location = New System.Drawing.Point(309, 200)
Me.LayoutControlItem11.Name = "LayoutControlItem11"
Me.LayoutControlItem11.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem11.Size = New System.Drawing.Size(399, 40)
Me.LayoutControlItem11.Size = New System.Drawing.Size(310, 40)
Me.LayoutControlItem11.Text = "Erstellt Wann"
Me.LayoutControlItem11.TextSize = New System.Drawing.Size(82, 13)
'
@@ -443,21 +412,52 @@ Partial Class frmAdmin_User
Me.LayoutControlItem12.Control = Me.TextEdit81
Me.LayoutControlItem12.ControlAlignment = System.Drawing.ContentAlignment.TopLeft
Me.LayoutControlItem12.CustomizationFormText = "Geändert Wann"
Me.LayoutControlItem12.Location = New System.Drawing.Point(397, 360)
Me.LayoutControlItem12.Location = New System.Drawing.Point(309, 240)
Me.LayoutControlItem12.Name = "LayoutControlItem12"
Me.LayoutControlItem12.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem12.Size = New System.Drawing.Size(399, 74)
Me.LayoutControlItem12.Size = New System.Drawing.Size(310, 83)
Me.LayoutControlItem12.Text = "Geändert Wann"
Me.LayoutControlItem12.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem5
'
Me.LayoutControlItem5.Control = Me.TextEdit5
Me.LayoutControlItem5.Location = New System.Drawing.Point(309, 40)
Me.LayoutControlItem5.Name = "LayoutControlItem5"
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem5.Size = New System.Drawing.Size(310, 40)
Me.LayoutControlItem5.Text = "Kurzname"
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem4
'
Me.LayoutControlItem4.Control = Me.TextEdit4
Me.LayoutControlItem4.Location = New System.Drawing.Point(309, 80)
Me.LayoutControlItem4.Name = "LayoutControlItem4"
Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem4.Size = New System.Drawing.Size(310, 40)
Me.LayoutControlItem4.Text = "Nachname"
Me.LayoutControlItem4.TextSize = New System.Drawing.Size(82, 13)
'
'LayoutControlItem8
'
Me.LayoutControlItem8.Control = Me.TextEdit8
Me.LayoutControlItem8.Location = New System.Drawing.Point(309, 160)
Me.LayoutControlItem8.Name = "LayoutControlItem8"
Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem8.Size = New System.Drawing.Size(310, 40)
Me.LayoutControlItem8.Text = "Datumsformat"
Me.LayoutControlItem8.TextSize = New System.Drawing.Size(82, 13)
'
'frmAdmin_User
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(816, 541)
Me.ClientSize = New System.Drawing.Size(639, 430)
Me.Controls.Add(Me.LayoutControl1)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.KeyPreview = True
Me.Name = "frmAdmin_User"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
@@ -475,23 +475,23 @@ Partial Class frmAdmin_User
CType(Me.TextEdit6.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit7.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit8.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtAddedWho.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtChangedWho.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit61.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit81.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit61.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtAddedWho.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtChangedWho.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEdit81.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -516,7 +516,6 @@ Partial Class frmAdmin_User
Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents TextEdit5 As DevExpress.XtraEditors.TextEdit
@@ -535,4 +534,5 @@ Partial Class frmAdmin_User
Friend WithEvents LayoutControlItem10 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LayoutControlItem11 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LayoutControlItem12 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents txtStatus As DevExpress.XtraBars.BarButtonItem
End Class

View File

@@ -1,4 +1,7 @@
Imports DigitalData.GUIs.Common.Base
Imports DevExpress.XtraLayout
Imports DigitalData.GUIs.Common
Imports DigitalData.GUIs.Common.Base
Imports DigitalData.Modules.Logging
Public Class frmAdmin_User
Implements IAdminForm
@@ -8,7 +11,10 @@ Public Class frmAdmin_User
Public Property HasChanges As Boolean Implements IAdminForm.HasChanges
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
Public Property ErrorHandler As BaseErrorHandler
Private Property ErrorHandler As BaseErrorHandler
Private Property Pages As ClassDetailPageManager
Private Property Logger As Logger
Public Sub New(pPrimaryKey As Integer, Optional pIsInsert As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
@@ -18,6 +24,7 @@ Public Class frmAdmin_User
PrimaryKey = pPrimaryKey
IsInsert = pIsInsert
ErrorHandler = New BaseErrorHandler(My.LogConfig, My.LogConfig.GetLogger, Me)
Logger = My.LogConfig.GetLogger()
End Sub
Private Sub frmAdmin_User_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -25,17 +32,39 @@ Public Class frmAdmin_User
TBDD_USERTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
If IsInsert Then
DSDD_Stammdaten.TBDD_USER.ADDED_WHOColumn.DefaultValue = My.Application.User.UserName
TBDD_USERBindingSource.AddNew()
Else
TBDD_USERTableAdapter.Fill(DSDD_Stammdaten.TBDD_USER, PrimaryKey)
End If
Catch ex As System.Exception
' Add Focus Handler to all controls in all LayoutControls
Pages = New ClassDetailPageManager(My.LogConfig, Me, New List(Of LayoutControl) From {LayoutControl1})
Pages.Add(New ClassDetailPageManager.PrimaryPage(IsInsert) With {
.Name = "Benutzer",
.BindingSource = TBDD_USERBindingSource,
.DataTable = DSDD_Stammdaten.TBDD_USER,
.AddedWhoEdit = txtAddedWho,
.ChangedWhoEdit = txtChangedWho
})
Pages.PrepareLoad()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Public Function DeleteData() As Boolean Implements IAdminForm.DeleteData
#Region "DELETE ----------------------------------------------"
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
If DeleteData() Then
Close()
Else
txtStatus.Caption = $"Error while deleting!"
End If
End Sub
Private Function DeleteData() As Boolean Implements IAdminForm.DeleteData
Try
TBDD_USERTableAdapter.Delete(PrimaryKey)
Return True
@@ -44,31 +73,32 @@ Public Class frmAdmin_User
Return False
End Try
End Function
Public Function SaveData() As Boolean
Try
TBDD_USERBindingSource.EndEdit()
If DSDD_Stammdaten.TBDD_USER.GetChanges() IsNot Nothing Then
HasChanges = True
If IsInsert Then
txtAddedWho.EditValue = My.Application.User.UserName
Else
txtChangedWho.EditValue = My.Application.User.UserName
End If
TBDD_USERBindingSource.EndEdit()
TBDD_USERTableAdapter.Update(DSDD_Stammdaten.TBDD_USER)
End If
Return True
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "DeleteData")
Return False
End Try
End Function
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
#End Region
#Region "SAVE ----------------------------------------------"
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
SaveData()
End Sub
Private Sub frmAdmin_User_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown
If e.KeyCode = Keys.F5 Then
SaveData()
End If
End Sub
Private Sub SaveData()
If Pages.PrepareSave() = True Then
Try
Dim oPage = Pages.Current
TBDD_USERTableAdapter.Update(oPage.DataTable)
oPage.IsInsert = False
txtStatus.Caption = $"{oPage.Name} gespeichert!"
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "ItemClick")
End Try
Else
txtStatus.Caption = $"Keine Änderungen"
End If
End Sub
#End Region
End Class

View File

@@ -0,0 +1,83 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmWaitForm
Inherits DevExpress.XtraWaitForm.WaitForm
'Form 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.progressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel()
Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.tableLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'progressPanel1
'
Me.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent
Me.progressPanel1.Appearance.Options.UseBackColor = True
Me.progressPanel1.AppearanceCaption.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.progressPanel1.AppearanceCaption.Options.UseFont = True
Me.progressPanel1.AppearanceDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.progressPanel1.AppearanceDescription.Options.UseFont = True
Me.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.progressPanel1.ImageHorzOffset = 20
Me.progressPanel1.Location = New System.Drawing.Point(0, 17)
Me.progressPanel1.Margin = New System.Windows.Forms.Padding(0, 3, 0, 3)
Me.progressPanel1.Name = "progressPanel1"
Me.progressPanel1.Size = New System.Drawing.Size(246, 39)
Me.progressPanel1.TabIndex = 0
Me.progressPanel1.Text = "progressPanel1"
'
'tableLayoutPanel1
'
Me.tableLayoutPanel1.AutoSize = True
Me.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent
Me.tableLayoutPanel1.ColumnCount = 1
Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Controls.Add(Me.progressPanel1, 0, 0)
Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
Me.tableLayoutPanel1.Padding = New System.Windows.Forms.Padding(0, 14, 0, 14)
Me.tableLayoutPanel1.RowCount = 1
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Size = New System.Drawing.Size(246, 73)
Me.tableLayoutPanel1.TabIndex = 1
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ClientSize = New System.Drawing.Size(246, 73)
Me.Controls.Add(Me.tableLayoutPanel1)
Me.DoubleBuffered = True
Me.Name = "Form1"
Me.StartPosition = FormStartPosition.Manual
Me.Text = "Form1"
Me.tableLayoutPanel1.ResumeLayout(false)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private WithEvents progressPanel1 As DevExpress.XtraWaitForm.ProgressPanel
Private WithEvents tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
End Class

View File

@@ -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:import>
<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:element>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"></xsd:attribute>
<xsd:attribute name="name" type="xsd:string"></xsd:attribute>
</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>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</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:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
</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>
</root>

View File

@@ -0,0 +1,24 @@
Public Class frmWaitForm
Sub New
InitializeComponent()
Me.progressPanel1.AutoHeight = True
End Sub
Public Overrides Sub SetCaption(ByVal caption As String)
MyBase.SetCaption(caption)
Me.progressPanel1.Caption = caption
End Sub
Public Overrides Sub SetDescription(ByVal description As String)
MyBase.SetDescription(description)
Me.progressPanel1.Description = description
End Sub
Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object)
MyBase.ProcessCommand(cmd, arg)
End Sub
Public Enum WaitFormCommand
SomeCommandId
End Enum
End Class