Products > Test Equipment
My poor mans SMU - The Agilent 66311B
<< < (34/41) > >>
nctnico:

--- Quote from: pigrew on October 04, 2016, 03:30:31 am ---But, for storing data files (like CSV), I assume that you would want to use periods as decimal points?

--- End quote ---
Getting that right is a study in it's own. The quickest solution is to make sure you use the local language setting. This may require extra initialisation in your software.
pigrew:

--- Quote from: nctnico on October 04, 2016, 08:17:33 pm ---
--- Quote from: pigrew on October 04, 2016, 03:30:31 am ---But, for storing data files (like CSV), I assume that you would want to use periods as decimal points?

--- End quote ---
Getting that right is a study in it's own. The quickest solution is to make sure you use the local language setting. This may require extra initialisation in your software.

--- End quote ---

I've made the GUI and the communication with the instrument better respect the system's culture.

However, my question was regarding data files. I'm thinking that the data files should be independent of what computer wrote them? Also, I usually expect commas to separate fields in CSV files, but this would conflict with using a comma as a decimal point.
nctnico:
What works for me when dealing with CSV, configuration, XML, etc files is using a semi-colon to seperate fields and a period as a decimal seperator. In order for this to work I wrote a some C/C++ routines which override the locale setting and process/print numbers with periods as decimal seperators. Displaying is another thing. If all goes well the programming language should detect the selected locale and format numbers accordingly.
samofab:
Your last commit has a bug in ApplyProgram_Click.

you replaced
if (!Double.TryParse(CH1VTextBox.Text, out details.V1)) {
with
if (Validation.GetHasError(CH1VTextBox) || Validation.GetHasError(CH1ITextBox)) {

so you don't actually populate the details with values in textbox fields.

If you give me commit rights, I can fix small errors like this.
pigrew:

--- Quote from: samofab on October 05, 2016, 07:17:51 am ---Your last commit has a bug in ApplyProgram_Click.

......

so you don't actually populate the details with values in textbox fields.


--- End quote ---

Too late at night. Committed untested code. I think that it's fixed now, and I found a number of other bugs. I was trying to switch the fields over to using a ViewModel (I've never used one before), as the easiest fix for handling number formatting issues. It also let me add range validation checks somewhat more easily.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod