diff --git a/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj b/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj index 5c0b6c0..5cb0fa2 100644 --- a/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj +++ b/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj @@ -14,6 +14,7 @@ v4.6.2 false + false publish\ true Disk @@ -26,7 +27,6 @@ true 0 1.0.0.%2a - false false true diff --git a/app/DD_Clipboard_Searcher/frmMain.vb b/app/DD_Clipboard_Searcher/frmMain.vb index 39426d5..d99a621 100644 --- a/app/DD_Clipboard_Searcher/frmMain.vb +++ b/app/DD_Clipboard_Searcher/frmMain.vb @@ -5,11 +5,14 @@ Imports DD_Clipboard_Watcher.ClassConstants Imports DD_Clipboard_Watcher.ClassWindowAPI Imports DigitalData.Modules.ZooFlow Imports DigitalData.Modules.Windows +Imports DigitalData.Modules.Base Imports DigitalData.GUIs.ClipboardWatcher Imports DevExpress.XtraBars.ToastNotifications Imports DigitalData.GUIs.Common Public Class frmMain + Private Const AppTitle = "EasyFlow" + Private WithEvents _Hotkey As New ClassHotkey(Me) Private WithEvents _Watcher As ClassClipboardWatcher = ClassClipboardWatcher.Singleton @@ -58,35 +61,7 @@ Public Class frmMain End If lblUser.Caption = USER_USERNAME - ' === Language is set in ClassInit === - 'If ERROR_INIT <> "INVALID USER" Then - - ' Try - ' Logger.Debug("Setting thread Culture..") - - ' 'Dim Culture = CultureInfo.CreateSpecificCulture(USER_LANGUAGE) - ' Dim Culture As New CultureInfo(USER_LANGUAGE) - ' Culture.DateTimeFormat.ShortDatePattern = USER_DATE_FORMAT - - ' Logger.Debug("Culture object for language [{0}] created") - - ' ' The following line provides localization for data formats. - ' Thread.CurrentThread.CurrentCulture = Culture - ' ' The following line provides localization for the application's user interface. - ' Thread.CurrentThread.CurrentUICulture = Culture - - ' ' Set this culture as the default culture for all threads in this application. - ' ' Note: The following properties are supported in the .NET Framework 4.5+ - ' CultureInfo.DefaultThreadCurrentCulture = Culture - ' CultureInfo.DefaultThreadCurrentUICulture = Culture - - ' Logger.Debug("Thread Culture set to [{0}]", Culture.Name) - ' Catch ex As Exception - ' Logger.Warn("Could not set Thread Culture!") - ' Logger.Error(ex) - ' End Try - - 'End If + Language.LogApplicationLanguage(Logger) If Database.DBInitialized = True Then If ERROR_INIT <> "" Then @@ -265,10 +240,10 @@ Public Class frmMain oProfiles = oProfileFilter.FilterProfilesByFocusedControl(oProfiles, ClipboardContents, Handle) oProfiles = oProfileFilter.LogRemainingProfiles(oProfiles, "FilterProfilesByFocusedControl") + CURRENT_MATCHING_PROFILES = oProfiles.ToList() - Logger.Debug("WatcherChanged_New: CURRENT_MATCHING_PROFILES.Count: " & CURRENT_MATCHING_PROFILES.Count) + oProfiles = oProfileFilter.FilterProfilesBySearchResults(oProfiles, oEnvironment.Database, oEnvironment.User, ClipboardContents) - Logger.Debug("WatcherChanged_New: oProfiles.Count: " & oProfiles.Count) oProfiles = oProfileFilter.LogRemainingProfiles(oProfiles, "FilterProfilesBySearchResults") oProfiles = oProfileFilter.ClearNotMatchedProfiles(oProfiles) @@ -359,7 +334,11 @@ Public Class frmMain Dim oParams = New ClipboardWatcherParams() With { .ClipboardContents = CURRENT_CLIPBOARD_CONTENTS, .MatchingProfiles = oProfiles, - .MatchTreeView = CurrMatchTreeView + .MatchTreeView = CurrMatchTreeView, + .OperationModeOverride = IIf( + oEnv.Service.IsActive, + DigitalData.Modules.ZooFlow.Constants.OperationMode.WithAppServer, + DigitalData.Modules.ZooFlow.Constants.OperationMode.NoAppServer) } Dim oForm As New frmMatch(LogConfig, oEnv, oParams) @@ -532,7 +511,7 @@ Public Class frmMain Private Sub bbtnitmLanguage_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmLanguage.ItemClick Dim oNForm As New frmLanguage_Select(LogConfig, MyConnectionString, USER_USERNAME, BASEDATA_DT_LANGUAGE, "EF") - oNForm.ShowDialog + oNForm.ShowDialog() If oNForm.pChanged = True Then MsgBox("For the changes to take effect, the program must now be closed. Restart it afterwards.", MsgBoxStyle.Exclamation, "Restart:")