void btnSave_Click(object sender, EventArgs e) { var result = TripleMerger.Merge(original, one, two); using (var saveFileDialog1 = new SaveFileDialog()) { try { saveFileDialog1.Title = "Triple Merge - SAVE File"; saveFileDialog1.FilterIndex = 1; if (saveFileDialog1.ShowDialog() == DialogResult.OK && saveFileDialog1.FileName != string.Empty) { File.WriteAllLines(saveFileDialog1.FileName, result); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error Save File"); } } }
void btnMerge_Click(object sender, EventArgs e) { var result = TripleMerger.Merge(original, one, two); txbResult.Text = string.Join("\r\n", result); }