Esempio n. 1
0
        }/*private void PerformEntreeViewFormatting()*/

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

            if (!sv.GetFormattedDetailsForDisplay().Equals(""))
            {
                m_mealDisplay.Add(sv.GetFormattedDetailsForDisplay());
                m_mealDisplay.Add(m_lineBreakForParsing);
            }
        }/*private void PerformSideViewFormatting()*/
Esempio n. 2
0
        }/*private void SendVoidCommandForEntree(int a_mealIndex)*/

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

            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 SendVoidCommandForSide(int a_mealIndex)*/