MapWinUtility
Label of the default button of the message box
Label of the button activated by the "Esc" key
Label to return when the timeout expires without the user pressing a button
Number of seconds to wait before returning LabelTimeout (not used if not greater than zero)
Application Name to get and set registry value for checkbox
Registry Section to get and set registry value for checkbox
Registry Key to get and set registry value for checkbox
Text displayed for checkbox that offers to never again show this message
Only used if RegistryAppName, RegistrySection, and RegistryKey are set
Number of pixels left empty around edges and between controls
The label of the button that was clicked
Display aTitle and aMessage and ask the user to choose a button from aButtonLabels
Text in main area of message box
Text for title area of message box
Labels for buttons
Label of button that was clicked
Display aTitle and aMessage and ask the user to choose a button from aButtonLabels
Text in main area of message box
Text for title area of message box
Labels for buttons
Label of button that was clicked
Launch a program and redirect its standard output and error into Logger.Dbg
Full path of program to launch
Folder to start program in
Command-line arguments to program to launch
True to wait until program finishes before returning from LaunchProgram,
False to return immediately while program continues to run
0 if aWait=False and launch was successful
-1 if launch was unsuccessful
exit code of program if aWait=True and launch was successful
Create a new instance from an XML string
XML file containing metadata
Metadata structure as a System.Xml.XmlDocument
Internal representation of this object
Manipulation of this object may render it non-compliant with DTD
Create a new blank instance with all required elements present with "missing" values
Set bounding box in geographic coordinates
west bounding coordinate (decimal degress of longitude)
east bounding coordinate (decimal degress of longitude)
north bounding coordinate (decimal degress of latitude)
north bounding coordinate (decimal degress of latitude)
Get bounding box in geographic coordinates
west bounding coordinate (decimal degress of longitude)
east bounding coordinate (decimal degress of longitude)
north bounding coordinate (decimal degress of latitude)
north bounding coordinate (decimal degress of latitude)
Add a processing step to lineage within dataqual
Description of the processing step
Add a processing step to lineage within dataqual
Description of the processing step
Date of the processing step, defaults to current date and time if omitted
Add processing steps to lineage within dataqual
Processing steps to add
Find a child node by case-insensitive search for the given tag
Create a new child with the given tag if not found
Node whose children will be searched
Search for a child with this tag
the found or created node
Replace the entire state of this object with an XML string
New metadata XML string to use instead of current metadata
Return an XML string containing current metadata
Calling save with a file name will write an XML text file with the specified name.
If no file name is given, the file name this object was created with or previously saved to is used.
Specifying a filename will save the metadata to a new location.
Create and manage FGDC metadata in XML format
Chris Michaelis July 2 2005
Used to compare write times between the first and second file.
Returns true if File2 is newer than File1
Make a System.Net.WebRequest and return its response
URL to retrieve
Optional headers for web request
Milliseconds to wait for a response before deciding it has failed
WebResponse that comes from the requested URL
If a proxy server is needed, prompt for it then proceed
Private routine for using locally cached proxy server information
Set the proxy server of this request
Private function for parsing proxy server information from a string
Proxy information formatted as:
servername:port
or for servers requiring authentication:
servername:port:username:password
True if proxy server information was parsed from string into m_WebProxy
False if proxy server information could not be parsed from aProxyString
port must be numeric, 80 and 8080 are popular ports
Private routine to handle a WebException that is a result of needing proxy information
WebException that may be the result of needing proxy information
True if proxy information was found. True implies that another attempt at the same action which produced the given exception may succeed.
False means one of the following:
a) the exception was not (407) Proxy Authentication Required
b) proxy information was not found
c) too many tries have been made to get proxy information
The first time this is called, it checks the registry for saved proxy information.
If no information is found in the registry, or another proxy exception occurs,
the user is prompted for proxy information which is then saved in the registry.
Send an HTTP POST to a URL and return the results as a string
URL to access
data to sent in POST
True to allow redirection from fullUrl
fail after not getting a response for this many milliseconds
response from web server as a string
Download from a URL to a string
URL to request
Response from URL as string
Check for an internet connection by attempting to get a response from CheckAgainstURL
URL to access
Fail after not getting a response for this many milliseconds
True if a response was received from CheckAgainstURL, False if there was an error or timeout
Unicode prefix sometimes gets included in a string, we have to remove it before interpreting as a filename or script
an assembly built by compiling aCode or the contents of the file referenced by aCode
Broke out the run method into PrepareScript and Run.
No longer have to pass in a reference to the Mainform.
Output assembly can be loaded by the appropriate Plugin manager from the calling code.
Parses double value from string. Uses invariant culture first (. separator). On failure replces '.' to ',' and tries again.
A string to parse value from
Default value to return if parsing has faield
True on success, false otherwise
A generic method for serialization of object as a child of the given XML node
A generic method for serialization of object as a child of the given XML node
Generic method for deserialization of an object from the given node
Generic method for deserialization of an object from the given node
Deletes all previous error messages.
Provides access to the last message recieved through
the MapWinX library.
A description of the problem encountered.
Sets the last message recieved through
the MapWinX library.
A string describing the problem encountered or the message to write.
Log the progress of a long-running task
Current position/item of task
Final position/item of task
A final call when the task is done with aCurrent = aLast
indicates completion and should clear the progress display.
Update the current status message
Description of current processing status
Interface for handling status and progress updates
True if user has requested to abort the activity monitored by Progress
Automatically resets to False after returning True
Interface that can also be implemented when implementing IProgressStatus if also providing the option to cancel a long-running action
Default implementation does nothing
Create a new level in the stack of logger progress levels
True to increment progress by one at level above new level after finishing, Default = False
True to keep new level at the same level we are already on rather than adding to the stack
Recommendation: Using myLevel as new ProgressLevel()...[call other code that contains progress]...End Using
Reset the progress without destroying this level and creating a new one
Ensure the stack of logger progress levels is consistent after we are finished with this level
Another IProgressStatus which will also get a copy of Status and Progress messages
This lets us send Progress and Status to MapWindow's status bar while also sending to StatusMonitor.exe
True if user has requested to cancel current operation
Automatically cleared after level 1 progress hears that it is True
True while user has requested a pause in execution
True when paused, False when not paused
A button in StatusMonitor.exe labeled "Pause"
sends a message "P" through MonitorMessageHandler.
The button then changes label to "Run" and if pressed
sends a message "R", which changes Paused back to False.
Pausing is enforced by the While Paused loop in Sub Progress
Start status monitor as a separate executable
Full path to status monitor program
Directory to start running in, probably no need to specify this
Arguments to status monitor. If not specified, current process ID is used as only argument
True if started or decided to use already running monitor, False if failed to start
pMonitorProcess is set if monitor is successfully started
Stop StatusMonitor which was started by StartMonitor
Messages from standard output of StatusMonitor.exe are handled
All messages are logged, "P" pauses, "R" resumes, "C" cancels
Use StatusMonitor.exe to display Status and Progress and allow user to cancel long-running actions
True to flush after each write to log file
False to buffer writes to log file and wait for explicit Flush() or operating system
False may save some time, True makes log files more likely to be helpful
Icon to be used on custom message boxes
New is private to ensure Logger is a singleton
Start logging to a file
Name of file to put subsequent log messages in
True to append to existing file, False to create new file
True to rename old log files as needed to use aLogFileName,
False to overwrite existing log file
True to change log file even if already logging to a file
If aLogFileName is blank and aForceNameChange = True, logging to file is stopped.
File name being logged to
Append a number to a given file name if needed to make it unique
True to enable time stamping each log event
True to start time stamps at zero when execution starts, stamp elapsed hh:mm:ss.milliseconds,
False to stamp each event with current date/time YYYY-MM-DD@hh:mm:ss.milliseconds
Progress and status messages are displayed by this object
True if user has requested to cancel current operation
Write any pending log messages to the log file (if logging to a file)
Add a "debug" message to the log.
Any number of strings to add to the log, usually just one
Debug messages are commonly used to indicate that execution has reached a certain line.
Important values just computed or about to be used are often included.
Create a custom message box form
Log the use of a Microsoft.VisualBasic.MsgBox
Message to display
Message box style
Title of message box
MsgBoxResult
Logs when the message box is displayed and what the user selects
Log the use of a Microsoft.VisualBasic.MsgBox
Message to display
Message box style
Message box default result
Title of message box
MsgBoxResult
Logs when the message box is displayed and what the user selects
Log the use of a Windows.Forms.MessageBox
Message to show
Caption for top of message box
Buttons to display
Icon to include in message box
Button to press when user presses Enter
DialogResult selected by user
Logs when the message box is displayed and what the user selects
Log the use of a Windows.Forms.MessageBox
Message to show
Caption for top of message box
Buttons to display
Icon to include in message box
Button to press when user presses Enter
DialogResult selected by user
Logs when the message box is displayed and what the user selects
Translate MessageBoxDefaultButton and a set of MessageBoxButtons into a DialogResult
Display the current status in the status bar
Status message
Display the current status in the status bar
Status message
Write to log file flag
Log the progress of a long-running task
Current position/item of task
Final position/item of task
A final call when the task is done with aCurrent = aLast
is desirable to clear the progress display.
If aLast = 100, then aCurrent is percent progress, but
the caller should not convert aCurrent into percent if
aLast is not 100.
Combination of Status(aMessage) and Progress(aCurrent, aLast)
Status message
Current position/item of task
Final position/item of task
It is preferred to use Status or Progress(aCurrent, aLast) if
only the functionality of one of them is desired.
Time in milliseconds that must elapse before a new progress update is passed to ProgressStatus
A delay is desirable for tasks that make progress quickly because the
time to update displayed progress can become significant.
Default is 200 milliseconds so progress display is refreshed at most 5 times per second.
Set to zero to disable this feature.
Walks up the stack to find the method that called into this class
file name (if available) and method name of the method that called into this class
stack is not available if not compiled in debug mode, so an empty string is returned
Logger provides program logging to a file and progress messages.
All methods and variables are shared, so there is no need to
create or pass an instance of Logger. Just make a reference to
this library and use Logger.Dbg, Logger.Msg, Logger.Status, Logger.Progress
If a clsProgressStatus is set, then progress and status messages
are sent to it, allowing display.
Divides string into 2 portions at position of 1st occurence of specified delimeter. Quote specifies a particular string that is exempt from the delimeter search.
String to be analyzed
Single-character string delimeter
Multi-character string exempted from search
Returns leading portion of incoming string up to first occurence of delimeter.
Returns input parameter without that portion.
If no delimiter in string, returns whole string, and input parameter reduced to null string.
Example: StrSplit("Julie, Todd, Jane, and Ray", ",", "") = "Julie", and "Todd, Jane, and Ray" is returned as Source.
Example: StrSplit("'Julie, Todd', Jane, and Ray", ",", "'") = "Julie, Todd", and "Jane, and Ray" is returned as Source.
Converts specified text file to a string.
Name of text file to read
Keep trying for this much time
Contents of specified text file as string.
See if a String is empty or Nothing
String to check
True is empty or Nothing, otherwise False
Saves incoming string to a text file.
Name of output text file
Incoming string to be saved to file
Tests for existence of a specified file or directory
file or directory name to check for
True to look for a directory matching PathName
True to look for a file matching PathName
True if the specified file or directory exists, False if it does not
AcceptDirectories and AcceptFiles can both be true to check for a file or directory at the same time.
Converts full path, filename, and extension to only path and filename without extension
Complete file name
path and file name without extension
Example: FilenameNoExt ("C:\foo\bar.txt") = "C:\foo\bar"
Compare two files and return True if contents are identical.
Name of first file to compare
Name of second file to compare
true if files are identical, false if not
An exception will occur if either file cannot be read.
Compare two files and return True if contents are identical.
Name of first file to compare
Name of second file to compare
Ignore case flag
true if files are identical, false if not
An exception will occur if either file cannot be read.
Create the specified directory and any above it that are not yet there.
new directory to create
Example: MkDirPath("C:\foo\bar") creates the "C:\foo" and "C:\foo\bar" directories if they do not already exist.
Reduces full path, filename, and extension to only path
path and file name
path portion of aFilename
Example: PathNameOnly ("C:\foo\bar.txt") = "C:\foo"
Try to delete a file or directory.
If it cannot not be deleted, log a message instead of throwing an exception
Full path of file or directory to be deleted
True if aPath was deleted without error or did not exist
False if there was an exception while trying to delete
If aPath is a directory, all the contents are deleted too.
Helpful for non-critical cleanup of temporary files that may be locked
Try copying file from aFromPath to aToPath
If it cannot not be copied, log a message instead of throwing an exception
Path of existing file
Location for new copy of file
True if file was copied, False if file did not exist or could not be copied