Projekte können nun erzeugt werden und geladen werden
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Win32;
|
||||
using KlassenBIB;
|
||||
using Microsoft.Win32;
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -31,6 +32,17 @@ namespace SanSystem
|
||||
projektpfad = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetProjekt(Projekt projekt)
|
||||
{
|
||||
Database.Datenbank.Instance.SaveProjekt();
|
||||
this.ProjektNummer = projekt.Nummer;
|
||||
Database.Datenbank.Instance.loadedProjekt = null;
|
||||
|
||||
if (!Directory.Exists(Projektpfad)) Directory.CreateDirectory(Projektpfad);
|
||||
Database.Datenbank.Instance.InitProjekt(projekt, Projektpfad);
|
||||
}
|
||||
|
||||
public string Projektpfad
|
||||
{
|
||||
get
|
||||
@@ -48,6 +60,17 @@ namespace SanSystem
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeProjekt(string projektnummer)
|
||||
{
|
||||
Database.Datenbank.Instance.SaveProjekt();
|
||||
this.ProjektNummer = projektnummer;
|
||||
Database.Datenbank.Instance.loadedProjekt = null;
|
||||
|
||||
string pfad = Path.Combine(Projektpfad);
|
||||
if (!Directory.Exists(pfad)) Directory.CreateDirectory(pfad);
|
||||
Database.Datenbank.Instance.LoadProjekt(ProjektNummer, Projektpfad);
|
||||
}
|
||||
|
||||
void LadeRegistry()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user