Esempio n. 1
0
        private void LoadDishesButtonsInSections()
        {
            DishInfo_pnl.Visible = true;
            DishInfo_pnl.BringToFront();

            foreach (XElement xe in (XDocument.Load(XmlParser.xmlDishPath).XPathSelectElements("//Dish")))
            {
                if (xe.Element("Type").Value.Equals("Appetizer"))
                {
                    AddButtonToCategoryAppetizer(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Main"))
                {
                    AddButtonToCategoryMain(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Dessert"))
                {
                    AddButtonToCategoryDessert(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Drink"))
                {
                    AddButtonToCategoryDrink(xe.Element("Name").Value);
                }
            }
        }
Esempio n. 2
0
        private void LoadDishesButtonsInSections()
        {
            //DataSet DishLoad = new DataSet();
            //DishLoad.ReadXml(XmlParser.xmlDishPath);
            //for (int i = 1; i <= CountDishesInXml("//Dish", XmlParser.xmlDishPath); i++)
            //{

            //}
            //xpath //Type[text()="Main"]
            //foreach (XElement xe in (XDocument.Load(XmlParser.xmlDishPath).Descendants("Dish")))
            DishInfo_pnl.Visible = true;
            DishInfo_pnl.BringToFront();

            foreach (XElement xe in (XDocument.Load(XmlParser.xmlDishPath).XPathSelectElements("//Dish")))
            {
                if (xe.Element("Type").Value.Equals("Appetizer"))
                {
                    AddButtonToCategoryAppetizer(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Main"))
                {
                    AddButtonToCategoryMain(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Dessert"))
                {
                    AddButtonToCategoryDessert(xe.Element("Name").Value);
                }
                else if (xe.Element("Type").Value.Equals("Drink"))
                {
                    AddButtonToCategoryDrink(xe.Element("Name").Value);
                }
            }
        }
Esempio n. 3
0
 private void appetizer_tab_Click(object sender, EventArgs e)
 {
     DishInfo_pnl.BringToFront();
     DishInfo_pnl.Visible = true;
 }
Esempio n. 4
0
 private void tabPage2_Click(object sender, EventArgs e)
 {
     DishInfo_pnl.BringToFront();
     DishInfo_pnl.Visible = true;
 }