MS Globix1
This commit is contained in:
parent
3e84c7bdcb
commit
79872f048d
150
GUIs.ZooFlow/ClassFileDrop.vb
Normal file
150
GUIs.ZooFlow/ClassFileDrop.vb
Normal file
@ -0,0 +1,150 @@
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class ClassFileDrop
|
||||
Public Shared files_dropped As String()
|
||||
Private _LOGGER As Logger
|
||||
Private clsFilehandle As ClassFilehandle
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_LOGGER = LogConfig.GetLogger()
|
||||
clsFilehandle = New ClassFilehandle(LogConfig)
|
||||
End Sub
|
||||
Public Function Drop_File(e As DragEventArgs)
|
||||
Try
|
||||
_LOGGER.Info("Available Drop Formats:")
|
||||
|
||||
For Each oFormat As String In e.Data.GetFormats()
|
||||
_LOGGER.Info(oFormat)
|
||||
Next
|
||||
|
||||
_LOGGER.Info(">> Drop_File")
|
||||
files_dropped = Nothing
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
Dim MyFiles() As String
|
||||
Dim i As Integer
|
||||
' Assign the files to an array.
|
||||
MyFiles = e.Data.GetData(DataFormats.FileDrop)
|
||||
' Loop through the array and add the files to the list.
|
||||
For i = 0 To MyFiles.Length - 1
|
||||
_LOGGER.Info(">> Simple FileDrop - File: " & MyFiles(i))
|
||||
ReDim Preserve files_dropped(i)
|
||||
files_dropped(i) = "|DROPFROMFSYSTEM|" & MyFiles(i)
|
||||
' ListBox1.Items.Add(MyFiles(i))
|
||||
Next
|
||||
Return True
|
||||
ElseIf (e.Data.GetDataPresent("FileGroupDescriptor")) AndAlso (e.Data.GetDataPresent("FileContents")) Then
|
||||
'// the first step here is to get the stbFileName
|
||||
'// of the attachment and
|
||||
'// build a full-path name so we can store it
|
||||
'// in the temporary folder
|
||||
'//
|
||||
'// set up to obtain the aryFileGroupDescriptor
|
||||
'// and extract the file name
|
||||
Dim stmInput As IO.Stream = CType(e.Data.GetData("FileGroupDescriptor"), IO.Stream)
|
||||
Dim aryFileGroupDescriptor(512) As Byte ' = new byte[512]
|
||||
stmInput.Read(aryFileGroupDescriptor, 0, 512)
|
||||
'// used to build the stbFileName from the aryFileGroupDescriptor block
|
||||
Dim stbFileName As System.Text.StringBuilder = New System.Text.StringBuilder("")
|
||||
'// this trick gets the stbFileName of the passed attached file
|
||||
Dim intCnt As Integer = 76
|
||||
Do While aryFileGroupDescriptor(intCnt) <> 0
|
||||
stbFileName.Append(Convert.ToChar(aryFileGroupDescriptor(intCnt), System.Globalization.CultureInfo.CreateSpecificCulture("de-DE")))
|
||||
intCnt += 1
|
||||
Loop
|
||||
stmInput.Close()
|
||||
'Sonderzeichen entfernen
|
||||
Dim Tempfilename = clsFilehandle.InvalidCharacters(stbFileName.ToString)
|
||||
Dim anhaenge = e.Data.GetDataPresent("FileContents")
|
||||
'Dim path As String = "C:\VBProjekte\Dateien"
|
||||
'// put the zip file into the temp directory
|
||||
Dim strOutFile As String = Path.GetTempPath() & Tempfilename
|
||||
'// create the full-path name
|
||||
'//
|
||||
'// Second step: we have the file name.
|
||||
'// Now we need to get the actual raw
|
||||
'// data for the attached file and copy it to disk so we work on it.
|
||||
'//
|
||||
'// get the actual raw file into memory
|
||||
Dim msInput As IO.MemoryStream = CType(e.Data.GetData("FileContents", True), IO.MemoryStream) 'This returns nothing for an Email
|
||||
If msInput Is Nothing = False Then
|
||||
'// allocate enough bytes to hold the raw date
|
||||
Dim aryFileBytes(CType(msInput.Length, Int32)) As Byte
|
||||
'// set starting position at first byte and read in the raw data
|
||||
msInput.Position = 0
|
||||
msInput.Read(aryFileBytes, 0, CType(msInput.Length, Int32))
|
||||
'// create a file and save the raw zip file to it
|
||||
Dim fsOutput As IO.FileStream = New IO.FileStream(strOutFile, IO.FileMode.Create) ';
|
||||
fsOutput.Write(aryFileBytes, 0, aryFileBytes.Length)
|
||||
fsOutput.Close() ' // close the file
|
||||
Dim resultVersion = clsFilehandle.Versionierung_Datei(strOutFile)
|
||||
If resultVersion <> "" Then
|
||||
strOutFile = resultVersion
|
||||
End If
|
||||
Dim finTemp As IO.FileInfo = New IO.FileInfo(strOutFile)
|
||||
'// always good to make sure we actually created the file
|
||||
If (finTemp.Exists = True) Then
|
||||
ReDim Preserve files_dropped(0)
|
||||
files_dropped(0) = "|OUTLOOK_ATTACHMENT|" & strOutFile
|
||||
_LOGGER.Info(">> Drop an Attachment - File: " & strOutFile)
|
||||
Return True
|
||||
Else
|
||||
_LOGGER.Info(">> Attachment File from Outlook could not be created")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If e.Data.GetDataPresent("FileGroupDescriptor") Then
|
||||
Dim oApp
|
||||
Try
|
||||
oApp = New Outlook.Application()
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected error in Initialisieren von Outlook-API:" & vbNewLine & ex.Message & vbNewLine & vbNewLine & "Evtl ist Outlook nicht in der dafür vorgesehenen For")
|
||||
End Try
|
||||
|
||||
_LOGGER.Info(">> Drop of msg")
|
||||
'supports a drop of a Outlook message
|
||||
Dim myobj As Object
|
||||
For i As Integer = 1 To oApp.ActiveExplorer.Selection.Count
|
||||
myobj = oApp.ActiveExplorer.Selection.Item(i)
|
||||
Dim subj As String = myobj.Subject
|
||||
If subj = "" Then
|
||||
subj = "NO_SUBJECT"
|
||||
End If
|
||||
If subj.Contains("\") Then
|
||||
subj = subj.Replace("\", "-")
|
||||
End If
|
||||
If subj.Contains("/") Then
|
||||
subj = subj.Replace("/", "-")
|
||||
End If
|
||||
'Sonderzeichen entfernen
|
||||
subj = clsFilehandle.InvalidCharacters(subj)
|
||||
'hardcode a destination path for testing
|
||||
Dim strFile As String = IO.Path.Combine(Path.GetTempPath, subj + ".msg")
|
||||
strFile = strFile.Replace("?", "")
|
||||
strFile = strFile.Replace("!", "")
|
||||
strFile = strFile.Replace("%", "")
|
||||
strFile = strFile.Replace("$", "")
|
||||
_LOGGER.Info(">> Drop of msg - File:" & strFile)
|
||||
Try
|
||||
myobj.SaveAs(strFile)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Save Email2Tempfile" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
ReDim Preserve files_dropped(i)
|
||||
files_dropped(i) = "|OUTLOOK_MESSAGE|" & strFile
|
||||
Next
|
||||
Return True
|
||||
'Drop eines Outlook Attachments
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Drop-File" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
239
GUIs.ZooFlow/ClassFilehandle.vb
Normal file
239
GUIs.ZooFlow/ClassFilehandle.vb
Normal file
@ -0,0 +1,239 @@
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Independentsoft
|
||||
|
||||
Public Class ClassFilehandle
|
||||
Private _LOGGER As Logger
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_LOGGER = LogConfig.GetLogger()
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Diese Funktion entfernt alle Zeichen aus dem übergebenen String
|
||||
''' die in Dateinamen nicht erlaubt sind.
|
||||
''' </summary>
|
||||
''' <param name="Input">Der zu prüfende String</param>
|
||||
''' <returns>String ohne nichterlaubte Zeichen</returns>
|
||||
Public Function InvalidCharacters(Input As String) As String
|
||||
Dim replacement = ""
|
||||
'Return System.Text.RegularExpressions.Regex.Replace(Input, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
|
||||
Dim regexSearch = New String(Path.GetInvalidFileNameChars()) & New String(Path.GetInvalidPathChars())
|
||||
Dim r = New Regex(String.Format("[{0}]", Regex.Escape(regexSearch)))
|
||||
Return r.Replace(Input, replacement)
|
||||
End Function
|
||||
Public Function Decide_FileHandle(filename As String, handletype As String)
|
||||
Try
|
||||
If filename.EndsWith(".msg") Then
|
||||
My.Application.CurrMessageID = ""
|
||||
Dim _msg As New Msg.Message(filename)
|
||||
If _msg.Attachments.Count > 0 Then
|
||||
Dim result As MsgBoxResult
|
||||
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
result = MessageBox.Show(New Form With {.TopMost = True}, "Achtung: Die Email enthält Anhänge!" & vbNewLine & "Wollen Sie die Anhänge separat indexieren und herauslösen?", "Nachfrage zur Indexierung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
Else
|
||||
result = MessageBox.Show(New Form With {.TopMost = True}, "Attention: This Email contains Attachments!" & vbNewLine & "Do you want to extract the attachments and index them seperately?", "Question about Indexing:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
End If
|
||||
|
||||
If result = MsgBoxResult.Yes Then
|
||||
If handletype.StartsWith("|FW") Then
|
||||
Return Email_Decay(filename, True)
|
||||
Else
|
||||
Return Email_Decay(filename)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If filename.ToUpper.EndsWith(".LNK") Then
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Verknüpfungen können nicht abgelegt werden!", MsgBoxStyle.Critical, "Global Indexer")
|
||||
Else
|
||||
MsgBox("Shortcuts cannot be droppped!", MsgBoxStyle.Critical, "Global Indexer")
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return Insert_GI_File(filename, handletype)
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Decide_FileHandle: " & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function Email_Decay(msgname As String, Optional FW As Boolean = False)
|
||||
Try
|
||||
Dim msgonly As String = "|MSGONLY|"
|
||||
Dim ATT_EXTR As String = "|ATTMNTEXTRACTED|"
|
||||
If FW = True Then
|
||||
msgonly = "|FW_MSGONLY|"
|
||||
ATT_EXTR = "|FW_ATTMNTEXTRACTED|"
|
||||
End If
|
||||
Dim erfolgreich As Boolean = False
|
||||
Dim msg As New Msg.Message(msgname)
|
||||
|
||||
If Not msg.InternetMessageId Is Nothing Then
|
||||
My.Application.CurrMessageID = msg.InternetMessageId
|
||||
Else
|
||||
_LOGGER.Info(">> Email_Decay: Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
|
||||
Dim sGUID As String
|
||||
sGUID = System.Guid.NewGuid.ToString()
|
||||
My.Application.CurrMessageID = sGUID
|
||||
End If
|
||||
|
||||
'Nur die MSGDatei ablegen
|
||||
Dim tempfile As String = Path.Combine(Path.GetTempPath, Path.GetFileNameWithoutExtension(msgname) & "_excl_att.msg")
|
||||
|
||||
If File.Exists(tempfile) Then
|
||||
File.Delete(tempfile)
|
||||
End If
|
||||
Dim _msgEXAtt As New Msg.Message(msgname)
|
||||
_msgEXAtt.Attachments.Clear()
|
||||
_msgEXAtt.Save(tempfile)
|
||||
'Datei in Array zum Templöschen speichern
|
||||
My.Application.TEMP_FILES.Add(tempfile)
|
||||
|
||||
If Insert_GI_File(tempfile, msgonly) = True Then
|
||||
erfolgreich = True
|
||||
'Hier nun die Anhänge herauslösen
|
||||
Dim _msg As New Msg.Message(msgname)
|
||||
Dim i1 As Integer = 1
|
||||
|
||||
_LOGGER.Info(">> Anzahl der Attachments: " & _msg.Attachments.Count)
|
||||
For Each attachment As Independentsoft.Msg.Attachment In _msg.Attachments
|
||||
If erfolgreich = False Then
|
||||
Exit For
|
||||
End If
|
||||
Dim attachment_name As String
|
||||
If attachment.LongFileName Is Nothing Then
|
||||
attachment_name = attachment.DisplayName
|
||||
Else
|
||||
attachment_name = attachment.LongFileName
|
||||
End If
|
||||
If attachment.EmbeddedMessage IsNot Nothing Then
|
||||
attachment_name = InvalidCharacters(attachment_name)
|
||||
tempfile = Path.Combine(Path.GetTempPath, attachment_name & ".msg")
|
||||
tempfile = CType(Versionierung_Datei(tempfile), String)
|
||||
|
||||
If tempfile <> String.Empty Then
|
||||
Dim oMessage = attachment.EmbeddedMessage
|
||||
oMessage.Save(tempfile)
|
||||
My.Application.TEMP_FILES.Add(tempfile)
|
||||
_LOGGER.Info(">> Attachment (" & i1 & "):" & tempfile)
|
||||
erfolgreich = Insert_GI_File(tempfile, ATT_EXTR)
|
||||
i1 += 1
|
||||
End If
|
||||
ElseIf Not attachment_name.Contains("inline") Then
|
||||
'Sonderzeichen entfernen
|
||||
attachment_name = InvalidCharacters(attachment_name)
|
||||
tempfile = Path.Combine(Path.GetTempPath, attachment_name)
|
||||
tempfile = Versionierung_Datei(tempfile)
|
||||
If tempfile <> "" Then
|
||||
attachment.Save(tempfile)
|
||||
'Datei in Array zum Templöschen speichern
|
||||
My.Application.TEMP_FILES.Add(tempfile)
|
||||
_LOGGER.Info(">> Attachment (" & i1 & "):" & tempfile)
|
||||
'nun der Insert des Anhanges
|
||||
erfolgreich = Insert_GI_File(tempfile, ATT_EXTR)
|
||||
i1 += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return erfolgreich
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Email_Decay: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function Insert_GI_File(filename As String, handleType As String)
|
||||
Try
|
||||
filename = filename.Replace("'", "''")
|
||||
|
||||
Dim filename_only As String = Path.GetFileName(filename)
|
||||
Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')"
|
||||
Return My.Database.ExecuteNonQuery(ins, True)
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function IsFileInUse(ByVal fullFilePath As String) As Boolean
|
||||
' Gibt zurück, ob die übergebene Datei momentan exklusiv zu haben ist.
|
||||
' Prüft, ob die angegeben Datei aktuell durch eine
|
||||
' andere Anwendung in Benutzung ist
|
||||
Dim ff As Integer = FreeFile()
|
||||
If System.IO.File.Exists(fullFilePath) Then
|
||||
Try
|
||||
' Versuchen, die Datei mit *exklusiven* Lese- und
|
||||
' Schreibrechten zu öffnen
|
||||
FileOpen(ff, fullFilePath, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite)
|
||||
Catch ex As Exception
|
||||
' Ist ein Fehler aufgetreten, so wird nach außen hin generell
|
||||
' davon ausgegangen, dass die Datei in Benutzung ist (obwohl
|
||||
' auch andere Ursachen, etwa Rechteprobleme, möglich sind).
|
||||
_LOGGER.Info(">> FileInUse Message: " & ex.Message)
|
||||
IsFileInUse = True
|
||||
Finally
|
||||
' Die eventuell geöffnete Datei schließen
|
||||
FileClose(ff)
|
||||
End Try
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
Public Function Versionierung_Datei(Dateiname As String)
|
||||
Dim extension
|
||||
Dim _NewFileString
|
||||
Try
|
||||
Dim version As Integer = 1
|
||||
|
||||
Dim Stammname As String = Path.GetDirectoryName(Dateiname) & "\" & Path.GetFileNameWithoutExtension(Dateiname)
|
||||
extension = Path.GetExtension(Dateiname)
|
||||
|
||||
Dim _neuername As String = Stammname
|
||||
'Dim MoveFilename As String = DATEINAME.Replace(element.Value, "")
|
||||
'Überprüfen ob File existiert
|
||||
If File.Exists(_neuername & extension) = False Then
|
||||
_NewFileString = _neuername
|
||||
Else
|
||||
Do While File.Exists(_neuername & extension)
|
||||
version = version + 1
|
||||
_neuername = Stammname & "~" & version
|
||||
_NewFileString = _neuername
|
||||
Loop
|
||||
End If
|
||||
Return _NewFileString & extension
|
||||
Catch ex As Exception
|
||||
_LOGGER.Info(" - Error in versioning file - error: " & vbNewLine & ex.Message)
|
||||
_LOGGER.Error(ex.Message)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in versioning file:")
|
||||
Return ""
|
||||
End Try
|
||||
|
||||
End Function
|
||||
'' <summary>
|
||||
''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen
|
||||
''' </summary>
|
||||
''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
|
||||
''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
|
||||
''' im Dateinamen</param>
|
||||
Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
|
||||
_LOGGER.Info(" >> Filename before CleanFilename: '" & sFilename & "'")
|
||||
If sFilename.Contains(".\") Then
|
||||
sFilename = sFilename.Replace(".\", "\")
|
||||
End If
|
||||
'If sFilename.Contains("'") Then
|
||||
' sFilename = sFilename.Replace("'", "")
|
||||
'End If
|
||||
'If sFilename.Contains("..") Then
|
||||
' sFilename = sFilename.Replace("..", ".")
|
||||
'End If
|
||||
' alle nicht zulässigen Zeichen ersetzen
|
||||
sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, My.Application.GI_REGEX_CLEAN_FILENAME, REPLACEChar)
|
||||
sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
|
||||
'Dim oCleanFileName As String = String.Join(REPLACEChar, sFilename.Split(Path.GetInvalidFileNameChars()))
|
||||
Dim oCleanFileName As New System.IO.FileInfo(System.Text.RegularExpressions.Regex.Replace(sFilename, String.Format("[{0}]", String.Join(String.Empty, Path.GetInvalidFileNameChars)), REPLACEChar))
|
||||
_LOGGER.Info(" >> Filename after CleanFilename: '" & sFilename & "'")
|
||||
Return sFilename
|
||||
End Function
|
||||
End Class
|
||||
@ -37,7 +37,7 @@ Public Class ClassInit
|
||||
oInit.AddStep("Initializing User..", AddressOf InitializeUser, True)
|
||||
oInit.AddStep("Initializing IDB..", AddressOf InitializeIDB, True)
|
||||
oInit.AddStep("Loading 3rd-party licenses", AddressOf Initialize3rdParty, False)
|
||||
|
||||
oInit.AddStep("Loading basic Configs", AddressOf Initialize3rdParty, False)
|
||||
' === Init Schritte definieren
|
||||
|
||||
AddHandler oInit.ProgressChanged, AddressOf ProgressChanged
|
||||
@ -113,6 +113,19 @@ Public Class ClassInit
|
||||
Throw New InitException("Fehler beim Laden der Konfiguration!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub InitBasicData(MyApplication As My.MyApplication)
|
||||
Try
|
||||
Dim oSql = "SELECT * FROM TBGI_FUNCTION_REGEX"
|
||||
My.Application.GI_DT_FUNCTION_REGEX = My.Database.GetDatatable(oSql)
|
||||
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw New InitException("Error in InitBasicData")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeIDB(MyApplication As My.MyApplication)
|
||||
If MyApplication.ModulesActive.Contains(MODULE_ZOOFLOW) Then
|
||||
|
||||
@ -46,6 +46,11 @@ Namespace My
|
||||
Public Property ModulesActive As New List(Of String)
|
||||
Public Property ClipboardWatcher As New ClipboardWatcher.State
|
||||
Public Property IDB_ConnectionString As String
|
||||
Public Property CurrMessageID As String
|
||||
|
||||
Public Property GI_DT_FUNCTION_REGEX As DataTable
|
||||
Public Property GI_REGEX_CLEAN_FILENAME As String = "[?*^""<>|]"
|
||||
Public Property TEMP_FILES As List(Of String) = New List(Of String)
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -55,10 +55,17 @@
|
||||
<Reference Include="DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraTreeList.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DigitalData.GUIs.Common, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="DigitalData.GUIs.Common">
|
||||
<HintPath>..\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Msg.2.0.570.21482">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.2.0.570.21482.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
<HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
@ -97,6 +104,8 @@
|
||||
<Compile Include="Base\BaseClass.vb" />
|
||||
<Compile Include="ClassClipboardWatcher.vb" />
|
||||
<Compile Include="ClassControlCreator.vb" />
|
||||
<Compile Include="ClassFileDrop.vb" />
|
||||
<Compile Include="ClassFilehandle.vb" />
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="ClassWin32.vb" />
|
||||
<Compile Include="ClipboardWatcher\State.vb" />
|
||||
@ -230,10 +239,6 @@
|
||||
<Project>{B7D465A2-AE31-4CDF-A8B2-34B42D3EA84E}</Project>
|
||||
<Name>ClipboardWatcher</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GUIs.Common\Common.vbproj">
|
||||
<Project>{D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||
<Project>{44982F9B-6116-44E2-85D0-F39650B1EF99}</Project>
|
||||
<Name>Config</Name>
|
||||
@ -326,6 +331,9 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\2_ZOO_FLOW_Abo_MouseOver.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Globix\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
14
GUIs.ZooFlow/frmFlowForm.Designer.vb
generated
14
GUIs.ZooFlow/frmFlowForm.Designer.vb
generated
@ -31,6 +31,7 @@ Partial Class frmFlowForm
|
||||
Me.DatenbankverbindungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.VerwaltungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.UserVerwaltungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ZooFlowBeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ContextMenuForm = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.AlleAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@ -41,7 +42,6 @@ Partial Class frmFlowForm
|
||||
Me.PictureBoxPM = New System.Windows.Forms.PictureBox()
|
||||
Me.PictureBoxSearch = New System.Windows.Forms.PictureBox()
|
||||
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.UserVerwaltungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TimerCheckActiveForms = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.ContextMenuSystray.SuspendLayout()
|
||||
Me.ContextMenuForm.SuspendLayout()
|
||||
@ -94,6 +94,12 @@ Partial Class frmFlowForm
|
||||
Me.VerwaltungToolStripMenuItem.Size = New System.Drawing.Size(173, 22)
|
||||
Me.VerwaltungToolStripMenuItem.Text = "Verwaltung"
|
||||
'
|
||||
'UserVerwaltungToolStripMenuItem
|
||||
'
|
||||
Me.UserVerwaltungToolStripMenuItem.Name = "UserVerwaltungToolStripMenuItem"
|
||||
Me.UserVerwaltungToolStripMenuItem.Size = New System.Drawing.Size(156, 22)
|
||||
Me.UserVerwaltungToolStripMenuItem.Text = "Userverwaltung"
|
||||
'
|
||||
'ZooFlowBeendenToolStripMenuItem
|
||||
'
|
||||
Me.ZooFlowBeendenToolStripMenuItem.Name = "ZooFlowBeendenToolStripMenuItem"
|
||||
@ -170,12 +176,6 @@ Partial Class frmFlowForm
|
||||
Me.PictureBoxSearch.TabStop = False
|
||||
Me.ToolTip1.SetToolTip(Me.PictureBoxSearch, "ZooFlow Suche")
|
||||
'
|
||||
'UserVerwaltungToolStripMenuItem
|
||||
'
|
||||
Me.UserVerwaltungToolStripMenuItem.Name = "UserVerwaltungToolStripMenuItem"
|
||||
Me.UserVerwaltungToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.UserVerwaltungToolStripMenuItem.Text = "Userverwaltung"
|
||||
'
|
||||
'TimerCheckActiveForms
|
||||
'
|
||||
Me.TimerCheckActiveForms.Interval = 2000
|
||||
|
||||
@ -2041,6 +2041,6 @@
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TimerCheckActiveForms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
<value>863, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@ -12,7 +12,7 @@ Public Class frmFlowForm
|
||||
Private Logger As Logger
|
||||
Private Init As ClassInit
|
||||
Private DTIDB_SEARCHES As DataTable
|
||||
|
||||
Private CLSFileDrop As ClassFileDrop
|
||||
' Runtime Flags
|
||||
Private ApplicationLoading As Boolean = True
|
||||
Private IDBSearchActive As Boolean = False
|
||||
@ -41,6 +41,7 @@ Public Class frmFlowForm
|
||||
|
||||
' === Initialization ===
|
||||
Init = New ClassInit(My.LogConfig, Me)
|
||||
CLSFileDrop = New ClassFileDrop(My.LogConfig)
|
||||
AddHandler Init.Completed, AddressOf Init_Completed
|
||||
Init.InitializeApplication()
|
||||
End Sub
|
||||
@ -262,4 +263,39 @@ Public Class frmFlowForm
|
||||
TimerCheckActiveForms.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox1_DragEnter(sender As Object, e As DragEventArgs) Handles PictureBox1.DragEnter
|
||||
Drag_Enter(sender, e)
|
||||
End Sub
|
||||
Sub Drag_Enter(sender As Object, e As DragEventArgs)
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
e.Effect = DragDropEffects.All
|
||||
' Console.WriteLine("DragEnter ...DragDrop")
|
||||
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
|
||||
'handle a message dragged from Outlook
|
||||
e.Effect = DragDropEffects.Copy
|
||||
' Console.WriteLine("DragEnter ...OutlookMessage")
|
||||
ElseIf e.Data.GetDataPresent("aryFileGroupDescriptor") AndAlso (e.Data.GetDataPresent("FileContents")) Then
|
||||
e.Effect = DragDropEffects.Copy
|
||||
' Console.WriteLine("DragEnter ...Attachment from Outlook")
|
||||
Else
|
||||
'otherwise, do not handle
|
||||
e.Effect = DragDropEffects.None
|
||||
End If
|
||||
End Sub
|
||||
Sub DragDropForm(e As DragEventArgs)
|
||||
If TheFormIsAlreadyLoaded("frmIndexFileList") Then
|
||||
Cursor = Cursors.Default
|
||||
MsgBox("Please index the active file first!", MsgBoxStyle.Exclamation, "Drag 'n Drop not allowed!")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim frmCollection = Application.OpenForms
|
||||
|
||||
'Erstmal alles löschen
|
||||
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||
|
||||
If CLSFileDrop.Drop_File(e) = True Then
|
||||
'TimerCheckDroppedFiles.Start()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@ -5,10 +5,8 @@ Imports DevExpress.XtraTab
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports System.Random
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DigitalData.GUIs.Common
|
||||
|
||||
Public Class frmSearchStart
|
||||
Private Logger As Logger
|
||||
@ -274,9 +272,9 @@ Public Class frmSearchStart
|
||||
oView = CType(myDGV.MainView, GridView)
|
||||
oMyLastGridView = oView
|
||||
If CBool(oAttributeRow.Item("MULTISELECT")) = True Then
|
||||
AddHandler oView.SelectionChanged, AddressOf RenewSearchAttributes
|
||||
'AddHandler oView.SelectionChanged, AddressOf RenewSearchAttributes
|
||||
Else
|
||||
AddHandler oView.FocusedRowChanged, AddressOf FocusedRowChanged
|
||||
' AddHandler oView.FocusedRowChanged, AddressOf FocusedRowChanged
|
||||
|
||||
End If
|
||||
oView.FocusInvalidRow()
|
||||
@ -421,7 +419,7 @@ Public Class frmSearchStart
|
||||
Dim oResult As String = CType(rowView.Item(0), String)
|
||||
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle
|
||||
RenewSearchAttributes()
|
||||
' RenewSearchAttributes()
|
||||
' AddSearchAttribute(oAttrID, oAttrTitle, oResult)
|
||||
|
||||
End If
|
||||
@ -433,7 +431,7 @@ Public Class frmSearchStart
|
||||
Dim oChecked = oCurrentCB.Checked
|
||||
Dim oAttrID = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
Dim oAttrTitle = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrTitle
|
||||
RenewSearchAttributes()
|
||||
'RenewSearchAttributes()
|
||||
' AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString)
|
||||
End Sub
|
||||
Private Sub frmSearchStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
@ -476,7 +474,7 @@ Public Class frmSearchStart
|
||||
ChangedDateControls = oList
|
||||
End If
|
||||
|
||||
RenewSearchAttributes()
|
||||
'RenewSearchAttributes()
|
||||
|
||||
'Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {PSEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{omydate}','{My.Application.User.UserName}'"
|
||||
'My.DatabaseIDB.ExecuteNonQuery(oInsert)
|
||||
@ -836,6 +834,7 @@ Public Class frmSearchStart
|
||||
End Function
|
||||
|
||||
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
|
||||
RenewSearchAttributes()
|
||||
Start_Search()
|
||||
End Sub
|
||||
Private Sub Start_Search()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user