private void bCancelAddingIssue_Click(object sender, EventArgs e) { AddIssue addissueform = new AddIssue(); addissueform.FormClosing += new FormClosingEventHandler(this.AddIssue_FormClosing); addissueform.ShowDialog(); }
private void pbMap_Click(object sender, EventArgs e) { Thread.Sleep(500); AddIssue newMdiChildEdit = new AddIssue(); try { var project2 = Projects.project; if (project2 != null) { //((AddIssue)newMdiChildEdit).tbProjectInfoGeneralInIssueForm.Text = project2.id.ToString() + "; "; ((AddIssue)newMdiChildEdit).tbProjectInfoGeneralInIssueForm.Text += project2.ProjectName.ToString().Trim() + "; "; ((AddIssue)newMdiChildEdit).tbProjectInfoGeneralInIssueForm.Text += project2.ProjectAddress.ToString().Trim() + "; "; ((AddIssue)newMdiChildEdit).tbProjectInfoGeneralInIssueForm.Text += project2.ProjectCompany.ToString().Trim(); ((AddIssue)newMdiChildEdit).tbProjectInfoGeneralInIssueForm.Text += " (" + project2.ProjectState.ToString().Trim() + ")"; ((AddIssue)newMdiChildEdit).tbProjectInfoDateInInIssueForm.Text += Regex.Replace(project2.ProjectDateIn.ToString(), @"\s(.*)", string.Empty, RegexOptions.IgnoreCase); ((AddIssue)newMdiChildEdit).tbProjectInfoDateOutInIssueForm.Text += Regex.Replace(project2.ProjectDateOut.ToString(), @"\s(.*)", string.Empty, RegexOptions.IgnoreCase); newMdiChildEdit.ShowDialog(); } } catch { Close(); } }