Esempio n. 1
0
 public Bitch(DirectoryInfo cute, Bitch breeder)
 {
     parent = breeder;
     init(cute);
 }
Esempio n. 2
0
        void Fill()
        {
            Blimp.Swell(txtBefore.Text, txtAfter.Text,
                        chkSearch.Checked, chkFolderName.Checked,
                        chkDuplicates.Checked, chkExtChecker.Checked, chkForce.Checked);
            List <string[]> pigs = new List <string[]>();

            if (chkNameSwap.Checked && File.Exists(pimp))
            {
                using (StreamReader sr = new StreamReader(pimp))
                { string line;
                  bool   begin = false;
                  while ((line = sr.ReadLine()) != null)
                  {
                      if (!begin)
                      {
                          if (Regex.IsMatch(line, "-{3,}"))
                          {
                              begin = true;
                          }
                          continue;
                      }
                      string[] names = line.Split(',');
                      if (names.Length > 1)
                      {
                          pigs.Add(names);
                      }
                  }
                }
            }
            Blimp.bigs = pigs;

            pbar.Value        = 0;
            btnRescan.Enabled = btnRemove.Enabled = btnRecycle.Enabled = false;
            lsvBlimps.Items.Clear();

            if (chkSubFolders.Checked)
            {
                Bitch.Burst();
                Bitch moar = new Bitch(bitchz);
                pbar.Maximum = moar.fam.Count;
                fatties      = Bloated(moar.fam);
            }
            else
            {
                List <FileInfo> hoez = bitchz.GetFiles().ToList();
                pbar.Maximum = hoez.Count;
                fatties      = Bloated(hoez);
            }

            foreach (Blimp mate in fatties)
            {
                ListViewItem mass = new ListViewItem(mate.mod.ToString());
                mass.SubItems.AddRange(new string[]
                                       { mate.big, mate.sml, mate.isTaut.ToString(), mate.hasTwin.ToString() });

                if (mate.hasTwin)                 // has a (1) in the name
                {
                    mass.BackColor = Color.LightSkyBlue;
                }

                else if (mate.isTaut)                 // newSize already exists
                {
                    mass.BackColor = Color.LightSalmon;
                }

                else if (mate.isThick)                 // artist name changed
                {
                    mass.BackColor = Color.GreenYellow;
                }

                else if (mate.isTrap)                 // extension changed
                {
                    mass.BackColor = Color.Gold;
                }

                lsvBlimps.Items.Add(mass);
            }

            if (fatties.Count > 0)
            {
                colRename.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
                colRename.Width += 20;
            }

            foreach (ListViewItem mass in lsvBlimps.Items)
            {
                mass.SubItems[1].Text = mass.SubItems[2].Text
                                        + "\n" + mass.SubItems[1].Text;
            }

            lsvBlimps.Sorting = SortOrder.Ascending;
            datAss            = 00;
            ShakeDat();
            btnRescan.Enabled = true;
            btnCommit.Enabled = (fatties.Count > 0);
            lblMates.Text     = nMates();
            lsvBlimps.Focus();
        }