83 lines
2.4 KiB
C#
83 lines
2.4 KiB
C#
using Database;
|
|
using FluentFTP;
|
|
using KlassenBIB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SanSystem
|
|
{
|
|
public partial class frmMain : Form
|
|
{
|
|
|
|
public frmMain()
|
|
{
|
|
InitializeComponent();
|
|
|
|
|
|
if (!Directory.Exists(Global.Instance.Projektpfad)) Directory.CreateDirectory(Global.Instance.Projektpfad);
|
|
Datenbank.Instance.LoadProjekt("18-850", Global.Instance.Projektpfad);// Path.Combine(Global.Instance.Projektpfad,"18-850.xaml"));
|
|
|
|
|
|
//Datenbank.Instance.CreateProjekt("");
|
|
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);
|
|
|
|
projektToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt"];
|
|
neuToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_new"];
|
|
öffnenToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_open"];
|
|
|
|
toolStripStatus_projekt_Label.Text = Datenbank.Instance.projekt;
|
|
}
|
|
|
|
|
|
|
|
|
|
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();
|
|
}
|
|
|
|
private void neuToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void öffnenToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
//
|
|
frmProjektList frmProjektList = new frmProjektList();
|
|
frmProjektList.ShowDialog();
|
|
}
|
|
|
|
private void speichernToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
Datenbank.Instance.SaveProjekt();
|
|
}
|
|
}
|
|
}
|