private void btnGray_Click(object sender, EventArgs e) { if (OriginalForm != null) { Bitmap copy = new Bitmap(PicOriginal); Processing.ConvertToGray(copy); PicResult = copy; if (ResultForm == null || ResultForm.Visible == false) { ResultForm = new ResultForm(); ResultForm.Show(); } else { OriginalForm.ReloadImage(); } } }
private void btnOpen_Click(object sender, EventArgs e) { OpenFileDialog openFile = new OpenFileDialog(); openFile.Filter = "Image File (*.bmp, *.jpg)|*.bmp; *.jpg"; if (DialogResult.OK == openFile.ShowDialog()) { PicOriginal = new Bitmap(openFile.FileName); if (OriginalForm == null || OriginalForm.Visible == false) { OriginalForm = new OriginalForm(); OriginalForm.Show(); } else { OriginalForm.ReloadImage(); } } }