コード例 #1
0
        private void CashPayment_Load(object sender, EventArgs e)
        {
            remainingPayment = 0;
            foreach (ShoppedItem shoppedItem in OrderInfo.Instance.shoppedItemList)
            {
                remainingPayment += shoppedItem.price;
            }
            foreach (Recipe recipe in OrderInfo.Instance.changedRecipe)
            {
                remainingPayment += (recipe.Amount * DataRepository.Grocery.Get(recipe.GroceryId).Price);
            }
            SetInstructionText(remainingPayment);
            while (remainingPayment > 0)
            {
                remainingPayment += -1000;
                SetInstructionText(remainingPayment);
                Delay(1000);
            }

            if (remainingPayment < 0)
            {
                lbcInstruction.Text = $"거스름돈은 {remainingPayment}원입니다.";
            }

            EndPage endPage = new EndPage();

            endPage.Show();
            Close();
        }
コード例 #2
0
        private void btnPay_Click(object sender, EventArgs e)
        {
            EndPage endPage = new EndPage();

            Close();
            endPage.Show();
        }