private bool filterName(folderAndSize fi) { if (fi.folderPath.ToUpper().Contains(txtSearch.Text.ToUpper())) { return(false); } else { return(true); } }
private bool filterName(folderAndSize fi) { if (fi.folderPath.ToUpper().Contains(txtSearch.Text.ToUpper())) { return false; } else { return true; } }
private void btngo_Click(object sender, EventArgs e) { if (listBox1.SelectedItem != null) { DialogResult = DialogResult.OK; result = (folderAndSize)listBox1.SelectedItem; } else { DialogResult = DialogResult.Abort; } }
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. }; }
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); } } }
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { folderAndSize f = (folderAndSize)listBox1.SelectedItem; FindLargestFolder.openFolder(f.folderPath); }
private void btn_Open_Only_Click(object sender, EventArgs e) { folderAndSize f = (folderAndSize)listBox1.SelectedItem; FindLargestFolder.openFolder(f.folderPath); }