C# Class BaconBuilder.View.MainWindow

Inheritance: System.Windows.Forms.Form, IMainView
ファイルを表示 Open project: Revelations/BaconApp Class Usage Examples

Private Properties

Property Type Description
ConnectionExists bool
CreateConnection void
Dispose void
HTMLEditor_Navigating void
InitializeComponent void
KeepServerOffline void
MainWindow_FormClosing void
MainWindow_Load void
MainWindow_Shown void
MapCoordinateChanged void
MapZoomChanged void
NextTab void
PreviousTab void
PrintCodeImageText void
btnAddFile_Click void
btnAudio_Click void
btnBold_Click void
btnImage_Click void
btnItalics_Click void
btnPreview_Click void
btnPrintPreview_Click void
btnRemoveFile_Click void
btnToggleEditMode_Click void
btnUnderline_Click void
exitToolStripMenuItem_Click void
listViewContents_ItemSelectionChanged void
listViewContents_SelectedIndexChanged void
printDocument_PrintPage void
printDocument_PrintPage1 void
toolStripSync_Click void
txtTitle_FocusLeft void
txtTitle_KeyDown void
txt_ValueChanged void

Public Methods

Method Description
EnableRequiredControls ( ) : void

Enable controls if need be. For example, if no files are selected in the list view, disable the remove file button. Call this as often as needed!

MainWindow ( ) : Common.System

Constructor for the main form.

Protected Methods

Method Description
ProcessCmdKey ( Message &msg, Common.Keys keyData ) : bool

Private Methods

Method Description
ConnectionExists ( string &uri ) : bool
CreateConnection ( object o ) : void
Dispose ( bool disposing ) : void
HTMLEditor_Navigating ( object sender, System.Windows.Forms.WebBrowserNavigatingEventArgs e ) : void
InitializeComponent ( ) : void
KeepServerOffline ( ) : void
MainWindow_FormClosing ( object sender, FormClosingEventArgs e ) : void

Called when the form is closing. Prompts the user for synchronisation. Creates an FTP uploader to sync the webserver with the working directory.

MainWindow_Load ( object sender, EventArgs e ) : void
MainWindow_Shown ( object sender, EventArgs e ) : void

Called when the main window is first shown. Creates an FTP downloader to sync the working directory with the webserver. Also initialises files in the listview.

MapCoordinateChanged ( object sender, EventArgs e ) : void
MapZoomChanged ( object sender, EventArgs e ) : void
NextTab ( ) : void
PreviousTab ( ) : void
PrintCodeImageText ( System.Drawing.Printing.PrintPageEventArgs e, string text, float &imageTop, float &imageBottom, int margin, float &height ) : void
btnAddFile_Click ( object sender, EventArgs e ) : void

Create a new html file and add it to the list view.

btnAudio_Click ( object sender, EventArgs e ) : void

Opens a media selection dialog for the user to insert an audio file.

btnBold_Click ( object sender, EventArgs e ) : void

Makes the selected HTMLEditor text bold, or toggles new text being typed in bold.

btnImage_Click ( object sender, EventArgs e ) : void

Opens a media selection dialog for the user to insert an image file.

btnItalics_Click ( object sender, EventArgs e ) : void

Makes the selected HTMLEditor text italic, or toggles new text being typed in italic.

btnPreview_Click ( object sender, EventArgs e ) : void

Preview html, map page, and QR code in a dialog.

btnPrintPreview_Click ( object sender, EventArgs e ) : void

Brings up a print preview dialog for all QR codes in the listview.

btnRemoveFile_Click ( object sender, EventArgs e ) : void

Delete an html file from the file system and listview.

btnToggleEditMode_Click ( object sender, EventArgs e ) : void
btnUnderline_Click ( object sender, EventArgs e ) : void

Makes the selected HTMLEditor text underlined, or toggles new text being typed underlined.

exitToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Exits the program.

listViewContents_ItemSelectionChanged ( object sender, System.Windows.Forms.ListViewItemSelectionChangedEventArgs e ) : void

Called once for each file selected or deselected when the listview's item selection is changed.

listViewContents_SelectedIndexChanged ( object sender, EventArgs e ) : void

Enables or disables various controls when the listview's selected index changes.

printDocument_PrintPage ( object sender, System.Drawing.Printing.PrintPageEventArgs e ) : void

Print multiple pages. Russell

printDocument_PrintPage1 ( object sender, System.Drawing.Printing.PrintPageEventArgs e ) : void
toolStripSync_Click ( object sender, EventArgs e ) : void

Initialises an FTP uploader to synchronise the remote server directory with the local working folder.

txtTitle_FocusLeft ( object sender, EventArgs e ) : void

When the user leaves the title textbox, handle any name changes.

txtTitle_KeyDown ( object sender, KeyEventArgs e ) : void

Handle confirmation or denial of any name change in the title textbox.

txt_ValueChanged ( object sender, EventArgs e ) : void

Called when the numeric up/down boxes have their value changed. Constrains those values to lie within a boundary given by the picture box size. Redraws and invalidates the picture box.

Method Details

EnableRequiredControls() public method

Enable controls if need be. For example, if no files are selected in the list view, disable the remove file button. Call this as often as needed!
public EnableRequiredControls ( ) : void
return void

MainWindow() public method

Constructor for the main form.
public MainWindow ( ) : Common.System
return Common.System

ProcessCmdKey() protected method

protected ProcessCmdKey ( Message &msg, Common.Keys keyData ) : bool
msg Message
keyData Common.Keys
return bool