Beruflich Dokumente
Kultur Dokumente
1. Main Screen
The above is the Main Screen (Startup Screen) of Flat to CSV Converter.
Class: CMainScreen
Methods: 1. btnStart_Click ( ): This method is invoked when Button Start is clicked. 2. btnExit_Click ( ): This method is invoked when Button Exit is clicked.
1. MaximizeBox = false
User can select the flat file by clicking on the Browse button or can manually enter the path in the Textbox shown.
The above is the Browse Screen of Flat to CSV Converter; it is invoked when User clicks on the Start button of the Main Screen.
Class: CBrowseScreen
Methods:
1. btnBrowse_Click () : This method is invoked when Browse button is clicked 2. txtFilePath_TextChanged (): This method is invoked when there is a change in the text of the TextBox . 3. btnOK_Click():This method is invoked when OK button is clicked 4. btnCancel_Click():This method is invoked when Cancel button is clicked
The above is the Parameters Screen of Flat to CSV Converter; it is displayed by the Application to the User containing specifications of the Flat file.
Class: CParametersScreen
Properties: NCols: Holds the Ncols Value as a string type. Nrows: Holds the Nrows Value as a string type. Xllcorner: Holds the Xllcorner Value as a string type. Yllcorner: Holds the Yllcorner Value as a string type. Cellsize: Holds the Cellsize Value as a string type. NoDataValue: Holds the NoDataValue Value as a string type.
Method: ShowParameters (): Displays the above properties on the Parameters Screen
1. MaximizeBox = false 2. MinimizeBox = false 3. StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 4. FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle 4. Class: CCSVConverter
This is a singleton class containing methods, properties and members which are used to create the CSV file at the same directory location as the flat file. Read and get the Parameters from the Flat file. Do calculations required and store them in DataTable(.Net DataType) and finally write them to the CSV file.
Members: 1. m_XllCorner : Holds the XllCorner value as static and Double type 2. m_YllCorner : Holds the YllCorner value as static and Double type 3. m_XllValue : Holds the updated Easting value as static and Double type 4. m_YllValue : Holds the updated Northing value as static and Double type 5. m_CellSize : Holds the CellSize value as static and Double type 6. m_NoDataValue : Holds the NoDataValue value as static and Double type Method: 1. DataExtractor(): This method extracts the Parameters from the Flat file and saves it in the Properties of the CParameters object. It also reads all the Height values, does the conversion process and saves converted values in DataTable type. 2. LineParser(): This method parses each and every Line of the Height value does the conversion and returns the updated Easting and Northing values.
3. GetParameter():This method gets the Parameters in a proper format required to save in the converted CSV file. 4. WriteToStream(): This method physically writes the data into the CSV file. 5. ConvertWhitespaceToSpaces(): This method converts whitespaces in a string to spaces required for string manipulations.
displayed.
Class: CConversionCompleted
Property: CSVFilePath as a String type, will Save the Path of the Converted CSV file.
Method:
linkLabel1_LinkClicked(): This method is invoked when the User clicks on the link shown above in blue color, this method invokes the converted CSV file in the MS Excel or any Application set by user to invoke the CSV file.
6. Class : CFileDetails
Property:
FlatFilePath as a String type. This property saves the path of the Flat file(.asc) directory path.