MS Override
This commit is contained in:
parent
020d8e27c5
commit
5cb9aed5aa
@ -1,21 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
|
||||
<section name="DD_Clipboard_Watcher.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection" requirePermission="false"/>
|
||||
<section name="DD_Clipboard_Watcher.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<DD_Clipboard_Watcher.My.MySettings>
|
||||
<setting name="UserConfig_Prefix" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UseAppConfigConString" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="GHOSTUSER" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SYS_Override_Language" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</DD_Clipboard_Watcher.My.MySettings>
|
||||
<DevExpress.LookAndFeel.Design.AppSettings>
|
||||
@ -57,28 +60,28 @@
|
||||
<CustomPaletteCollection>
|
||||
<Skin Name="Office 2019 Colorful">
|
||||
<SvgPalette Name="Digital Data">
|
||||
<SvgColor Name="Paint" Value="248,248,248"/>
|
||||
<SvgColor Name="Paint High" Value="255,255,255"/>
|
||||
<SvgColor Name="Paint Shadow" Value="240,240,240"/>
|
||||
<SvgColor Name="Paint Deep Shadow" Value="230,230,230"/>
|
||||
<SvgColor Name="Brush" Value="72,70,68"/>
|
||||
<SvgColor Name="Brush High" Value="72,70,68"/>
|
||||
<SvgColor Name="Brush Light" Value="119,119,119"/>
|
||||
<SvgColor Name="Brush Major" Value="171,171,171"/>
|
||||
<SvgColor Name="Brush Minor" Value="210,210,210"/>
|
||||
<SvgColor Name="Accent Paint" Value="165,36,49"/>
|
||||
<SvgColor Name="Accent Paint Dark" Value="165,36,49"/>
|
||||
<SvgColor Name="Accent Paint Light" Value="250,220,221"/>
|
||||
<SvgColor Name="Accent Paint Lighter" Value="251,233,234"/>
|
||||
<SvgColor Name="Accent Brush" Value="255,255,255"/>
|
||||
<SvgColor Name="Accent Brush Light" Value="218,175,176"/>
|
||||
<SvgColor Name="Red" Value="237,61,59"/>
|
||||
<SvgColor Name="Green" Value="48,144,72"/>
|
||||
<SvgColor Name="Blue" Value="30,139,205"/>
|
||||
<SvgColor Name="Yellow" Value="251,152,59"/>
|
||||
<SvgColor Name="Black" Value="87,87,85"/>
|
||||
<SvgColor Name="Gray" Value="169,168,168"/>
|
||||
<SvgColor Name="White" Value="248,248,248"/>
|
||||
<SvgColor Name="Paint" Value="248,248,248" />
|
||||
<SvgColor Name="Paint High" Value="255,255,255" />
|
||||
<SvgColor Name="Paint Shadow" Value="240,240,240" />
|
||||
<SvgColor Name="Paint Deep Shadow" Value="230,230,230" />
|
||||
<SvgColor Name="Brush" Value="72,70,68" />
|
||||
<SvgColor Name="Brush High" Value="72,70,68" />
|
||||
<SvgColor Name="Brush Light" Value="119,119,119" />
|
||||
<SvgColor Name="Brush Major" Value="171,171,171" />
|
||||
<SvgColor Name="Brush Minor" Value="210,210,210" />
|
||||
<SvgColor Name="Accent Paint" Value="165,36,49" />
|
||||
<SvgColor Name="Accent Paint Dark" Value="165,36,49" />
|
||||
<SvgColor Name="Accent Paint Light" Value="250,220,221" />
|
||||
<SvgColor Name="Accent Paint Lighter" Value="251,233,234" />
|
||||
<SvgColor Name="Accent Brush" Value="255,255,255" />
|
||||
<SvgColor Name="Accent Brush Light" Value="218,175,176" />
|
||||
<SvgColor Name="Red" Value="237,61,59" />
|
||||
<SvgColor Name="Green" Value="48,144,72" />
|
||||
<SvgColor Name="Blue" Value="30,139,205" />
|
||||
<SvgColor Name="Yellow" Value="251,152,59" />
|
||||
<SvgColor Name="Black" Value="87,87,85" />
|
||||
<SvgColor Name="Gray" Value="169,168,168" />
|
||||
<SvgColor Name="White" Value="248,248,248" />
|
||||
</SvgPalette>
|
||||
</Skin>
|
||||
</CustomPaletteCollection>
|
||||
@ -87,9 +90,19 @@
|
||||
</DevExpress.LookAndFeel.Design.AppSettings>
|
||||
</applicationSettings>
|
||||
<connectionStrings>
|
||||
<add name="DD_Clipboard_Watcher.My.MySettings.DD_ECMConnectionString" connectionString="Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient"/>
|
||||
<add name="DD_Clipboard_Watcher.My.MySettings.DD_ECMConnectionString"
|
||||
connectionString="Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@ -124,33 +124,33 @@ Public Class ClassInit
|
||||
oCommonAppDataPath = oStartupPath
|
||||
End If
|
||||
|
||||
ConfigManager = New ConfigManager(Of ClassConfig)(LogConfig, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
|
||||
CONFIG = New ConfigManager(Of ClassConfig)(LogConfig, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
|
||||
|
||||
With ConfigManager.Config
|
||||
With CONFIG.Config
|
||||
MyConnectionString = DecryptConnectionString(.ConnectionString)
|
||||
LogErrorsOnly = .LogErrorsOnly
|
||||
HotkeySearchKey = .HotkeySearchKey
|
||||
LogConfig.Debug = Not .LogErrorsOnly
|
||||
End With
|
||||
If HotkeySearchKey_via_Server = False Then
|
||||
HotkeyFunctionKey = ConfigManager.Config.HotkeyFunctionKey
|
||||
HotkeyFunctionKey = CONFIG.Config.HotkeyFunctionKey
|
||||
End If
|
||||
If ConfigManager.Config.ConnectionStringAppServer <> String.Empty Then
|
||||
MyConStringAppserv = DecryptConnectionString(ConfigManager.Config.ConnectionStringAppServer)
|
||||
If CONFIG.Config.ConnectionStringAppServer <> String.Empty Then
|
||||
MyConStringAppserv = DecryptConnectionString(CONFIG.Config.ConnectionStringAppServer)
|
||||
If InitAppDatabase() Then
|
||||
Logger.Debug("ConnectionStringAppServer will be used")
|
||||
End If
|
||||
End If
|
||||
|
||||
If ConfigManager.Config.AppServerConfig <> String.Empty Then
|
||||
If CONFIG.Config.AppServerConfig <> String.Empty Then
|
||||
Try
|
||||
Dim oDynSplitCharacter As String
|
||||
If ConfigManager.Config.AppServerConfig.Contains(":") Then
|
||||
If CONFIG.Config.AppServerConfig.Contains(":") Then
|
||||
oDynSplitCharacter = ":"
|
||||
ElseIf ConfigManager.Config.AppServerConfig.Contains(";") Then
|
||||
ElseIf CONFIG.Config.AppServerConfig.Contains(";") Then
|
||||
oDynSplitCharacter = ";"
|
||||
End If
|
||||
Dim oSplit() As String = ConfigManager.Config.AppServerConfig.ToString.Split(oDynSplitCharacter)
|
||||
Dim oSplit() As String = CONFIG.Config.AppServerConfig.ToString.Split(oDynSplitCharacter)
|
||||
Dim oAppServerAddress As String = oSplit(0)
|
||||
Dim oAppServerPort As Integer = 9000
|
||||
If oSplit.Length = 2 Then
|
||||
@ -161,7 +161,7 @@ Public Class ClassInit
|
||||
If _Client.Connect() Then
|
||||
APPSERVER_ACTIVE = True
|
||||
Else
|
||||
Logger.Warn($"###!!!APPServer [{ConfigManager.Config.AppServerConfig.ToString}] could not be initialized ")
|
||||
Logger.Warn($"###!!!APPServer [{CONFIG.Config.AppServerConfig.ToString}] could not be initialized ")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@ -199,12 +199,6 @@ Public Class ClassInit
|
||||
Dim DT_CHECKUSER_MODULE As DataTable
|
||||
DT_CHECKUSER_MODULE = _DataASorDB.GetDatatable(oSql, "TBDD_USER_MODULE", $"USERNAME = '{USER_USERNAME.ToLower}' AND MODULE_SHORT = 'CW'", "", "")
|
||||
|
||||
'If APPSERVER_ACTIVE = True Then
|
||||
' Dim oTableResult As TableResult = _Client.GetDatatableByName("TBDD_USER_MODULE", $"USERNAME = '{USER_USERNAME.ToLower}' AND MODULE_SHORT = 'CW'")
|
||||
' DT_CHECKUSER_MODULE = oTableResult.Table
|
||||
'Else
|
||||
' DT_CHECKUSER_MODULE = Database.GetDatatable(oSql)
|
||||
'End If
|
||||
If DT_CHECKUSER_MODULE.Rows.Count = 0 Then
|
||||
Logger.Info("DT_CHECKUSER_MODULE.Rows.Count = 0", True)
|
||||
'ERROR_STATE = "NO USER"
|
||||
@ -220,7 +214,14 @@ Public Class ClassInit
|
||||
USER_PRENAME = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_PRENAME"), "")
|
||||
USER_SHORTNAME = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME"), "")
|
||||
USER_EMAIL = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL"), "")
|
||||
USER_LANGUAGE = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE"), "de-DE")
|
||||
|
||||
If My.Settings.SYS_Override_Language <> String.Empty Then
|
||||
USER_LANGUAGE = My.Settings.SYS_Override_Language
|
||||
Logger.Info("Override Language [{0}] from Config will be used!", USER_LANGUAGE)
|
||||
Else
|
||||
USER_LANGUAGE = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE"), "de-DE")
|
||||
End If
|
||||
|
||||
USER_DATE_FORMAT = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT"), "dd.MM.yyyy")
|
||||
USER_IN_MODULE = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("MODULE_ACCESS"), False)
|
||||
USER_IS_ADMIN = NotNull(DT_CHECKUSER_MODULE.Rows(0).Item("IS_ADMIN"), False)
|
||||
@ -361,7 +362,8 @@ Public Class ClassInit
|
||||
oSQL = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE = 'Clipboard-Watcher'"
|
||||
Database.ExecuteNonQuery(oSQL)
|
||||
|
||||
oSQL = String.Format("INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,CLIENT_ID,MODULE,VERSION_CLIENT,MACHINE_NAME) VALUES ({0},{1},'Clipboard-Watcher','{2}','{3}')", USER_ID, 0, My.Application.Info.Version.ToString, Environment.MachineName)
|
||||
oSQL = String.Format("INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,CLIENT_ID,MODULE,VERSION_CLIENT,MACHINE_NAME,LANGUAGE_OVERRIDE) VALUES
|
||||
({0},{1},'Clipboard-Watcher','{2}','{3}','{4}')", USER_ID, 0, My.Application.Info.Version.ToString, Environment.MachineName, My.Settings.SYS_Override_Language)
|
||||
Database.ExecuteNonQuery(oSQL)
|
||||
|
||||
If USER_IS_ADMIN = True Then
|
||||
|
||||
@ -142,8 +142,8 @@
|
||||
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.11\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.0.2\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.6.0.4")>
|
||||
<Assembly: AssemblyVersion("2.6.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@ -91,6 +91,15 @@ Namespace My
|
||||
Return CType(Me("DD_ECMConnectionString"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public ReadOnly Property SYS_Override_Language() As String
|
||||
Get
|
||||
Return CType(Me("SYS_Override_Language"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -19,5 +19,8 @@
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="SYS_Override_Language" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -39,8 +39,8 @@ Public Class frmConfig_Basic
|
||||
End If
|
||||
|
||||
'SaveConfigValue("MyConnectionString", con)
|
||||
ConfigManager.Config.ConnectionString = con
|
||||
ConfigManager.Save()
|
||||
CONFIG.Config.ConnectionString = con
|
||||
CONFIG.Save()
|
||||
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
@ -148,8 +148,8 @@ Public Class frmConfig_Basic
|
||||
LogErrorsOnly = chkLogErrorsOnly.Checked
|
||||
LogConfig.Debug = Not LogErrorsOnly
|
||||
|
||||
ConfigManager.Config.LogErrorsOnly = LogErrorsOnly
|
||||
ConfigManager.Save()
|
||||
CONFIG.Config.LogErrorsOnly = LogErrorsOnly
|
||||
CONFIG.Save()
|
||||
End Sub
|
||||
|
||||
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged
|
||||
@ -181,9 +181,9 @@ Public Class frmConfig_Basic
|
||||
If cmbfunctionHit.SelectedIndex <> -1 Then
|
||||
Hotkey.RemoveHotKey(ClassConstants.HOTKEY_TRIGGER_WATCHER)
|
||||
|
||||
ConfigManager.Config.HotkeyFunctionKey = cmbfunctionHit.Text
|
||||
ConfigManager.Config.HotkeySearchKey = txtHotkeySearchKey.Text
|
||||
ConfigManager.Save()
|
||||
CONFIG.Config.HotkeyFunctionKey = cmbfunctionHit.Text
|
||||
CONFIG.Config.HotkeySearchKey = txtHotkeySearchKey.Text
|
||||
CONFIG.Save()
|
||||
|
||||
Dim keyCode As Keys
|
||||
Dim kc As New KeysConverter
|
||||
|
||||
@ -363,8 +363,8 @@ Public Class frmMain
|
||||
}
|
||||
|
||||
Dim oService As New State.ServiceState() With {
|
||||
.Address = ConfigManager.Config.AppServerConfig,
|
||||
.IsActive = ConfigManager.Config.IsIDB,
|
||||
.Address = CONFIG.Config.AppServerConfig,
|
||||
.IsActive = CONFIG.Config.IsIDB,
|
||||
.IsOnline = False,
|
||||
.Client = _Client
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ Module modCurrent
|
||||
Public Const LANGUAGE_GERMAN As String = "de-DE"
|
||||
|
||||
|
||||
Public ConfigManager As ConfigManager(Of ClassConfig)
|
||||
Public CONFIG As ConfigManager(Of ClassConfig)
|
||||
|
||||
Public MyConnectionString As String = ""
|
||||
Public MyConStringAppserv As String = ""
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.7.11" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.2" targetFramework="net462" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user