C# Class SANTA.Controller.UIController

The UIController class is responsible for handling user interaction and the UI.
Mostra file Open project: siegleal/iSanta

Public Methods

Method Description
GenerateReport ( int images ) : void

Save each image to the database and then generate a report with each.

GetImageData ( int images ) : Datatype.ImageData

Gets the ImageData for the current selection of images. If the selection contains multiple images and they have differing values, the common values are set and the rest of null (or otherwise equivalent) value.

SaveData ( int images ) : void

Save each of the specified images to the database.

SetData ( Datatype updated, Attributes modifiedAttributes ) : void

Set the data for the current set of active images.

SetFileNames ( string FileNames ) : void

Changes to the set of active files (targets) to those specified.

UIController ( Master master, bool firstUse ) : System

Constructs a UIController instance and initializes a Unified form.

Private Methods

Method Description
ActiveValid ( ) : bool

Determines if all the active images are valid.

AllValid ( ) : bool

Determines if all the images are valid.

GetHoleDiameter ( int image ) : int

Determines the hole diameter in pixels from the Master.

ImageRecResults ( ) : List

Perorm image recognition on the current image.

LoadImages ( ) : void

Prompt the user for target IDs to open from the database.

OpenSettings ( ) : void

Open the settings window during normal program execution.

OpenSettings ( bool firstUse ) : void

Open the settings window with the specified firstUse argument.

SaveAddedWeapons ( List addedWeapons ) : void

Try to save each weapon to the database.

UpdateScale ( int image, Datatype scale, double caliber, Datatype caliberUnit, float verticalLength, float horizontalLength, Datatype regionOfInterest ) : void

Update the scale information for the current information.

ValidateData ( Datatype data ) : bool

Determine if the provided data is valid. It is valid if the number of shots fired, target distance, caliber, mass, and scale lengths are positive.

Method Details

GenerateReport() public method

Save each image to the database and then generate a report with each.
public GenerateReport ( int images ) : void
images int The image indices to generate a report with.
return void

GetImageData() public method

Gets the ImageData for the current selection of images. If the selection contains multiple images and they have differing values, the common values are set and the rest of null (or otherwise equivalent) value.
public GetImageData ( int images ) : Datatype.ImageData
images int A list of image indices (typically the current selection).
return Datatype.ImageData

SaveData() public method

Save each of the specified images to the database.
public SaveData ( int images ) : void
images int The image indices to save.
return void

SetData() public method

Set the data for the current set of active images.
public SetData ( Datatype updated, Attributes modifiedAttributes ) : void
updated Datatype An ImageData instance with the updated data to copy values from.
modifiedAttributes Attributes The set of attributes to copy to the active items.
return void

SetFileNames() public method

Changes to the set of active files (targets) to those specified.
public SetFileNames ( string FileNames ) : void
FileNames string The filenames for the new set of files.
return void

UIController() public method

Constructs a UIController instance and initializes a Unified form.
public UIController ( Master master, bool firstUse ) : System
master Master The Master class instance to communicate with.
firstUse bool If this is the first time the application has been run.
return System