C# Class Azavea.NijPredictivePolicing.AcsAlchemistGui.MainForm

Afficher le fichier Open project: azavea/acs-alchemist

Protected Properties

Свойство Type Description
_isDirty bool
_tooltips ToolTip>.Dictionary

Méthodes publiques

Méthode Description
CheckSave ( ) : bool

Returns false if the following action should be cancelled

MainForm ( ) : System
SmartToggler ( ) : void

Perform all our form enable/disables in one place, so the form is always in a consistent state (this also makes this much easier to maintain)

Méthodes protégées

Méthode Description
AddDefaultTooltips ( ) : void
CheckValidity ( bool isFishnet ) : bool

Sanity check to determine if we have enough information to start a job / export -- This function should display a MessageBox if something is really wrong

DisplayException ( string label, Exception ex ) : void

A very basic error display helper -- NOTE! It is up to the developer to choose what exceptions are FATAL or not. This helper is for potentially NON-FATAL exceptions / or those that can be recovered from

Dispose ( bool disposing ) : void

Clean up any resources being used.

FixWeirdStyles ( ) : void

Windows configurations differ in the actual colors used for different elements 'InactiveText', 'BackgroundColor', etc. Our log text is a little 'grayed out' to be less distracting, but on some configurations this can make it invisible.

GatherInputs ( bool isFishnet ) : void

Copies our form onto a 'job instance'

HideLoadingSpinner ( ) : void
LoadFonts ( ) : void

We're doing this because fonts are rarely consistent between machines (in this case, my dev laptop, and my dev workstation). This changes the appearance of the console log, and the controls quite significantly (stuff disappears), so it's pretty important that the font is right.

PopulateControls ( ) : void

Copies a 'job instance' onto our form

PopulateLists ( ) : void

Populates our 'year', 'state', 'summary level', and 'srid' controls, as well as any other "choose from a set" controls that come up.

SetTooltip ( Control ctl, string label ) : void

Helper for setting tooltips

ShowLoadingSpinner ( ) : void
TryRunExport ( bool isFishnet ) : void

Private Methods

Méthode Description
AddFontMemResourceEx ( IntPtr pbFont, uint cbFont, IntPtr pdv, [ pcFonts ) : IntPtr
InitializeComponent ( ) : void

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

MainForm_Load ( object sender, EventArgs e ) : void

Initialize the controls and whatnot

aboutToolStripMenuItem_Click ( object sender, EventArgs e ) : void
backgroundWorker1_DoWork ( object sender, DoWorkEventArgs e ) : void
backgroundWorker1_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

On progress updated

backgroundWorker1_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

when we're done, re-enable the form

btnBrowseBoundaryShpFile_Click ( object sender, EventArgs e ) : void

Browse for the "Output Filter Boundary" Shapefile

btnBrowseFishnetEnvelopeFile_Click ( object sender, EventArgs e ) : void

Browse for "Grid boundary-alignment file"

btnBrowseOutputFolder_Click ( object sender, EventArgs e ) : void

Browse for the "Output Folder"

btnBrowsePrjFile_Click ( object sender, EventArgs e ) : void

Browse for the "Output Projection File"

btnBrowseVariableFile_Click ( object sender, EventArgs e ) : void

Opens a file dialog for -- Variables File Extensions: *.txt, *.vars / All

btnBrowseWorking_Click ( object sender, EventArgs e ) : void
btnCancel_Click ( object sender, EventArgs e ) : void
btnFishnet_Click ( object sender, EventArgs e ) : void

Export a fishnet

btnSaveMessageLog_Click ( object sender, EventArgs e ) : void

TODO: This is not yet implemented, providing a helpful error message

btnShapefile_Click ( object sender, EventArgs e ) : void

Export a shapefile using census boundaries!

cboProjections_SelectedIndexChanged ( object sender, EventArgs e ) : void

Sets the projection text as the tooltip, best way we have for showing what projection they've selected

cboProjections_Validating ( object sender, CancelEventArgs e ) : void
cboStates_Validating ( object sender, CancelEventArgs e ) : void
cboSummaryLevel_Validating ( object sender, CancelEventArgs e ) : void
cboYear_Validating ( object sender, CancelEventArgs e ) : void
general_CheckedChanged ( object sender, EventArgs e ) : void
general_SelectedValueChanged ( object sender, EventArgs e ) : void
general_TextChanged ( object sender, EventArgs e ) : void
newJobToolStripMenuItem_Click ( object sender, EventArgs e ) : void
openJobFileToolStripMenuItem_Click ( object sender, EventArgs e ) : void
quitToolStripMenuItem_Click ( object sender, EventArgs e ) : void
radioDefaultSRID_CheckedChanged ( object sender, EventArgs e ) : void
radioSRIDFile_CheckedChanged ( object sender, EventArgs e ) : void
radioSRIDFromList_CheckedChanged ( object sender, EventArgs e ) : void
saveJobFileToolStripMenuItem_Click ( object sender, EventArgs e ) : void
txtFishnetCellSize_Validating ( object sender, CancelEventArgs e ) : void
txtPrjFilePath_Validating ( object sender, CancelEventArgs e ) : void
txtVariableFilePath_Validating ( object sender, CancelEventArgs e ) : void
workOfflineToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Method Details

AddDefaultTooltips() protected méthode

protected AddDefaultTooltips ( ) : void
Résultat void

CheckSave() public méthode

Returns false if the following action should be cancelled
public CheckSave ( ) : bool
Résultat bool

CheckValidity() protected méthode

Sanity check to determine if we have enough information to start a job / export -- This function should display a MessageBox if something is really wrong
protected CheckValidity ( bool isFishnet ) : bool
isFishnet bool
Résultat bool

DisplayException() protected méthode

A very basic error display helper -- NOTE! It is up to the developer to choose what exceptions are FATAL or not. This helper is for potentially NON-FATAL exceptions / or those that can be recovered from
protected DisplayException ( string label, Exception ex ) : void
label string
ex Exception
Résultat void

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

FixWeirdStyles() protected méthode

Windows configurations differ in the actual colors used for different elements 'InactiveText', 'BackgroundColor', etc. Our log text is a little 'grayed out' to be less distracting, but on some configurations this can make it invisible.
protected FixWeirdStyles ( ) : void
Résultat void

GatherInputs() protected méthode

Copies our form onto a 'job instance'
protected GatherInputs ( bool isFishnet ) : void
isFishnet bool
Résultat void

HideLoadingSpinner() protected méthode

protected HideLoadingSpinner ( ) : void
Résultat void

LoadFonts() protected méthode

We're doing this because fonts are rarely consistent between machines (in this case, my dev laptop, and my dev workstation). This changes the appearance of the console log, and the controls quite significantly (stuff disappears), so it's pretty important that the font is right.
protected LoadFonts ( ) : void
Résultat void

MainForm() public méthode

public MainForm ( ) : System
Résultat System

PopulateControls() protected méthode

Copies a 'job instance' onto our form
protected PopulateControls ( ) : void
Résultat void

PopulateLists() protected méthode

Populates our 'year', 'state', 'summary level', and 'srid' controls, as well as any other "choose from a set" controls that come up.
protected PopulateLists ( ) : void
Résultat void

SetTooltip() protected méthode

Helper for setting tooltips
protected SetTooltip ( Control ctl, string label ) : void
ctl Control
label string
Résultat void

ShowLoadingSpinner() protected méthode

protected ShowLoadingSpinner ( ) : void
Résultat void

SmartToggler() public méthode

Perform all our form enable/disables in one place, so the form is always in a consistent state (this also makes this much easier to maintain)
public SmartToggler ( ) : void
Résultat void

TryRunExport() protected méthode

protected TryRunExport ( bool isFishnet ) : void
isFishnet bool
Résultat void

Property Details

_isDirty protected_oe property

protected bool _isDirty
Résultat bool

_tooltips protected_oe property

collection of tooltip controls
protected Dictionary _tooltips
Résultat ToolTip>.Dictionary