C# Class StonehearthEditor.FilePreview

Inheritance: System.Windows.Forms.UserControl
Mostra file Open project: stonehearth/stonehearth-editor Class Usage Examples

Private Properties

Property Type Description
InitializeComponent void
Save void
configureJsonHighlighting void
configureLuaHighlighting void
configureScintilla void
editLocStringToolStripMenuItem_Click void
filePreviewContextMenu_Opening void
getIndicatorAt int
getIndicatorText string
getLocKey string
indicate void
insertAliasToolStripMenuItem_Click void
isValidFileName bool
localizeFile_Click void
openFile_Click void
openFolder_Click void
restyleDocument void
saveFile_Click void
saveToolStripMenuItem_Click void
textBox_IndicatorRelease void
textBox_InsertCheck void
textBox_KeyDown void
textBox_Leave void
textBox_MouseMove void
textBox_SavePointLeft void
textBox_SavePointReached void
transformFileNames void
tryGetModuleFile bool

Public Methods

Method Description
FilePreview ( IReloadable owner, FileData fileData ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

ProcessDialogKey ( Keys keyData ) : bool
ProcessTabKey ( bool forward ) : bool

Private Methods

Method Description
InitializeComponent ( ) : void

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

Save ( ) : void
configureJsonHighlighting ( ) : void

Configures Scintilla for Json highlighting

configureLuaHighlighting ( ) : void

Configures Scintilla for lua highlighting

configureScintilla ( ) : void

Sets up some more things about textBox.

editLocStringToolStripMenuItem_Click ( object sender, EventArgs e ) : void
filePreviewContextMenu_Opening ( object sender, CancelEventArgs e ) : void
getIndicatorAt ( int position ) : int

Returns the index of the indicator at position

getIndicatorText ( ScintillaNET.Indicator indicator, int position ) : string

Returns the text that's indicated with indicator at position position

getLocKey ( int position ) : string

Returns the localisation key at position position.

indicate ( string pattern, System.Action targetTransform = null ) : void

Helper used in restyleDocument

insertAliasToolStripMenuItem_Click ( object sender, EventArgs e ) : void
isValidFileName ( string text ) : bool

Returns whether a certain string maps to a file (that can be opened)

localizeFile_Click ( object sender, EventArgs e ) : void
openFile_Click ( object sender, EventArgs e ) : void
openFolder_Click ( object sender, EventArgs e ) : void
restyleDocument ( ) : void

Called whenever a change was made; used to re-style the whole document. Sets indicators.

saveFile_Click ( object sender, EventArgs e ) : void
saveToolStripMenuItem_Click ( object sender, EventArgs e ) : void
textBox_IndicatorRelease ( object sender, ScintillaNET.IndicatorReleaseEventArgs e ) : void

Whenever the user clicked on an indicator. Used instead of IndicatorClick because the opening dialog is eating the Release event, so the control thinks there's text to be selected.

textBox_InsertCheck ( object sender, ScintillaNET.InsertCheckEventArgs e ) : void
textBox_KeyDown ( object sender, KeyEventArgs e ) : void
textBox_Leave ( object sender, EventArgs e ) : void
textBox_MouseMove ( object sender, MouseEventArgs e ) : void
textBox_SavePointLeft ( object sender, EventArgs e ) : void

Called whenever the text is modified

textBox_SavePointReached ( object sender, EventArgs e ) : void

Called whenever Scintilla.SetSavePoint is called, i.e. in Save

transformFileNames ( ) : void

Helper function for restyleDocument/indicate(string, Action)

tryGetModuleFile ( string text, ModuleFile &module ) : bool

Tries to convert a string to an (openable) file

Method Details

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

FilePreview() public method

public FilePreview ( IReloadable owner, FileData fileData ) : System
owner IReloadable
fileData FileData
return System

ProcessDialogKey() protected method

protected ProcessDialogKey ( Keys keyData ) : bool
keyData Keys
return bool

ProcessTabKey() protected method

protected ProcessTabKey ( bool forward ) : bool
forward bool
return bool