EDMI: First version of Updating files by replacing them!
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Logging.LogConfig
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
|
||||
Namespace My
|
||||
' Für MyApplication sind folgende Ereignisse verfügbar:
|
||||
@@ -18,6 +19,8 @@ Namespace My
|
||||
Private CommonAppDataPath As String = Windows.Forms.Application.CommonAppDataPath
|
||||
Private StartupPath As String = Windows.Forms.Application.StartupPath
|
||||
|
||||
|
||||
|
||||
Public Sub App_Startup() Handles Me.Startup
|
||||
Dim oLogConfig As New LogConfig(LogPath:=PathType.AppData, CompanyName:="Digital Data", ProductName:="ZooFlow", FileKeepRangeInDays:=30) With {.Debug = True}
|
||||
|
||||
@@ -68,6 +71,13 @@ Namespace My
|
||||
|
||||
Public Sub App_Shutdown(sender As Object, e As EventArgs) Handles Me.Shutdown
|
||||
_Logger.Debug("Shutting down Client Suite..")
|
||||
Application.Sidebar.UnregisterSidebar()
|
||||
End Sub
|
||||
|
||||
Private Sub MyApplication_UnhandledException(sender As Object, e As UnhandledExceptionEventArgs) Handles Me.UnhandledException
|
||||
Application.Sidebar.UnregisterSidebar()
|
||||
_Logger.Warn("Unhandled exception occurred: [{0}]", e.Exception.Message)
|
||||
_Logger.Error(e.Exception)
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
@@ -55,6 +55,7 @@ Namespace My
|
||||
Public Property IDB_ConnectionString As String
|
||||
Public Property Globix As New Globix.State
|
||||
Public Property Search As New Search.State
|
||||
Public Property Sidebar As Sidebar
|
||||
|
||||
Public CommandLineFunction As String
|
||||
Public CommandLineArguments As New Dictionary(Of String, String)
|
||||
|
||||
94
GUIs.ZooFlow/Sidebar.vb
Normal file
94
GUIs.ZooFlow/Sidebar.vb
Normal file
@@ -0,0 +1,94 @@
|
||||
Public Class Sidebar
|
||||
#Region "Sidebar Declarations"
|
||||
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As IntPtr, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
|
||||
Public Declare Auto Function MoveWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal X As Int32, ByVal Y As Int32, ByVal nWidth As Int32, ByVal nHeight As Int32, ByVal bRepaint As Boolean) As Boolean
|
||||
Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Integer, ByRef pData As APPBARDATA) As Integer
|
||||
Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cX As Integer, ByVal cY As Integer, ByVal wFlags As Integer) As Integer
|
||||
|
||||
Structure APPBARDATA
|
||||
Dim cbSize As Integer
|
||||
Dim hwnd As Integer
|
||||
Dim uCallbackMessage As [Delegate]
|
||||
Dim uEdge As Integer
|
||||
Dim rc As RECT
|
||||
Dim lParam As Integer ' message specific
|
||||
End Structure
|
||||
|
||||
Structure RECT
|
||||
Dim Left As Integer
|
||||
Dim Top As Integer
|
||||
Dim Right As Integer
|
||||
Dim Bottom As Integer
|
||||
End Structure
|
||||
|
||||
Const ABE_LEFT As Integer = 0
|
||||
Const ABE_TOP As Integer = &H1
|
||||
Const ABE_RIGHT As Integer = 2
|
||||
Const ABE_BOTTOM As Integer = 3
|
||||
|
||||
Const ABM_NEW As Integer = 0
|
||||
Const ABM_REMOVE As Integer = 1
|
||||
Const ABM_QUERYPOS As Integer = 2
|
||||
Const ABM_SETPOS As Integer = &H3
|
||||
Const ABM_GETSTATE As Integer = 4
|
||||
Const ABM_GETTASKBARPOS As Integer = 5
|
||||
Const ABM_ACTIVATE As Integer = 6
|
||||
Const ABM_GETAUTOHIDEBAR As Integer = 7
|
||||
Const ABM_SETAUTOHIDEBAR As Integer = 8
|
||||
Const ABM_WINDOWPOSCHANGED As Integer = 9
|
||||
|
||||
Const ABS_AUTOHIDE As Integer = 1
|
||||
Const ABS_ALWAYSONTOP As Integer = 2
|
||||
|
||||
Const HWND_NOTTOPMOST As Integer = -2
|
||||
Const HWND_TOPMOST As Integer = -1
|
||||
Const HWND_TOP As Integer = 0
|
||||
Const SHOWNORMAL As Integer = 5
|
||||
|
||||
Const SWP_NOSIZE As Integer = &H1
|
||||
Const SWP_NOMOVE As Short = &H2
|
||||
Const SWP_NOZORDER As Integer = 4
|
||||
Const SWP_NOACTIVATE As Integer = &H10
|
||||
Const SWP_DRAWFRAME As Integer = &H20
|
||||
Const SWP_SHOWWINDOW As Integer = &H40
|
||||
#End Region
|
||||
|
||||
Private Sidebar As APPBARDATA
|
||||
Private Handle As IntPtr
|
||||
|
||||
Public Sub New(pHandle As IntPtr)
|
||||
Handle = pHandle
|
||||
End Sub
|
||||
|
||||
Public Sub RegisterSidebar(pScreenName As String)
|
||||
Sidebar.hwnd = Handle.ToInt32
|
||||
Sidebar.cbSize = Len(Sidebar)
|
||||
|
||||
Dim oSelectedScreen = System.Windows.Forms.Screen.PrimaryScreen
|
||||
|
||||
' TODO: Make Sidebar Screen configurable
|
||||
'If pScreenName <> "" Then
|
||||
' Dim oScreens = System.Windows.Forms.Screen.AllScreens
|
||||
' For Each oScreen In oScreens
|
||||
' If oScreen.DeviceName = pScreenName Then
|
||||
' oSelectedScreen = oScreen
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
|
||||
With Sidebar
|
||||
.uEdge = ABE_RIGHT
|
||||
.rc.Top = oSelectedScreen.WorkingArea.Top '0
|
||||
.rc.Right = oSelectedScreen.WorkingArea.Right ' right
|
||||
.rc.Left = oSelectedScreen.WorkingArea.Right - 200 ' width of our appbar
|
||||
.rc.Bottom = oSelectedScreen.WorkingArea.Height ' bottom
|
||||
SHAppBarMessage(ABM_NEW, Sidebar)
|
||||
SetWindowPos(Sidebar.hwnd, HWND_TOP, .rc.Left, .rc.Top, .rc.Right - .rc.Left, .rc.Bottom, SWP_SHOWWINDOW Or SWP_NOACTIVATE)
|
||||
SHAppBarMessage(ABM_SETPOS, Sidebar)
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Public Sub UnregisterSidebar()
|
||||
SHAppBarMessage(ABM_REMOVE, Sidebar)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -98,6 +98,9 @@
|
||||
<Reference Include="DigitalData.Controls.SnapPanel">
|
||||
<HintPath>..\Controls.SnapPanel\obj\Debug\DigitalData.Controls.SnapPanel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Base">
|
||||
<HintPath>..\Modules.Base\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Msg">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\22_11_19\Independentsoft.Msg.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -405,6 +408,7 @@
|
||||
<Compile Include="Search\SearchFilter.vb" />
|
||||
<Compile Include="Search\SearchToken.vb" />
|
||||
<Compile Include="Search\State.vb" />
|
||||
<Compile Include="Sidebar.vb" />
|
||||
<EmbeddedResource Include="Administration\frmAdmin_ClipboardWatcher.resx">
|
||||
<DependentUpon>frmAdmin_ClipboardWatcher.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -13,59 +13,7 @@ Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Windows
|
||||
|
||||
Public Class frmFlowForm
|
||||
#Region "Sidebar Declarations"
|
||||
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As IntPtr, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
|
||||
Public Declare Auto Function MoveWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal X As Int32, ByVal Y As Int32, ByVal nWidth As Int32, ByVal nHeight As Int32, ByVal bRepaint As Boolean) As Boolean
|
||||
Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Integer, ByRef pData As APPBARDATA) As Integer
|
||||
Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cX As Integer, ByVal cY As Integer, ByVal wFlags As Integer) As Integer
|
||||
|
||||
Structure APPBARDATA
|
||||
Dim cbSize As Integer
|
||||
Dim hwnd As Integer
|
||||
Dim uCallbackMessage As [Delegate]
|
||||
Dim uEdge As Integer
|
||||
Dim rc As RECT
|
||||
Dim lParam As Integer ' message specific
|
||||
End Structure
|
||||
|
||||
Structure RECT
|
||||
Dim Left As Integer
|
||||
Dim Top As Integer
|
||||
Dim Right As Integer
|
||||
Dim Bottom As Integer
|
||||
End Structure
|
||||
|
||||
Const ABE_LEFT As Integer = 0
|
||||
Const ABE_TOP As Integer = &H1
|
||||
Const ABE_RIGHT As Integer = 2
|
||||
Const ABE_BOTTOM As Integer = 3
|
||||
|
||||
Const ABM_NEW As Integer = 0
|
||||
Const ABM_REMOVE As Integer = 1
|
||||
Const ABM_QUERYPOS As Integer = 2
|
||||
Const ABM_SETPOS As Integer = &H3
|
||||
Const ABM_GETSTATE As Integer = 4
|
||||
Const ABM_GETTASKBARPOS As Integer = 5
|
||||
Const ABM_ACTIVATE As Integer = 6
|
||||
Const ABM_GETAUTOHIDEBAR As Integer = 7
|
||||
Const ABM_SETAUTOHIDEBAR As Integer = 8
|
||||
Const ABM_WINDOWPOSCHANGED As Integer = 9
|
||||
|
||||
Const ABS_AUTOHIDE As Integer = 1
|
||||
Const ABS_ALWAYSONTOP As Integer = 2
|
||||
|
||||
Const HWND_NOTTOPMOST As Integer = -2
|
||||
Const HWND_TOPMOST As Integer = -1
|
||||
Const HWND_TOP As Integer = 0
|
||||
Const SHOWNORMAL As Integer = 5
|
||||
|
||||
Const SWP_NOSIZE As Integer = &H1
|
||||
Const SWP_NOMOVE As Short = &H2
|
||||
Const SWP_NOZORDER As Integer = 4
|
||||
Const SWP_NOACTIVATE As Integer = &H10
|
||||
Const SWP_DRAWFRAME As Integer = &H20
|
||||
Const SWP_SHOWWINDOW As Integer = &H40
|
||||
#End Region
|
||||
|
||||
' Constants
|
||||
Private Const OPACITY_INITIAL = 0
|
||||
@@ -101,7 +49,7 @@ Public Class frmFlowForm
|
||||
Private ESCHitCount As Integer = 0
|
||||
Private IndexForm As frmGlobix_Index
|
||||
Private AdminForm As frmAdmin_Start
|
||||
Private Sidebar As APPBARDATA
|
||||
|
||||
|
||||
' Events
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
@@ -128,8 +76,8 @@ Public Class frmFlowForm
|
||||
Init.InitializeApplication()
|
||||
|
||||
' Register Form as Sidebar
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
RegisterSidebar(My.UIConfig.SidebarScreen)
|
||||
My.Application.Sidebar = New Sidebar(Handle)
|
||||
My.Application.Sidebar.RegisterSidebar(My.UIConfig.SidebarScreen)
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||
@@ -938,42 +886,6 @@ Public Class frmFlowForm
|
||||
frmSearchNeu.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
UnregisterSidebar()
|
||||
End Sub
|
||||
|
||||
Private Sub RegisterSidebar(pScreenName As String)
|
||||
Sidebar.hwnd = Me.Handle.ToInt32
|
||||
Sidebar.cbSize = Len(Sidebar)
|
||||
|
||||
Dim oSelectedScreen = System.Windows.Forms.Screen.PrimaryScreen
|
||||
|
||||
' TODO: Make Sidebar Screen configurable
|
||||
'If pScreenName <> "" Then
|
||||
' Dim oScreens = System.Windows.Forms.Screen.AllScreens
|
||||
' For Each oScreen In oScreens
|
||||
' If oScreen.DeviceName = pScreenName Then
|
||||
' oSelectedScreen = oScreen
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
|
||||
With Sidebar
|
||||
.uEdge = ABE_RIGHT
|
||||
.rc.Top = oSelectedScreen.WorkingArea.Top '0
|
||||
.rc.Right = oSelectedScreen.WorkingArea.Right ' right
|
||||
.rc.Left = oSelectedScreen.WorkingArea.Right - 200 ' width of our appbar
|
||||
.rc.Bottom = oSelectedScreen.WorkingArea.Height ' bottom
|
||||
SHAppBarMessage(ABM_NEW, Sidebar)
|
||||
SetWindowPos(Sidebar.hwnd, HWND_TOP, .rc.Left, .rc.Top, .rc.Right - .rc.Left, .rc.Bottom, SWP_SHOWWINDOW Or SWP_NOACTIVATE)
|
||||
SHAppBarMessage(ABM_SETPOS, Sidebar)
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub UnregisterSidebar()
|
||||
SHAppBarMessage(ABM_REMOVE, Sidebar)
|
||||
End Sub
|
||||
|
||||
Private Sub BasisKonfigurationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BasisKonfigurationToolStripMenuItem.Click
|
||||
frmConfigBasic.ShowDialog()
|
||||
End Sub
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports DigitalData.Modules.EDMI.API.Client
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports DigitalData.Modules.Base.IDB.FileStore
|
||||
|
||||
Public Class frmtest
|
||||
|
||||
@@ -27,7 +22,7 @@ Public Class frmtest
|
||||
"DEFAULT"
|
||||
)
|
||||
|
||||
If oObjectId <> INVALID_OBEJCT_ID Then
|
||||
If oObjectId <> FILE_STORE_INVALID_OBEJCT_ID Then
|
||||
MsgBox("File Imported!", MsgBoxStyle.Information, Text)
|
||||
Else
|
||||
MsgBox("File was not imported. Check the server logs!")
|
||||
@@ -35,7 +30,6 @@ Public Class frmtest
|
||||
txtIDB_OBJ_ID.Text = oObjectId
|
||||
End Sub
|
||||
|
||||
|
||||
Private Async Sub btnImportFile_Click_(sender As Object, e As EventArgs) Handles btnImportFile.Click
|
||||
Dim oResponse As ImportFileResponse = Await My.Application.Service.Client.Globix_ImportFileAsync(
|
||||
txtFile2Import.Text,
|
||||
|
||||
Reference in New Issue
Block a user