C# Class ACPAddIn.AutoCompleteForm

This class handle the presentation layer for presenting the Suggestion list in a cusotmized window form to user. It provides methods such as to navigate the page, hide the suggestion box and text wrapping for each entry. Author: Loke Yan Hao
Inheritance: System.Windows.Forms.Form
Show file Open project: autocompaste/AutoComPaste Class Usage Examples

Public Methods

Method Description
AutoCompleteForm ( ) : System
Hide ( ) : void
getActualWidth ( ) : int
getDisplaySuggestionCount ( ) : int
getNumOfPage ( ) : int
getPageIndex ( ) : int
getSourceNameWrapping ( String sourceName, Font font ) : String
getSuggestionWrapping ( String suggestion, Font font, bool entityMode ) : String
nextSuggestionPage ( ) : void
populateForm ( List suggestions ) : void
previousSuggestionPage ( ) : void
quickPaste ( int i ) : void
selectFirstIndex ( ) : void
showForm ( IWin32Window owner ) : void
updateConfiguration ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

ListBox1_DrawItem ( object sender, DrawItemEventArgs e ) : void
ListBox1_SelectedIndexChanged ( object sender, System e ) : void
ListBox_initWidth ( ListBox listBox ) : void
closeBut_MouseClick ( object sender, MouseEventArgs e ) : void
closeBut_MouseHover ( object sender, EventArgs e ) : void
closeBut_MouseLeave ( object sender, EventArgs e ) : void
generateSubstring ( String words, ArrayList wordIndexes ) : String
getRenderTextHeight ( String text, Control control, Font font ) : int
getRenderTextWidth ( String text, Control control, Font font ) : int
listBox1_KeyDown ( object sender, KeyEventArgs e ) : void
listBox1_KeyPress ( object sender, KeyPressEventArgs e ) : void
listBox1_MouseDoubleClick ( object sender, MouseEventArgs e ) : void
nextBut_MouseClick ( object sender, MouseEventArgs e ) : void
nextBut_MouseHover ( object sender, EventArgs e ) : void
nextBut_MouseLeave ( object sender, EventArgs e ) : void
previousBut_MouseClick ( object sender, MouseEventArgs e ) : void
previousBut_MouseHover ( object sender, EventArgs e ) : void
previousBut_MouseLeave ( object sender, EventArgs e ) : void
updateNextPreviousButton ( ) : void
updateSuggestionPageDisplay ( ) : void

Method Details

AutoCompleteForm() public method

public AutoCompleteForm ( ) : System
return System

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

Hide() public method

public Hide ( ) : void
return void

getActualWidth() public method

public getActualWidth ( ) : int
return int

getDisplaySuggestionCount() public method

public getDisplaySuggestionCount ( ) : int
return int

getNumOfPage() public method

public getNumOfPage ( ) : int
return int

getPageIndex() public method

public getPageIndex ( ) : int
return int

getSourceNameWrapping() public method

public getSourceNameWrapping ( String sourceName, Font font ) : String
sourceName String
font System.Drawing.Font
return String

getSuggestionWrapping() public method

public getSuggestionWrapping ( String suggestion, Font font, bool entityMode ) : String
suggestion String
font System.Drawing.Font
entityMode bool
return String

nextSuggestionPage() public method

public nextSuggestionPage ( ) : void
return void

populateForm() public method

public populateForm ( List suggestions ) : void
suggestions List
return void

previousSuggestionPage() public method

public previousSuggestionPage ( ) : void
return void

quickPaste() public method

public quickPaste ( int i ) : void
i int
return void

selectFirstIndex() public method

public selectFirstIndex ( ) : void
return void

showForm() public method

public showForm ( IWin32Window owner ) : void
owner IWin32Window
return void

updateConfiguration() public method

public updateConfiguration ( ) : void
return void