示例#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.listView1.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());
            }
        }
示例#2
0
        private void RemoveMatchFromLV(RemoveCase removeCase)
        {
            if (this.listView1.Items.Count == 0 || this.listView1.SelectedItems.Count == 0)
            {
                return;
            }

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

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

            this.pictureBox1.Image = null;
            this.pictureBox2.Image = null;
            this.listView1.SelectedItems[0].Remove();

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

            this.TempOfRemoved.Add(leftMatch, rightMatch);
        }
示例#3
0
        private void ClearTemp()
        {
            this.MakeStuffButton.Enabled = true;
            this.ToggleButtons(false);

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

            this.pictureBox1.Image = null;
            this.pictureBox2.Image = null;
            this.listView1.Items.Clear();

            this.LightHashes.Clear();
            this.DarkHashes.Clear();
            this.Matches.Clear();

            this.FolderLabel.Text = "FolderLabel";
            this.Hash_label.Text  = "Hash_label";
            this.LightLabel.Text  = "LightLabel";
            this.DarkLabel.Text   = "DarkLabel";
            this.ResultLabel.Text = "ResultLabel";
            this.DoubleLabel.Text = "DoubleLabel";
        }
示例#4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     FoldingHelpers.DeleteTempFolder(this.FolderPath);
 }