Files
Kanalsanierungsverwaltung/SanSystem/frmMain.cs
2018-05-16 21:26:59 +02:00

55 lines
1.4 KiB
C#

using Database;
using KlassenBIB;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SanSystem
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
Datenbank.Instance.LoadProjekt("projekt1.xaml");
this.Width = Screen.PrimaryScreen.WorkingArea.Width;
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
this.StartPosition = FormStartPosition.Manual;
this.Location = new Point(0, 0);
}
private void button1_Click(object sender, EventArgs e)
{
Projekt projekt = Datenbank.Instance.loadedProjekt;
AdresseCollection adressen = projekt.Adressen;
adressen[0].Objekte.Add(new Inspektionsobjekt()
{
Objektbezeichnung = "SW01"
});
Datenbank.Instance.SaveProjekt();
}
private void frm_main_Load(object sender, EventArgs e)
{
frmStrassenList strassenList = new frmStrassenList();
strassenList.MdiParent = this;
strassenList.Show();
}
private void frm_main_FormClosing(object sender, FormClosingEventArgs e)
{
Datenbank.Instance.SaveProjekt();
}
}
}