コード例 #1
0
ファイル: RefrigeratorUi.cs プロジェクト: TajdikAhamed/237511
        private void EnterButton_Click(object sender, EventArgs e)
        {
            int    itemQ  = Convert.ToInt32(itemTextBox.Text);
            double Weight = Convert.ToDouble(weightTextBox.Text);

            bool flag = Refrigerator.PutItems(itemQ, Weight);

            if (flag)
            {
                Show();
            }
            else
            {
                MessageBox.Show("Your given amount can’t be entered because it will be over flown.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }