Example #1
0
        private void RetrieveButton_Click(object sender, EventArgs e)
        {
            if (this.TempOfRemoved.Count > 0)
            {
                string leftMatch  = this.TempOfRemoved.Keys.Last();
                string rightMatch = this.TempOfRemoved.Values.Last();

                this.DuplImagesListView.Items.Add(new ListViewItem(new[] { leftMatch, rightMatch }));

                FoldingHelpers.MoveIfExists($"{this.FolderPath}\\TempFolder\\{leftMatch}", $"{this.FolderPath}\\{leftMatch}");
                FoldingHelpers.MoveIfExists($"{this.FolderPath}\\TempFolder\\{rightMatch}", $"{this.FolderPath}\\{rightMatch}");

                this.TempOfRemoved.Remove(this.TempOfRemoved.Keys.Last());
            }
        }
Example #2
0
        //// Comparing funcs
        ///

        private void ClearTemp()
        {
            this.MakeStuffToolStripMenuItem.Enabled = true;
            this.ToggleButtons(false);

            FoldingHelpers.DeleteTempFolder(FolderPath);
            this.FolderPath = "";
            this.isChecked  = false;

            this.LeftDuplPictureBox.Image  = null;
            this.RightDuplPictureBox.Image = null;
            this.DuplImagesListView.Items.Clear();

            this.LightHashes.Clear();
            this.DarkHashes.Clear();
            this.Matches.Clear();
        }
Example #3
0
        private void RemoveMatchFromLV(RemoveCase removeCase)
        {
            if (this.DuplImagesListView.Items.Count == 0 || this.DuplImagesListView.SelectedItems.Count == 0)
            {
                return;
            }

            FoldingHelpers.CheckTemp(this.FolderPath, this.TempOfRemoved);

            string leftMatch  = DuplImagesListView.SelectedItems[0].SubItems[0].Text;
            string rightMatch = DuplImagesListView.SelectedItems[0].SubItems[1].Text;

            this.LeftDuplPictureBox.Image  = null;
            this.RightDuplPictureBox.Image = null;
            this.DuplImagesListView.SelectedItems[0].Remove();

            FoldingHelpers.RemoveSelectedFiles(removeCase, this.FolderPath, leftMatch, rightMatch);

            this.TempOfRemoved.Add(leftMatch, rightMatch);
        }
Example #4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     FoldingHelpers.DeleteTempFolder(this.FolderPath);
 }