private void FaviconMode_Click(object sender, EventArgs e) { foreach (var filePath in SelectedItemPaths) { string extension = Path.GetExtension(filePath).ToLower(); if (extension.Equals(".jpg") || extension.Equals(".jpeg") || extension.Equals(".png") || extension.Equals(".png")) { var option = new IconConvertOption(filePath, 0, true); ThreadPool.QueueUserWorkItem(new WaitCallback(IconConverter.Convert), option); } } }
private void Convert(int size) { foreach (var filePath in SelectedItemPaths) { string extension = Path.GetExtension(filePath).ToLower(); if (extension.Equals(".jpg") || extension.Equals(".jpeg") || extension.Equals(".png") || extension.Equals(".png")) { var option = new IconConvertOption(filePath, size); ThreadPool.QueueUserWorkItem(new WaitCallback(IconConverter.Convert), option); } } }