예제 #1
0
        public MainWindow()
        {
            Lieferdienst ldf = new Lieferdienst();

            ldf.bestellen(new Pizza {
                size = "klein", belag = new String[] { "Salami", "Käse" }.ToList(), fertig = true
            });
            ldf.bestellen(new Pizza {
                size = "groß", belag = new String[] { "Schinken", "Käse" }.ToList(), fertig = false
            });
            ldf.bestellen(new Pizza {
                size = "mittel", belag = new String[] { "Peperoni", "Käse" }.ToList(), fertig = true
            });

            this.DataContext = ldf.getAlle();
            InitializeComponent();
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();
            ld = new Lieferdienst();
            ld.bestellen(new Pizza {
                Size = "Klein", Belag = new String[] { "Salami", "Käse" }.ToList(), Fertig = true, Sonder = ""
            });
            ld.bestellen(new Pizza {
                Size = "Mittel", Belag = new String[] { "Ananas", "Schinken", "Peperoni" }.ToList(), Fertig = false, Sonder = ""
            });
            ld.bestellen(new Pizza {
                Size = "Klein", Belag = new String[] { "Feige", "Honig" }.ToList(), Fertig = true, Sonder = ""
            });

            this.DataContext   = ld.getAlle();
            label2.DataContext = ld.getUmsatz();

            //Eine Methode soll parallel ausgeführt werden
            System.Threading.Thread clock = new System.Threading.Thread(ticktack);
            //  clock.Start();
        }