private void searchFilesWithSameLengthToolStripMenuItem_Click(object sender, EventArgs e) { FolderBrowserDialog ofd = new FolderBrowserDialog(); if (ofd.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; DirectoryInfo dir = new DirectoryInfo(ofd.SelectedPath); filesWithSameLength = new GroupFilesBySize(dir, this); toolStripStatusLabel1.Text = "files are being searched in "+dir; filesWithSameLength.searchFilesWithSameLengthInNewThread(); }
private void loadInfoAboutFilesWithSameLengthToolStripMenuItem1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.FileName = "*.fs"; if (ofd.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; string filename = ofd.FileName; // Restore from file FileStream stream = File.OpenRead(filename); filesWithSameLength = (GroupFilesBySize)formatter.Deserialize(stream); stream.Close(); rootTreeNodeAdded(); }