C# Class BaconBuilder.Model.BaconModel

Afficher le fichier Open project: Revelations/BaconApp Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

GetCurrentFileUri() public méthode

public GetCurrentFileUri ( ) : Uri
Résultat System.Uri

InsertComment() public static méthode

public static InsertComment ( System.Windows.Forms.HtmlDocument document, string comm ) : string
document System.Windows.Forms.HtmlDocument
comm string
Résultat string

LoadFiles() public méthode

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
Résultat void

QrCode() public méthode

public QrCode ( string file ) : Image
file string
Résultat Image

RemoveFile() public méthode

Remove the file from the wroking directory.
public RemoveFile ( string fileName ) : void
fileName string
Résultat void

RenameFile() public méthode

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

SaveFile() public méthode

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