Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6524

How to use the DisplayEditNumericFormatDialog method of Teststand API

$
0
0

Hi,

 

I have to build a coustom report generator plugin for Teststand by using c#. In the Teststand API there is a method integrated called "DisplayEditNumericFormatDialog"

http://zone.ni.com/reference/en-XX/help/370052M-01/tsapiref/reftopics/propertyobject_displayeditnumericformatdialog_m/

 

Is there a way to set the sample value of the window that will appear if the method is called?

 

Window

 

I do the following things:

 

 private void button1_Click(object sender, EventArgs e)
        {
            mChanged = true;
            bool tempbool;

            PropertyObject tempobject = mEngine.NewPropertyObject(PropertyValueTypes.PropValType_Number, false, "", 0); //creates a temporary PropertyOgject to show the EditNumericFormatWindow 

            tempobject.NumericFormat = mConfig.GetValString(P_PluginSpecific_Options_NumericFormat, 0); //read the numeric format of the plugin options
            tempobject.DisplayEditNumericFormatDialog("Numeric Format", out(tempbool), 1); //Show the EditNimericFormatWindow

            if (tempobject.NumericFormat == "") mConfig.SetValString(P_PluginSpecific_Options_NumericFormat, 0, "%$.13g");
            else mConfig.SetValString(P_PluginSpecific_Options_NumericFormat, 0, tempobject.NumericFormat);

            MessageBox.Show(tempobject.NumericFormat.ToString());
        }

 

thanks in advance


Viewing all articles
Browse latest Browse all 6524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>