示例#1
0
 private bool filterName(folderAndSize fi)
 {
     if (fi.folderPath.ToUpper().Contains(txtSearch.Text.ToUpper()))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
示例#2
0
 private bool filterName(folderAndSize fi)
 {
     if (fi.folderPath.ToUpper().Contains(txtSearch.Text.ToUpper()))
     {
         return false;
     }
     else
     {
         return true;
     }
 }
示例#3
0
 private void btngo_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         DialogResult = DialogResult.OK;
         result = (folderAndSize)listBox1.SelectedItem;
     }
     else
     {
         DialogResult = DialogResult.Abort;
     }
 }
示例#4
0
 private void btngo_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         DialogResult = DialogResult.OK;
         result       = (folderAndSize)listBox1.SelectedItem;
     }
     else
     {
         DialogResult = DialogResult.Abort;
     }
 }
示例#5
0
        private void listBox1_MouseHover(object sender, EventArgs e)
        {
            Point screenPosition            = ListBox.MousePosition;
            Point listBoxClientAreaPosition = listBox1.PointToClient(screenPosition);

            int hoveredIndex = listBox1.IndexFromPoint(listBoxClientAreaPosition);

            try
            {
                folderAndSize fi = (folderAndSize)listBox1.Items[hoveredIndex];

                toolTip1.SetToolTip(listBox1, fi.folderPath);
                toolTip1.Show(fi.ToString(), this, 10000);
            }
            catch (Exception)
            {
                //eh, dont care.
            };
        }
示例#6
0
        public static void pickLargest()
        {
            folderAndSize largest = null;

            foreach (folderAndSize f in allFolders)
            {
                if (largest == null || f.size > largest.size)
                {
                    largest = f;
                }
            }

            //pick largest folder from our list
            if (largest != null)
            {
                openFolder(largest.folderPath);
                //remove the items as we have picked it, and want to rescan it next time.
                if (useCache)
                {
                    cache.removeCacheData(largest.folderPath);
                }
            }
        }
示例#7
0
        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            folderAndSize f = (folderAndSize)listBox1.SelectedItem;

            FindLargestFolder.openFolder(f.folderPath);
        }
示例#8
0
        private void btn_Open_Only_Click(object sender, EventArgs e)
        {
            folderAndSize f = (folderAndSize)listBox1.SelectedItem;

            FindLargestFolder.openFolder(f.folderPath);
        }