コード例 #1
0
        private void btn_addfood_Click(object sender, EventArgs e)
        {
            MyForm.FoodManagement.EditDetailForm editDetailForm = new MyForm.FoodManagement.EditDetailForm(-1, list);
            editDetailForm.StartPosition = FormStartPosition.CenterScreen;
            int yHeight = SystemInformation.PrimaryMonitorSize.Height;

            editDetailForm.Height = yHeight;
            editDetailForm.ShowDialog();
        }
コード例 #2
0
        /// <summary>
        /// 编辑按钮
        /// </summary>
        /// <param name="FoodId">菜品ID</param>
        private void ContextBtnEdit_Click(string FoodId)
        {
            MyForm.FoodManagement.EditDetailForm editDetailForm = new MyForm.FoodManagement.EditDetailForm(Convert.ToInt32(FoodId), list);
            editDetailForm.StartPosition = FormStartPosition.CenterScreen;
            int yHeight = SystemInformation.PrimaryMonitorSize.Height;

            editDetailForm.Height = yHeight;
            editDetailForm.ShowDialog();
        }