C# Класс Azavea.NijPredictivePolicing.AcsAlchemistGui.MainForm

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_isDirty bool
_tooltips ToolTip>.Dictionary

Открытые методы

Метод Описание
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)

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddDefaultTooltips() защищенный Метод

protected AddDefaultTooltips ( ) : void
Результат void

CheckSave() публичный Метод

Returns false if the following action should be cancelled
public CheckSave ( ) : bool
Результат bool

CheckValidity() защищенный Метод

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
Результат bool

DisplayException() защищенный Метод

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
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

FixWeirdStyles() защищенный Метод

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
Результат void

GatherInputs() защищенный Метод

Copies our form onto a 'job instance'
protected GatherInputs ( bool isFishnet ) : void
isFishnet bool
Результат void

HideLoadingSpinner() защищенный Метод

protected HideLoadingSpinner ( ) : void
Результат void

LoadFonts() защищенный Метод

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
Результат void

MainForm() публичный Метод

public MainForm ( ) : System
Результат System

PopulateControls() защищенный Метод

Copies a 'job instance' onto our form
protected PopulateControls ( ) : void
Результат void

PopulateLists() защищенный Метод

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
Результат void

SetTooltip() защищенный Метод

Helper for setting tooltips
protected SetTooltip ( Control ctl, string label ) : void
ctl Control
label string
Результат void

ShowLoadingSpinner() защищенный Метод

protected ShowLoadingSpinner ( ) : void
Результат void

SmartToggler() публичный Метод

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
Результат void

TryRunExport() защищенный Метод

protected TryRunExport ( bool isFishnet ) : void
isFishnet bool
Результат void

Описание свойств

_isDirty защищенное свойство

protected bool _isDirty
Результат bool

_tooltips защищенное свойство

collection of tooltip controls
protected Dictionary _tooltips
Результат ToolTip>.Dictionary