HeapProfiler.DiffViewer.SaveDiffMenu_Click C# (CSharp) Method

SaveDiffMenu_Click() private method

private SaveDiffMenu_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void SaveDiffMenu_Click(object sender, EventArgs e)
        {
            using (var dialog = new SaveFileDialog()) {
                dialog.Title = "Save Diff";
                dialog.Filter = "Heap Diffs|*.heapdiff";
                dialog.AddExtension = true;
                dialog.CheckPathExists = true;
                dialog.DefaultExt = ".heapdiff";

                if (dialog.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
                    return;

                File.Copy(Filename, dialog.FileName, true);
                Filename = dialog.FileName;
                Text = "Diff Viewer - " + Filename;
            }
        }