private void btn_showProjectInfo_Click(object sender, EventArgs e) { if (dgv_projectInfos.SelectedRows.Count == 0) { AppUtils.NotifyUserInvalidOperation("No project is selected."); return; } ProjectInfo projectInfo = GetSelectedProjectInfo(); if (projectInfo == null) { return; } var viewProjectInfoForm = new ViewProjectInfoForm(); viewProjectInfoForm.LoadProjectInfo(projectInfo); viewProjectInfoForm.ShowDialog(this); }