Productivity Functions Library

What is Productivity Functions Library?

 
Productivity Functions Library is a library of extension methods that make it easy to work with common WinForms Controls and classes.
 

List of Some Controls, Methods

 
PictureBox Methods
  • LoadImageFormFile() // Loads image from the image file you select.
  • LoadImageFormByteArray() // This will load image from byte array you passed into this method.
  • GetByteImage() // Will return a byte array copy of image inside the PictureBox.
  • SaveImageInFile() // Shows SaveFileDialog to save the image by it. You can specify the filter and title as parameters on this method.
DataGridView Methods
  • UpdateDataSource() // This method takes one parameter which is a data source. Note - It disables the AutoGenerateColumns Property.
  • ExportToCVSFile() // Shows SaveFileDialog and you can set its title by passing title as parameter.
  • ExportToExcelFile() // Same as the last one; it takes title as parameter.
  • ExportToPDFFile() // Exports DataGridView to pdf file.
ComboBox Methods
  • UpdateDataSource() // It takes 3 parameters *dataSource // the data source. *displayMember // the display member for the ComboBox. *valueMember // the value member for the ComboBox //It sets SelectedIndex Property to -1
ListView Functions
  • LoadFoldersList() // Takes one parameter which is parentDirectory. It loads all the folders in parentDirectory to list view.
  • LoadFoldersListAysnc() // Takes one parameter which is parentDirectory. It loads all the folders in parentDirectory to list view async.
  • LoadFilesList() // Takes one parameter which is parentDirectory. It loads all the files in parentDirectory to list view.
  • LoadFoldersListAysnc() // Takes one parameter which is parentDirectory. It loads all the folders in parentDirectory to list view async.
  • LoadFilesListWithIcons() // Takes one parameter which is parentDirectory. It loads all the files with their icons in parentDirectory to list view.
  • LoadFilesListWithIconsAysnc() // Takes one parameter which is parentDirectory. It loads all the files with their icons in parentDirectory to list view async.

Where can I get this Library?

 
You can download it from nuget.org
 
PackageURL or you can get it from the GitHub Repository as well.
 
Last Words
 
I have created this library to help developers in working with common WinForms controls. If you have any idea of new methods that I can add, please share them with me. Thank you!