C# Class BaconBuilder.Model.BaconModel

Mostra file Open project: Revelations/BaconApp Class Usage Examples

Public Methods

Method Description
CreateNewFile ( string fileName ) : void

Creates a new file with the name.

GetCurrentFileUri ( ) : Uri
InsertComment ( System.Windows.Forms.HtmlDocument document, string comm ) : string
LoadFiles ( ) : void

Reloads the files into memory. TODO: WAIT, WHAT? Every Html file in the directory is loaded into memory? And whenever a file is saved, the WHOLE LOT ARE LOADED INTO MEMORY AGAIN? SHAME ON YOU GOOD SIR.

QrCode ( string file ) : Image
RemoveFile ( string fileName ) : void

Remove the file from the wroking directory.

RenameFile ( string oldName, string newName ) : void

Renames the file to a new name.

SaveFile ( string fileName ) : void

Saves the file.

Private Methods

Method Description
GetLowestUnusedNewFileName ( ) : string

Gets a new file fileName not already present in the Html directory. Checks for existing files present in the Html directory with the new file fileName. Iterates and appends integer values to the filename until it finds on that is unused.

StripExtension ( string fileName ) : string

Removes a defined extension from filename and returns it. Does not affect null strings or other filenames.

Method Details

CreateNewFile() public method

Creates a new file with the name.
public CreateNewFile ( string fileName ) : void
fileName string Name of file
return void

GetCurrentFileUri() public method

public GetCurrentFileUri ( ) : Uri
return System.Uri

InsertComment() public static method

public static InsertComment ( System.Windows.Forms.HtmlDocument document, string comm ) : string
document System.Windows.Forms.HtmlDocument
comm string
return string

LoadFiles() public method

Reloads the files into memory. TODO: WAIT, WHAT? Every Html file in the directory is loaded into memory? And whenever a file is saved, the WHOLE LOT ARE LOADED INTO MEMORY AGAIN? SHAME ON YOU GOOD SIR.
public LoadFiles ( ) : void
return void

QrCode() public method

public QrCode ( string file ) : Image
file string
return Image

RemoveFile() public method

Remove the file from the wroking directory.
public RemoveFile ( string fileName ) : void
fileName string
return void

RenameFile() public method

Renames the file to a new name.
public RenameFile ( string oldName, string newName ) : void
oldName string The current name.
newName string The new name.
return void

SaveFile() public method

Saves the file.
public SaveFile ( string fileName ) : void
fileName string The filename of the file to save.
return void