Пример #1
0
        private void MainForm_DragDrop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

            foreach (string file in files)
            {
                bool flagPass = false;
                if (Directory.Exists(file.ToString()))
                {
                    folderBrowserDialog1.SelectedPath = file.ToString();
                    flagPass = true;
                }
                if (File.Exists(file.ToString()))
                {
                    FileInfo ddFile = new FileInfo(file.ToString());
                    folderBrowserDialog1.SelectedPath = ddFile.Directory.FullName.ToString();
                    flagPass = true;
                }
                if (flagPass)
                {
                    RenameUtils.PopulateFiles(lvFilesLeft, tbSearchPatternLeft.Text, folderBrowserDialog1);
                    RenameUtils.PopulateFiles(lvFilesRight, tbSearchPatternRight.Text, folderBrowserDialog1);
                    LogUtils.AddLogTextLine("Populating form with content from path: " + RenameUtils.GetFullPath(folderBrowserDialog1).ToString());
                    break;
                }
            }
        }
Пример #2
0
 private void LoadTargetDirectory(bool autoDetetect)
 {
     RenameUtils.PopulateFiles(lvFilesLeft, tbSearchPatternLeft.Text, folderBrowserDialog1);
     RenameUtils.PopulateFiles(lvFilesRight, tbSearchPatternRight.Text, folderBrowserDialog1);
     LogUtils.AddLogTextLine("Populating form with content from path: " + RenameUtils.GetFullPath(folderBrowserDialog1).ToString());
     if (autoDetetect)
     {
         AutoDetectAutoMatchListViews();
     }
 }
Пример #3
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     LogUtils.AddLogTextLine("Application closed.");
 }
Пример #4
0
 private void Match()
 {
     renameUtils.MatchLeftRight(lvFilesLeft, lvFilesRight);
     LogUtils.AddLogTextLine("Manually matched files");
 }
Пример #5
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     LogUtils.AddLogTextLine("Application opened.");
     LoadTargetDirectory(false);
 }