Files
Kanalsanierungsverwaltung/SanSystem/frmMain.cs
Husky e0d7cf03d1 Temperatur Can
Bindings hergestellt
2018-06-24 17:49:34 +02:00

60 lines
1.6 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.WindowState = FormWindowState.Maximized;
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();
//frmObjektEdit frmObjektEdit = new frmObjektEdit();
//frmObjektEdit.Show();
}
private void frm_main_FormClosing(object sender, FormClosingEventArgs e)
{
Datenbank.Instance.SaveProjekt();
}
}
}