diff --git a/GUIs.ZooFlow/ClassConstants.vb b/GUIs.ZooFlow/ClassConstants.vb index 3a3a9759..d3546262 100644 --- a/GUIs.ZooFlow/ClassConstants.vb +++ b/GUIs.ZooFlow/ClassConstants.vb @@ -18,6 +18,7 @@ Public Const MODULE_GLOBAL_INDEXER = "GLOBIX" Public Const MODULE_ZOOFLOW = "ZOOFLOW" Public Const MODULE_PROCESS_MANAGER = "PM" + Public Const MODULE_USER = "USER" Public Const ATTR_TYPE_STRING = "VARCHAR" Public Const ATTR_TYPE_INTEGER = "BIG INTEGER" diff --git a/GUIs.ZooFlow/ClassInit.vb b/GUIs.ZooFlow/ClassInit.vb index b458d04f..c8bbb8c0 100644 --- a/GUIs.ZooFlow/ClassInit.vb +++ b/GUIs.ZooFlow/ClassInit.vb @@ -37,9 +37,8 @@ Public Class ClassInit ' === Init Schritte definieren _Loader.AddStep("Initializing Base", AddressOf InitializeBase, True) - '_Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True) _Loader.AddStep("Initializing EDMI Service", AddressOf InitializeService, True) - _Loader.AddStep("Initializing Database (2/2)", AddressOf InitializeDatabaseWithFallback, True) + _Loader.AddStep("Initializing Database", AddressOf InitializeDatabaseWithFallback, True) _Loader.AddStep("Initializing User", AddressOf InitializeUser, True) _Loader.AddStep("Initializing Language", AddressOf InitializeLanguage, False) _Loader.AddStep("Initializing 3rd-party licenses", AddressOf Initialize3rdParty, False) @@ -137,12 +136,18 @@ Public Class ClassInit End Sub Private Sub InitializeDatabaseWithFallback(MyApplication As My.MyApplication) Try - Dim oECMConnectionString = MyApplication.Service.Client.ClientConfig.ConnectionStringECM + Logger.Debug("Loading client config..") + Dim oClientConfig = MyApplication.Service.Client.ClientConfig + + Logger.Debug("Establishing ECM connection..") + Dim oECMConnectionString = oClientConfig.ConnectionStringECM My.DatabaseECM = New MSSQLServer(My.LogConfig, oECMConnectionString) - Dim oIDBConnectionString = MyApplication.Service.Client.ClientConfig.ConnectionStringIDB + Logger.Debug("Establishing IDB connection..") + Dim oIDBConnectionString = oClientConfig.ConnectionStringIDB My.DatabaseIDB = New MSSQLServer(My.LogConfig, oIDBConnectionString) + Logger.Debug("Establishing Database connection with fallback..") My.Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB) Catch ex As Exception Logger.Error(ex) @@ -163,18 +168,21 @@ Public Class ClassInit End If For Each oRow As DataRow In oDatatable.Rows - Dim oType As String = oRow("TYPE").ToString + Dim oType As String = oRow.ItemEx("TYPE", "") Select Case oType - Case "USER" + Case MODULE_USER HandleUserInfo(MyApplication, oRow) Case MODULE_CLIPBOARDWATCHER HandleModuleInfo(MyApplication, oType, oRow) + Case MODULE_GLOBAL_INDEXER HandleModuleInfo(MyApplication, oType, oRow) + Case MODULE_ZOOFLOW HandleModuleInfo(MyApplication, oType, oRow) + End Select Next @@ -311,7 +319,19 @@ Public Class ClassInit Private Sub InitCompleted(sender As Object, e As RunWorkerCompletedEventArgs) If Not IsNothing(e.Error) Then - MsgBox("Beim Initialisieren des Programms ist folgender Fehler aufgetreten:" & vbNewLine & vbNewLine & e.Error.Message, MsgBoxStyle.Critical, _MainForm.Text) + Dim oMessageStart = $"Beim Initialisieren des Programms ist folgender Fehler aufgetreten:" + Dim oMessageEnd = "Das Program wird nun beendet" + Dim oMessage1 = $"{vbNewLine}{vbNewLine}{e.Error.Message}" + Dim oMessage2 = "" + + If TypeOf e.Error Is InitException Then + Dim oException As InitException = DirectCast(e.Error, InitException) + oMessage2 = $"{vbNewLine}{vbNewLine}Details: {oException.InnerException.Message}" + End If + + Dim oMessage = $"{oMessageStart}{oMessage1}{oMessage2}{oMessageEnd}" + + MsgBox(oMessage, MsgBoxStyle.Critical, _MainForm.Text) Application.ExitThread() Else ' Copy back state from MyApplication Helper to My.Application diff --git a/GUIs.ZooFlow/ClassInitLoader.vb b/GUIs.ZooFlow/ClassInitLoader.vb index e6370768..99386c66 100644 --- a/GUIs.ZooFlow/ClassInitLoader.vb +++ b/GUIs.ZooFlow/ClassInitLoader.vb @@ -74,7 +74,7 @@ Public Class ClassInitLoader oStepCounter += 1 - Dim oPercentComplete As Integer = CInt(Math.Truncate(oStepCounter / Steps.Count * 100)) + Dim oPercentComplete As Integer = Math.Truncate(oStepCounter / Steps.Count * 100) _Worker.ReportProgress(oPercentComplete) Threading.Thread.Sleep(100) diff --git a/GUIs.ZooFlow/Config/ClassConfig.vb b/GUIs.ZooFlow/Config/ClassConfig.vb index 46360a93..0b618431 100644 --- a/GUIs.ZooFlow/Config/ClassConfig.vb +++ b/GUIs.ZooFlow/Config/ClassConfig.vb @@ -43,9 +43,6 @@ Public Class ClassConfig Public Property AppServerConfig As String = String.Empty - - Public Property ConnectionStringAppServer As String = "" - ' === Logging Configuration Public Property LogDebug As Boolean = False diff --git a/GUIs.ZooFlow/Search/SearchRunner.vb b/GUIs.ZooFlow/Search/SearchRunner.vb index a99914c8..4a239cb6 100644 --- a/GUIs.ZooFlow/Search/SearchRunner.vb +++ b/GUIs.ZooFlow/Search/SearchRunner.vb @@ -63,7 +63,8 @@ Public Class SearchRunner .ProfileGuid = 354522, .ColumnNames = New DocumentResultList.ColumnNames With { .ObjectIdColumn = "DocID" - } + }, + .ShowBackNavigation = False } Dim oP3 = $"{_ActiveDateAttribute}~{_ActiveDateConstraint}" diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb b/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb index 71de65ca..5e2b4e20 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb +++ b/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb @@ -22,57 +22,35 @@ Partial Class frmFlowSearch2 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Dim EditorButtonImageOptions1 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() + Dim SerializableAppearanceObject1 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject2 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject3 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject4 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() 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.TextEdit1 = New DevExpress.XtraEditors.TextEdit() Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() Me.PanelControl2 = New DevExpress.XtraEditors.PanelControl() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() + Me.RadioGroup1 = New DevExpress.XtraEditors.RadioGroup() Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() - Me.DateEditFrom = New DevExpress.XtraEditors.DateEdit() - Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() - Me.DateEditTo = New DevExpress.XtraEditors.DateEdit() Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl1 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl2 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl3 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl4 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl5 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl6 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem() - Me.HyperlinkLabelControl7 = New DevExpress.XtraEditors.HyperlinkLabelControl() - Me.LayoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem() + Me.TextEdit1 = New DevExpress.XtraEditors.ButtonEdit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.TextEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.PanelControl1.SuspendLayout() CType(Me.PanelControl2, System.ComponentModel.ISupportInitialize).BeginInit() Me.PanelControl2.SuspendLayout() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.LayoutControl1.SuspendLayout() + CType(Me.RadioGroup1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DateEditFrom.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DateEditFrom.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DateEditTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DateEditTo.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem1, 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.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TextEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'RibbonControl1 @@ -114,17 +92,6 @@ Partial Class frmFlowSearch2 Me.RibbonPage2.Name = "RibbonPage2" Me.RibbonPage2.Text = "RibbonPage2" ' - 'TextEdit1 - ' - Me.TextEdit1.Dock = System.Windows.Forms.DockStyle.Top - Me.TextEdit1.Location = New System.Drawing.Point(32, 32) - Me.TextEdit1.MenuManager = Me.RibbonControl1 - Me.TextEdit1.Name = "TextEdit1" - Me.TextEdit1.Properties.NullText = "Suchbegriff eingeben.." - Me.TextEdit1.Properties.Padding = New System.Windows.Forms.Padding(10) - Me.TextEdit1.Size = New System.Drawing.Size(947, 40) - Me.TextEdit1.TabIndex = 2 - ' 'PanelControl1 ' Me.PanelControl1.Controls.Add(Me.PanelControl2) @@ -147,15 +114,7 @@ Partial Class frmFlowSearch2 ' 'LayoutControl1 ' - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl7) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl6) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl5) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl4) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl3) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl2) - Me.LayoutControl1.Controls.Add(Me.HyperlinkLabelControl1) - Me.LayoutControl1.Controls.Add(Me.DateEditFrom) - Me.LayoutControl1.Controls.Add(Me.DateEditTo) + Me.LayoutControl1.Controls.Add(Me.RadioGroup1) Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Top Me.LayoutControl1.Location = New System.Drawing.Point(2, 2) Me.LayoutControl1.Name = "LayoutControl1" @@ -164,183 +123,48 @@ Partial Class frmFlowSearch2 Me.LayoutControl1.TabIndex = 0 Me.LayoutControl1.Text = "LayoutControl1" ' + 'RadioGroup1 + ' + Me.RadioGroup1.Location = New System.Drawing.Point(12, 12) + Me.RadioGroup1.MenuManager = Me.RibbonControl1 + Me.RadioGroup1.Name = "RadioGroup1" + Me.RadioGroup1.Properties.Items.AddRange(New DevExpress.XtraEditors.Controls.RadioGroupItem() {New DevExpress.XtraEditors.Controls.RadioGroupItem("TODAY", "Heute", True, "TODAY"), New DevExpress.XtraEditors.Controls.RadioGroupItem("YEAR_CURRENT", "Dieses Jahr", True, "YEAR_CURRENT")}) + Me.RadioGroup1.Properties.ItemsLayout = DevExpress.XtraEditors.RadioGroupItemsLayout.Flow + Me.RadioGroup1.Size = New System.Drawing.Size(919, 96) + Me.RadioGroup1.StyleController = Me.LayoutControl1 + Me.RadioGroup1.TabIndex = 4 + ' 'Root ' Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] Me.Root.GroupBordersVisible = False - Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem2, Me.LayoutControlItem1, Me.LayoutControlItem7, Me.LayoutControlItem6, Me.LayoutControlItem5, Me.LayoutControlItem4, Me.LayoutControlItem3, Me.LayoutControlItem8, Me.LayoutControlItem9}) + Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1}) Me.Root.Name = "Root" Me.Root.Size = New System.Drawing.Size(943, 120) Me.Root.TextVisible = False ' - 'DateEditFrom - ' - Me.DateEditFrom.EditValue = Nothing - Me.DateEditFrom.Location = New System.Drawing.Point(76, 12) - Me.DateEditFrom.MenuManager = Me.RibbonControl1 - Me.DateEditFrom.Name = "DateEditFrom" - Me.DateEditFrom.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.DateEditFrom.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.DateEditFrom.Size = New System.Drawing.Size(162, 20) - Me.DateEditFrom.StyleController = Me.LayoutControl1 - Me.DateEditFrom.TabIndex = 5 - ' - 'LayoutControlItem2 - ' - Me.LayoutControlItem2.Control = Me.DateEditFrom - Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 0) - Me.LayoutControlItem2.Name = "LayoutControlItem2" - Me.LayoutControlItem2.Size = New System.Drawing.Size(230, 24) - Me.LayoutControlItem2.Text = "Datum von" - Me.LayoutControlItem2.TextSize = New System.Drawing.Size(52, 13) - ' - 'DateEditTo - ' - Me.DateEditTo.EditValue = Nothing - Me.DateEditTo.Location = New System.Drawing.Point(306, 12) - Me.DateEditTo.MenuManager = Me.RibbonControl1 - Me.DateEditTo.Name = "DateEditTo" - Me.DateEditTo.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.DateEditTo.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.DateEditTo.Size = New System.Drawing.Size(625, 20) - Me.DateEditTo.StyleController = Me.LayoutControl1 - Me.DateEditTo.TabIndex = 6 - ' 'LayoutControlItem1 ' - Me.LayoutControlItem1.Control = Me.DateEditTo - Me.LayoutControlItem1.Location = New System.Drawing.Point(230, 0) + Me.LayoutControlItem1.Control = Me.RadioGroup1 + Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 0) Me.LayoutControlItem1.Name = "LayoutControlItem1" - Me.LayoutControlItem1.Size = New System.Drawing.Size(693, 24) - Me.LayoutControlItem1.Text = "Datum bis" - Me.LayoutControlItem1.TextSize = New System.Drawing.Size(52, 13) + Me.LayoutControlItem1.Size = New System.Drawing.Size(923, 100) + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem1.TextVisible = False ' - 'HyperlinkLabelControl1 + 'TextEdit1 ' - Me.HyperlinkLabelControl1.Location = New System.Drawing.Point(224, 36) - Me.HyperlinkLabelControl1.Name = "HyperlinkLabelControl1" - Me.HyperlinkLabelControl1.Size = New System.Drawing.Size(67, 13) - Me.HyperlinkLabelControl1.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl1.TabIndex = 7 - Me.HyperlinkLabelControl1.Text = "Letzter Monat" - ' - 'LayoutControlItem3 - ' - Me.LayoutControlItem3.Control = Me.HyperlinkLabelControl1 - Me.LayoutControlItem3.Location = New System.Drawing.Point(212, 24) - Me.LayoutControlItem3.Name = "LayoutControlItem3" - Me.LayoutControlItem3.Size = New System.Drawing.Size(71, 76) - Me.LayoutControlItem3.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem3.TextVisible = False - ' - 'HyperlinkLabelControl2 - ' - Me.HyperlinkLabelControl2.Location = New System.Drawing.Point(157, 36) - Me.HyperlinkLabelControl2.Name = "HyperlinkLabelControl2" - Me.HyperlinkLabelControl2.Size = New System.Drawing.Size(63, 13) - Me.HyperlinkLabelControl2.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl2.TabIndex = 8 - Me.HyperlinkLabelControl2.Text = "Dieser Monat" - ' - 'LayoutControlItem4 - ' - Me.LayoutControlItem4.Control = Me.HyperlinkLabelControl2 - Me.LayoutControlItem4.Location = New System.Drawing.Point(145, 24) - Me.LayoutControlItem4.Name = "LayoutControlItem4" - Me.LayoutControlItem4.Size = New System.Drawing.Size(67, 76) - Me.LayoutControlItem4.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem4.TextVisible = False - ' - 'HyperlinkLabelControl3 - ' - Me.HyperlinkLabelControl3.Location = New System.Drawing.Point(87, 36) - Me.HyperlinkLabelControl3.Name = "HyperlinkLabelControl3" - Me.HyperlinkLabelControl3.Size = New System.Drawing.Size(66, 13) - Me.HyperlinkLabelControl3.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl3.TabIndex = 9 - Me.HyperlinkLabelControl3.Text = "Letzte 7 Tage" - ' - 'LayoutControlItem5 - ' - Me.LayoutControlItem5.Control = Me.HyperlinkLabelControl3 - Me.LayoutControlItem5.Location = New System.Drawing.Point(75, 24) - Me.LayoutControlItem5.Name = "LayoutControlItem5" - Me.LayoutControlItem5.Size = New System.Drawing.Size(70, 76) - Me.LayoutControlItem5.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem5.TextVisible = False - ' - 'HyperlinkLabelControl4 - ' - Me.HyperlinkLabelControl4.Location = New System.Drawing.Point(45, 36) - Me.HyperlinkLabelControl4.Name = "HyperlinkLabelControl4" - Me.HyperlinkLabelControl4.Size = New System.Drawing.Size(38, 13) - Me.HyperlinkLabelControl4.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl4.TabIndex = 10 - Me.HyperlinkLabelControl4.Text = "Gestern" - ' - 'LayoutControlItem6 - ' - Me.LayoutControlItem6.Control = Me.HyperlinkLabelControl4 - Me.LayoutControlItem6.Location = New System.Drawing.Point(33, 24) - Me.LayoutControlItem6.Name = "LayoutControlItem6" - Me.LayoutControlItem6.Size = New System.Drawing.Size(42, 76) - Me.LayoutControlItem6.Text = "LayoutControlItem6" - Me.LayoutControlItem6.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem6.TextVisible = False - ' - 'HyperlinkLabelControl5 - ' - Me.HyperlinkLabelControl5.Location = New System.Drawing.Point(12, 36) - Me.HyperlinkLabelControl5.Name = "HyperlinkLabelControl5" - Me.HyperlinkLabelControl5.Size = New System.Drawing.Size(29, 13) - Me.HyperlinkLabelControl5.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl5.TabIndex = 11 - Me.HyperlinkLabelControl5.Text = "Heute" - ' - 'LayoutControlItem7 - ' - Me.LayoutControlItem7.Control = Me.HyperlinkLabelControl5 - Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 24) - Me.LayoutControlItem7.Name = "LayoutControlItem7" - Me.LayoutControlItem7.Size = New System.Drawing.Size(33, 76) - Me.LayoutControlItem7.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem7.TextVisible = False - ' - 'HyperlinkLabelControl6 - ' - Me.HyperlinkLabelControl6.Location = New System.Drawing.Point(295, 36) - Me.HyperlinkLabelControl6.Name = "HyperlinkLabelControl6" - Me.HyperlinkLabelControl6.Size = New System.Drawing.Size(55, 13) - Me.HyperlinkLabelControl6.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl6.TabIndex = 12 - Me.HyperlinkLabelControl6.Text = "Dieses Jahr" - ' - 'LayoutControlItem8 - ' - Me.LayoutControlItem8.Control = Me.HyperlinkLabelControl6 - Me.LayoutControlItem8.Location = New System.Drawing.Point(283, 24) - Me.LayoutControlItem8.Name = "LayoutControlItem8" - Me.LayoutControlItem8.Size = New System.Drawing.Size(59, 76) - Me.LayoutControlItem8.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem8.TextVisible = False - ' - 'HyperlinkLabelControl7 - ' - Me.HyperlinkLabelControl7.Location = New System.Drawing.Point(354, 36) - Me.HyperlinkLabelControl7.Name = "HyperlinkLabelControl7" - Me.HyperlinkLabelControl7.Size = New System.Drawing.Size(59, 13) - Me.HyperlinkLabelControl7.StyleController = Me.LayoutControl1 - Me.HyperlinkLabelControl7.TabIndex = 13 - Me.HyperlinkLabelControl7.Text = "Letztes Jahr" - ' - 'LayoutControlItem9 - ' - Me.LayoutControlItem9.Control = Me.HyperlinkLabelControl7 - Me.LayoutControlItem9.Location = New System.Drawing.Point(342, 24) - Me.LayoutControlItem9.Name = "LayoutControlItem9" - Me.LayoutControlItem9.Size = New System.Drawing.Size(581, 76) - Me.LayoutControlItem9.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem9.TextVisible = False + Me.TextEdit1.Dock = System.Windows.Forms.DockStyle.Top + Me.TextEdit1.Location = New System.Drawing.Point(32, 32) + Me.TextEdit1.MenuManager = Me.RibbonControl1 + Me.TextEdit1.Name = "TextEdit1" + EditorButtonImageOptions1.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZooFlow_CW_DevExpress + EditorButtonImageOptions1.SvgImageSize = New System.Drawing.Size(20, 20) + Me.TextEdit1.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", "SEARCH", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) + Me.TextEdit1.Properties.NullText = "Suchbegriff eingeben.." + Me.TextEdit1.Properties.Padding = New System.Windows.Forms.Padding(5, 10, 10, 10) + Me.TextEdit1.Size = New System.Drawing.Size(947, 40) + Me.TextEdit1.TabIndex = 2 ' 'frmFlowSearch2 ' @@ -355,28 +179,16 @@ Partial Class frmFlowSearch2 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "frmFlowSearch2" CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.TextEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.PanelControl1.ResumeLayout(False) CType(Me.PanelControl2, System.ComponentModel.ISupportInitialize).EndInit() Me.PanelControl2.ResumeLayout(False) CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.LayoutControl1.ResumeLayout(False) - Me.LayoutControl1.PerformLayout() + CType(Me.RadioGroup1.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DateEditFrom.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DateEditFrom.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DateEditTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DateEditTo.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem1, 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.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TextEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -388,27 +200,11 @@ Partial Class frmFlowSearch2 Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents TextEdit1 As DevExpress.XtraEditors.TextEdit Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl Friend WithEvents PanelControl2 As DevExpress.XtraEditors.PanelControl Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup - Friend WithEvents DateEditFrom As DevExpress.XtraEditors.DateEdit - Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents HyperlinkLabelControl5 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents HyperlinkLabelControl4 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents HyperlinkLabelControl3 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents HyperlinkLabelControl2 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents HyperlinkLabelControl1 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents DateEditTo As DevExpress.XtraEditors.DateEdit + Friend WithEvents RadioGroup1 As DevExpress.XtraEditors.RadioGroup Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem6 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents HyperlinkLabelControl7 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents HyperlinkLabelControl6 As DevExpress.XtraEditors.HyperlinkLabelControl - Friend WithEvents LayoutControlItem8 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem9 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents TextEdit1 As DevExpress.XtraEditors.ButtonEdit End Class diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2.vb b/GUIs.ZooFlow/Search/frmFlowSearch2.vb index 85f9e85a..87614f8a 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch2.vb +++ b/GUIs.ZooFlow/Search/frmFlowSearch2.vb @@ -1,11 +1,43 @@ -Public Class frmFlowSearch2 - Private Sub HyperlinkLabelControl5_Click(sender As Object, e As EventArgs) Handles HyperlinkLabelControl5.Click - DateEditFrom.EditValue = Date.Today - DateEditTo.EditValue = Date.Today +Imports DigitalData.GUIs.ZooFlow.ClassConstants + +Public Class frmFlowSearch2 + Private SearchRunner As SearchRunner + Private BaseSearchSQL As String + + Private Sub frmFlowSearch2_Load(sender As Object, e As EventArgs) Handles MyBase.Load + For Each oRow As DataRow In My.Tables.DTIDB_COMMON_SQL.Rows + If oRow.Item("TITLE") = SQLCMD_FLOW_SEARCH_BASE Then + BaseSearchSQL = oRow.Item("SQL_COMMAND") + BaseSearchSQL = BaseSearchSQL.Replace("@USER_ID", My.Application.User.UserId) + BaseSearchSQL = BaseSearchSQL.Replace("@LANG_CODE", My.Application.User.Language) + End If + Next + + SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment) + SearchRunner.BaseSearchSQL = BaseSearchSQL + + Dim osql = $"EXEC PRIDB_SEARCH_AUTOSUGGEST '{My.Application.User.Language}',{My.Application.User.UserId}" + Dim oDTSuggest As DataTable + oDTSuggest = My.Database.GetDatatableIDB(osql) + Dim collection As AutoCompleteStringCollection = New AutoCompleteStringCollection + For Each orow As DataRow In oDTSuggest.Rows + collection.Add(orow.Item("TERM")) + Next + + TextEdit1.MaskBox.AutoCompleteSource = AutoCompleteSource.CustomSource + TextEdit1.MaskBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend + TextEdit1.MaskBox.AutoCompleteCustomSource = collection End Sub - Private Sub HyperlinkLabelControl4_Click(sender As Object, e As EventArgs) Handles HyperlinkLabelControl4.Click - DateEditFrom.EditValue = Date.Today.AddDays(-1) - DateEditTo.EditValue = Date.Today.AddDays(-1) + Private Async Sub TextEdit1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextEdit1.KeyUp + If e.KeyCode = Keys.Enter Then + Await SearchRunner.Run(TextEdit1.EditValue, Nothing, Nothing) + End If + End Sub + + Private Async Sub TextEdit1_ButtonClick(sender As Object, e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs) Handles TextEdit1.ButtonClick + If e.Button.Tag = "SEARCH" Then + Await SearchRunner.Run(TextEdit1.EditValue, Nothing, Nothing) + End If End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 3a221e09..f0352bd9 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -114,6 +114,8 @@ False P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll + + @@ -127,6 +129,7 @@ + @@ -135,6 +138,8 @@ + + diff --git a/GUIs.ZooFlow/frmFlowForm.Designer.vb b/GUIs.ZooFlow/frmFlowForm.Designer.vb index 8f114ec2..1a5224f2 100644 --- a/GUIs.ZooFlow/frmFlowForm.Designer.vb +++ b/GUIs.ZooFlow/frmFlowForm.Designer.vb @@ -34,10 +34,10 @@ Partial Class frmFlowForm Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.VerwaltungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() + Me.SucheEntwurfToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.TestToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.ZooFlowBeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.SucheEntwurfToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.TimerRefreshData = New System.Windows.Forms.Timer(Me.components) Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.PictureBoxPM = New DevExpress.XtraEditors.SvgImageBox() @@ -98,56 +98,56 @@ Partial Class frmFlowForm ' Me.ContextMenuSystray.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EinblendenToolStripMenuItem, Me.ToolStripSeparator1, Me.VerwaltungToolStripMenuItem, Me.ToolStripSeparator3, Me.SucheEntwurfToolStripMenuItem, Me.TestToolStripMenuItem, Me.ToolStripSeparator2, Me.ZooFlowBeendenToolStripMenuItem}) Me.ContextMenuSystray.Name = "ContextMenuSystray" - Me.ContextMenuSystray.Size = New System.Drawing.Size(181, 154) + Me.ContextMenuSystray.Size = New System.Drawing.Size(170, 132) ' 'EinblendenToolStripMenuItem ' Me.EinblendenToolStripMenuItem.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.action_add_16xMD Me.EinblendenToolStripMenuItem.Name = "EinblendenToolStripMenuItem" - Me.EinblendenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.EinblendenToolStripMenuItem.Size = New System.Drawing.Size(169, 22) Me.EinblendenToolStripMenuItem.Text = "Einblenden" Me.EinblendenToolStripMenuItem.Visible = False ' 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(166, 6) ' 'VerwaltungToolStripMenuItem ' Me.VerwaltungToolStripMenuItem.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.gear_32xLG Me.VerwaltungToolStripMenuItem.Name = "VerwaltungToolStripMenuItem" - Me.VerwaltungToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.VerwaltungToolStripMenuItem.Size = New System.Drawing.Size(169, 22) Me.VerwaltungToolStripMenuItem.Text = "Verwaltung" ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator3.Size = New System.Drawing.Size(166, 6) + ' + 'SucheEntwurfToolStripMenuItem + ' + Me.SucheEntwurfToolStripMenuItem.Name = "SucheEntwurfToolStripMenuItem" + Me.SucheEntwurfToolStripMenuItem.Size = New System.Drawing.Size(169, 22) + Me.SucheEntwurfToolStripMenuItem.Text = "Suche Entwurf" ' 'TestToolStripMenuItem ' Me.TestToolStripMenuItem.Name = "TestToolStripMenuItem" - Me.TestToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.TestToolStripMenuItem.Size = New System.Drawing.Size(169, 22) Me.TestToolStripMenuItem.Text = "Test" ' 'ToolStripSeparator2 ' Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator2.Size = New System.Drawing.Size(166, 6) ' 'ZooFlowBeendenToolStripMenuItem ' Me.ZooFlowBeendenToolStripMenuItem.Name = "ZooFlowBeendenToolStripMenuItem" - Me.ZooFlowBeendenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ZooFlowBeendenToolStripMenuItem.Size = New System.Drawing.Size(169, 22) Me.ZooFlowBeendenToolStripMenuItem.Text = "ZooFlow beenden" ' - 'SucheEntwurfToolStripMenuItem - ' - Me.SucheEntwurfToolStripMenuItem.Name = "SucheEntwurfToolStripMenuItem" - Me.SucheEntwurfToolStripMenuItem.Size = New System.Drawing.Size(180, 22) - Me.SucheEntwurfToolStripMenuItem.Text = "Suche Entwurf" - ' 'PictureBoxPM ' Me.PictureBoxPM.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index 7d3fb227..2dfe0801 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -259,6 +259,7 @@ Public Class frmFlowForm PictureBoxSearch.Visible = True End If Next + 'If Not IsNothing(oDatatable) Then ' If oDatatable.Rows.Count > 0 Then ' IDBSearchActive = True @@ -595,20 +596,6 @@ Public Class frmFlowForm Return True End Function - - Private Sub DatenbankverbindungToolStripMenuItem1_Click(sender As Object, e As EventArgs) - Dim oForm As New frmSQLConfig(My.LogConfig) With { - .ConnectionString = My.SystemConfig.ConnectionString, - .FormTitle = "ECM Datenbank" - } - Dim oResult = oForm.ShowDialog() - - If oResult = DialogResult.OK Then - My.SystemConfig.ConnectionString = oForm.ConnectionString - My.SystemConfigManager.Save() - End If - End Sub - Private Sub NotifyIcon_DoubleClick(sender As Object, e As EventArgs) Handles NotifyIcon.DoubleClick If Visible = False Then Visible = True @@ -1153,7 +1140,8 @@ Public Class frmFlowForm .WindowGuid = "QuickFlowSearch1", .WindowTitle = GetResultWindowString(pSearchText), .OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow, - .ProfileGuid = 354521 + .ProfileGuid = 354521, + .ShowBackNavigation = False } If Await My.Database.ExecuteNonQueryIDBAsync(oSQL) = True Then @@ -1229,19 +1217,6 @@ Public Class frmFlowForm frmServiceConfig.ShowDialog() End Sub - Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) - Dim oForm As New frmSQLConfig(My.LogConfig) With { - .ConnectionString = My.SystemConfig.ConnectionString, - .FormTitle = "ECM Datenbank" - } - Dim oResult = oForm.ShowDialog() - - If oResult = DialogResult.OK Then - My.SystemConfig.ConnectionString = oForm.ConnectionString - My.SystemConfigManager.Save() - End If - End Sub - Private Async Sub BarButtonItem8_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnBasicConfig.ItemClick frmConfigBasic.ShowDialog() Await ConfigureQuicksearch1(True) @@ -1251,8 +1226,6 @@ Public Class frmFlowForm frmGlobixBasicConfig.ShowDialog() End Sub - - Private Sub PictureBoxSearch_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxSearch.MouseEnter PictureBoxSearch.SvgImage = My.Resources.FLOW_Sidebar_Search_aktiv End Sub diff --git a/GUIs.ZooFlow/frmServiceConfig.Designer.vb b/GUIs.ZooFlow/frmServiceConfig.Designer.vb index 5c1fc7e3..3574bdb4 100644 --- a/GUIs.ZooFlow/frmServiceConfig.Designer.vb +++ b/GUIs.ZooFlow/frmServiceConfig.Designer.vb @@ -23,50 +23,53 @@ Partial Class frmServiceConfig _ Private Sub InitializeComponent() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() - Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() + Me.txtServiceAddress = New DevExpress.XtraEditors.TextEdit() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.btnOK = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.txtServiceAddress = New DevExpress.XtraEditors.TextEdit() - Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() Me.txtServicePort = New DevExpress.XtraEditors.SpinEdit() + Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() + Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() - Me.lblStatus = New DevExpress.XtraLayout.SimpleLabelItem() Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.txtStatus = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.LayoutControl1.SuspendLayout() - CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtServiceAddress.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtServicePort.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.lblStatus, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtStatus.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'LayoutControl1 ' Me.LayoutControl1.Controls.Add(Me.txtServiceAddress) Me.LayoutControl1.Controls.Add(Me.txtServicePort) + Me.LayoutControl1.Controls.Add(Me.txtStatus) Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.LayoutControl1.Location = New System.Drawing.Point(0, 66) + Me.LayoutControl1.Location = New System.Drawing.Point(0, 63) Me.LayoutControl1.Name = "LayoutControl1" Me.LayoutControl1.Root = Me.Root - Me.LayoutControl1.Size = New System.Drawing.Size(630, 204) + Me.LayoutControl1.Size = New System.Drawing.Size(630, 207) Me.LayoutControl1.TabIndex = 0 Me.LayoutControl1.Text = "LayoutControl1" ' - 'Root + 'txtServiceAddress ' - Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] - Me.Root.GroupBordersVisible = False - Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.EmptySpaceItem1, Me.lblStatus}) - Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(630, 204) - Me.Root.TextVisible = False + Me.txtServiceAddress.Location = New System.Drawing.Point(105, 40) + Me.txtServiceAddress.MenuManager = Me.RibbonControl1 + Me.txtServiceAddress.Name = "txtServiceAddress" + Me.txtServiceAddress.Size = New System.Drawing.Size(485, 20) + Me.txtServiceAddress.StyleController = Me.LayoutControl1 + Me.txtServiceAddress.TabIndex = 4 ' 'RibbonControl1 ' @@ -80,7 +83,7 @@ Partial Class frmServiceConfig 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(630, 66) + Me.RibbonControl1.Size = New System.Drawing.Size(630, 63) Me.RibbonControl1.Toolbar.ShowCustomizeItem = False ' 'btnOK @@ -102,19 +105,25 @@ Partial Class frmServiceConfig Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Text = "RibbonPageGroup1" ' - 'RibbonPage2 + 'txtServicePort ' - Me.RibbonPage2.Name = "RibbonPage2" - Me.RibbonPage2.Text = "RibbonPage2" + Me.txtServicePort.EditValue = New Decimal(New Integer() {9000, 0, 0, 0}) + Me.txtServicePort.Location = New System.Drawing.Point(105, 70) + Me.txtServicePort.MenuManager = Me.RibbonControl1 + Me.txtServicePort.Name = "txtServicePort" + Me.txtServicePort.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.txtServicePort.Size = New System.Drawing.Size(485, 20) + Me.txtServicePort.StyleController = Me.LayoutControl1 + Me.txtServicePort.TabIndex = 5 ' - 'txtServiceAddress + 'Root ' - Me.txtServiceAddress.Location = New System.Drawing.Point(167, 40) - Me.txtServiceAddress.MenuManager = Me.RibbonControl1 - Me.txtServiceAddress.Name = "txtServiceAddress" - Me.txtServiceAddress.Size = New System.Drawing.Size(423, 20) - Me.txtServiceAddress.StyleController = Me.LayoutControl1 - Me.txtServiceAddress.TabIndex = 4 + Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.Root.GroupBordersVisible = False + Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.EmptySpaceItem1, Me.LayoutControlItem3}) + Me.Root.Name = "Root" + Me.Root.Size = New System.Drawing.Size(630, 207) + Me.Root.TextVisible = False ' 'LayoutControlItem1 ' @@ -124,18 +133,7 @@ Partial Class frmServiceConfig Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(30, 30, 30, 5) Me.LayoutControlItem1.Size = New System.Drawing.Size(610, 55) Me.LayoutControlItem1.Text = "IP-Adresse" - Me.LayoutControlItem1.TextSize = New System.Drawing.Size(124, 13) - ' - 'txtServicePort - ' - Me.txtServicePort.EditValue = New Decimal(New Integer() {9000, 0, 0, 0}) - Me.txtServicePort.Location = New System.Drawing.Point(167, 70) - Me.txtServicePort.MenuManager = Me.RibbonControl1 - Me.txtServicePort.Name = "txtServicePort" - Me.txtServicePort.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.txtServicePort.Size = New System.Drawing.Size(423, 20) - Me.txtServicePort.StyleController = Me.LayoutControl1 - Me.txtServicePort.TabIndex = 5 + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(53, 13) ' 'LayoutControlItem2 ' @@ -145,26 +143,41 @@ Partial Class frmServiceConfig Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(30, 30, 5, 5) Me.LayoutControlItem2.Size = New System.Drawing.Size(610, 30) Me.LayoutControlItem2.Text = "Port" - Me.LayoutControlItem2.TextSize = New System.Drawing.Size(124, 13) - ' - 'lblStatus - ' - Me.lblStatus.AllowHotTrack = False - Me.lblStatus.Location = New System.Drawing.Point(0, 85) - Me.lblStatus.Name = "lblStatus" - Me.lblStatus.Padding = New DevExpress.XtraLayout.Utils.Padding(30, 30, 5, 30) - Me.lblStatus.Size = New System.Drawing.Size(610, 48) - Me.lblStatus.Text = "Status: Nicht verbunden" - Me.lblStatus.TextSize = New System.Drawing.Size(124, 13) + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(53, 13) ' 'EmptySpaceItem1 ' Me.EmptySpaceItem1.AllowHotTrack = False - Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 133) + Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 115) Me.EmptySpaceItem1.Name = "EmptySpaceItem1" - Me.EmptySpaceItem1.Size = New System.Drawing.Size(610, 51) + Me.EmptySpaceItem1.Size = New System.Drawing.Size(610, 72) Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) ' + 'RibbonPage2 + ' + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "RibbonPage2" + ' + 'txtStatus + ' + Me.txtStatus.Location = New System.Drawing.Point(105, 100) + Me.txtStatus.MenuManager = Me.RibbonControl1 + Me.txtStatus.Name = "txtStatus" + Me.txtStatus.Properties.ReadOnly = True + Me.txtStatus.Size = New System.Drawing.Size(485, 20) + Me.txtStatus.StyleController = Me.LayoutControl1 + Me.txtStatus.TabIndex = 6 + ' + 'LayoutControlItem3 + ' + Me.LayoutControlItem3.Control = Me.txtStatus + Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 85) + Me.LayoutControlItem3.Name = "LayoutControlItem3" + Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(30, 30, 5, 5) + Me.LayoutControlItem3.Size = New System.Drawing.Size(610, 30) + Me.LayoutControlItem3.Text = "Status" + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(53, 13) + ' 'frmServiceConfig ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -177,14 +190,15 @@ Partial Class frmServiceConfig Me.Text = "IDB Dienst-Konfiguration" CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.LayoutControl1.ResumeLayout(False) - CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtServiceAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtServicePort.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.lblStatus, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtStatus.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -202,5 +216,6 @@ Partial Class frmServiceConfig Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem - Friend WithEvents lblStatus As DevExpress.XtraLayout.SimpleLabelItem + Friend WithEvents txtStatus As DevExpress.XtraEditors.TextEdit + Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem End Class diff --git a/GUIs.ZooFlow/frmServiceConfig.vb b/GUIs.ZooFlow/frmServiceConfig.vb index dc85e30e..6125aaa8 100644 --- a/GUIs.ZooFlow/frmServiceConfig.vb +++ b/GUIs.ZooFlow/frmServiceConfig.vb @@ -5,6 +5,12 @@ Public Class frmServiceConfig Private Client As Client Private Logger As Logger + Private Const STATUS_CONNECTED = "Connection Established" + Private Const STATUS_CONNECTING = "Trying to create connection..." + Private Const STATUS_FAILED = "Connection Failed!" + + Private ConnectionChanged As Boolean = False + Private Sub frmServiceConfig_Load(sender As Object, e As EventArgs) Handles Me.Load Logger = My.LogConfig.GetLogger() @@ -14,6 +20,10 @@ Public Class frmServiceConfig txtServicePort.Text = oAddress.Item2 End If + If My.Application.Service.IsActive Then + txtStatus.Text = STATUS_CONNECTED + End If + txtServiceAddress.Focus() End Sub @@ -25,16 +35,16 @@ Public Class frmServiceConfig Client = New Client(My.LogConfig, oIPAddress, oPort) - lblStatus.Text = "Trying to create connection..." + txtStatus.Text = STATUS_CONNECTING Dim oResult = Client.Connect() If oResult = True Then - My.SystemConfig.AppServerConfig = $"{oIPAddress}:{oPort.ToString}" + My.SystemConfig.AppServerConfig = $"{oIPAddress}:{oPort}" My.SystemConfigManager.Save() - lblStatus.Text = "Successfully Connected to service" + txtStatus.Text = STATUS_CONNECTED Else - lblStatus.Text = "Connection not successful." + txtStatus.Text = STATUS_FAILED ' TODO: Make a connection test that is as elaborate as this one :D 'Select Case oResult ' Case ClassService.ConnectionTestResult.NotFound diff --git a/Service.EDMIService/App.config b/Service.EDMIService/App.config index 511006d2..0860ee11 100644 --- a/Service.EDMIService/App.config +++ b/Service.EDMIService/App.config @@ -20,41 +20,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -