コード例 #1
0
ファイル: MainForm.cs プロジェクト: pigovsky/T0
        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();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: pigovsky/T0
        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();
        }