Datenbank ausgelagert, außerhalb des Ordners
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="SanSystem.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
@@ -19,4 +24,11 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<SanSystem.Properties.Settings>
|
||||
<setting name="DATABASEMAIN" serializeAs="String">
|
||||
<value>C:\</value>
|
||||
</setting>
|
||||
</SanSystem.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace SanSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(speicherpfad_to_projekts, projektpfad);
|
||||
return Path.Combine(Properties.Settings.Default.DATABASEMAIN,speicherpfad_to_projekts, projektpfad);
|
||||
}
|
||||
}
|
||||
public ILanguage language = null;
|
||||
|
||||
12
SanSystem/Properties/Settings.Designer.cs
generated
12
SanSystem/Properties/Settings.Designer.cs
generated
@@ -22,5 +22,17 @@ namespace SanSystem.Properties {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("C:\\")]
|
||||
public string DATABASEMAIN {
|
||||
get {
|
||||
return ((string)(this["DATABASEMAIN"]));
|
||||
}
|
||||
set {
|
||||
this["DATABASEMAIN"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SanSystem.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="DATABASEMAIN" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">C:\</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -30,8 +30,11 @@ namespace SanSystem
|
||||
public frmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
string sx = Properties.Settings.Default.DATABASEMAIN;
|
||||
|
||||
|
||||
Datenbank.Instance.pfad = sx;
|
||||
Datenbank.Instance.Init();
|
||||
if (!Directory.Exists(Global.Instance.Projektpfad)) Directory.CreateDirectory(Global.Instance.Projektpfad);
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user