示例#1
0
        public Form1()
        {
            InitializeComponent();
            MenuMaker menu = new MenuMaker()
            {
                Randomizer = new Random()
            };

            label1.Text = menu.GetMenuItem();
            label2.Text = menu.GetMenuItem();
            label3.Text = menu.GetMenuItem();
        }
示例#2
0
 static void Main(string[] args)
 {
     while (true)
     {
         Console.Clear();
         Console.Title = "Mithril - Hotel Booking (Main Menu) (Unregistered)";
         new string[] {
             "Search Customer",
             "Register new Customer",
             "Room Booking",
             "Details",
             "Checkout details"
         }.CreateOption(new Action <int, string>((num, opt) =>
         {
             Debug.WriteLine(opt);
             Console.Clear();
             MenuMaker.CreateCustomerMenu();
             Console.Title = $"Mithril - Hotel Booking ({opt}) (Unregistered)";
             Console.ReadLine();
         }));
     }
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MenuMaker menuMaker = FindResource("menuMaker") as MenuMaker;

            menuMaker.UpdateMenu();
        }
 public MenuServiceImpl(IHostingEnvironment hostingEnvironment, MenuRepository menuRepository, MenuMaker menuMaker)
 {
     _menuRepository     = menuRepository;
     _menuMaker          = menuMaker;
     _hostingEnvironment = hostingEnvironment;
 }