Example #1
0
        }/*private void PerformSideViewFormatting()*/

        /// <summary>
        /// Parses the BeverageView into strings suitable for display. If the Meal doesn't have a Beverage,
        /// an empty Beverage would be returned from the GetBeverageForDisplay() call, which would
        /// subsequently failed to enter the if statement.
        /// </summary>
        /// <remarks>
        /// NAME: PerformBeverageViewFormatting
        /// AUTHOR: Ryan Osgood
        /// DATE: 8/15/2019
        /// </remarks>
        private void PerformBeverageViewFormatting()
        {
            BeverageView bv = GetBeverageForDisplay();

            if (!bv.GetFormattedDetailsForDisplay().Equals(""))
            {
                m_mealDisplay.Add(bv.GetFormattedDetailsForDisplay());
                m_mealDisplay.Add(m_lineBreakForParsing);
            }
        }/*private void PerformBeverageViewFormatting()*/
Example #2
0
        }/*private void SendVoidCommandForSide(int a_mealIndex)*/

        /// <summary>
        /// Handles the composing of the void command for an Beverage item. Parses the selected
        /// Beverage's view and sends it to the KitchenScreenClient.
        /// </summary>
        /// <remarks>
        /// NAME: SendVoidCommandForBeverage
        /// AUTHOR: Ryan Osgood
        /// DATE: 9/1/2019
        /// </remarks>
        /// <param name="a_mealIndex">The index of the meal of which exists the beverage to void.</param>
        private void SendVoidCommandForBeverage(int a_mealIndex)
        {
            Beverage     targetBeverage = m_customerChecks[m_currentlySelectedTab].GetMealAtIndex(a_mealIndex).GetBeverage();
            BeverageView targetSideView = new BeverageView(targetBeverage);

            List <string> attributesOfVoid = new List <string> {
                targetSideView.GetFormattedDetailsForDisplay()
            };

            attributesOfVoid.Insert(0, m_customerChecks[m_currentlySelectedTab].Name + '\n');
            attributesOfVoid.Insert(1, m_customerChecks[m_currentlySelectedTab].GetCheckGUID() + '\n');
            attributesOfVoid.Insert(2, "VOID" + '\n');
            string toBeSent = string.Join(string.Empty, attributesOfVoid);

            m_server.SendToAll(toBeSent);
            UpdateDisplay();
        }/*private void SendVoidCommandForBeverage(int a_mealIndex)*/