private void buttonEnter_Click(object sender, EventArgs e) { //_refrigerator.ItemNo = Convert.ToInt32(textBoxNumberOfItems.Text); //_refrigerator.ItemWeight = Convert.ToDouble(textBoxWeightKGUnit.Text); textBoxCurrentWeight.Text = _refrigerator.GetCurrentWeight(Convert.ToInt32(textBoxNumberOfItems.Text), Convert.ToDouble(textBoxWeightKGUnit.Text)).ToString(); textBoxRemainingWeight.Text = _refrigerator.GetRemainingWeight(Convert.ToInt32(textBoxNumberOfItems.Text), Convert.ToDouble(textBoxWeightKGUnit.Text)).ToString(); textBoxNumberOfItems.Text = ""; textBoxWeightKGUnit.Text = ""; if (_refrigerator.MaximumWeight <= -1) { MessageBox.Show("Items Number and Weight Overload!"); } }