aboutsummaryrefslogtreecommitdiff
blob: 42f7c91fa9dbb71443c22d9e62e5c0530c78a247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using KukaPizza.Controllers;

namespace KukaPizza.Views
{
    public class MainView : View
    {
        private MainController _controller;
        public MainView(MainController controller)
        {
            _controller = controller;
            Init(_controller);
            
        }
        protected override void Draw()
        {
            Console.Write(@"



 __  __           __                   ____                                   
/\ \/\ \         /\ \                 /\  _`\   __                            
\ \ \/'/'  __  __\ \ \/'\      __     \ \ \L\ \/\_\  ____    ____      __     
 \ \ , <  /\ \/\ \\ \ , <    /'__`\    \ \ ,__/\/\ \/\_ ,`\ /\_ ,`\  /'__`\   
  \ \ \\`\\ \ \_\ \\ \ \\`\ /\ \L\.\_   \ \ \/  \ \ \/_/  /_\/_/  /_/\ \L\.\_ 
   \ \_\ \_\ \____/ \ \_\ \_\ \__/.\_\   \ \_\   \ \_\/\____\ /\____\ \__/.\_\
    \/_/\/_/\/___/   \/_/\/_/\/__/\/_/    \/_/    \/_/\/____/ \/____/\/__/\/_/




    1. Order a pizza
    2. Check orders
    
    0. Exit         



================================================================================
                 Copyright © 2019 Marcin Zelent & Paulius Klezys
================================================================================");
        }

        protected override void Interact()
        {
            int choice = 0;

            do
            {
                choice = Console.ReadKey(true).KeyChar;

                switch (choice)
                {
                    case '1':
                        _controller.OpenOrderPizza();
                        break;
                    case '2':
                        _controller.OpenCheckOrders();
                        break;
                }

                Draw();
            } while (choice != '0');

            if (choice == '0') _controller.Close();
        }
    }
}