private void btnOpenTestDescription_Click( object sender, EventArgs e )
{
String content = openTestDescription();
edtTestDescription.Text = content;
/*
XmlReader reader = XmlReader.Create(new StringReader(content));
XmlSerializer serializerObj = new XmlSerializer(typeof(TestDescription));
TestDescription testDescription = (TestDescription)serializerObj.Deserialize(reader);
lvRequiredSignals.Items.Clear();
foreach( SignalRequirementsSignalRequirement sigReq in testDescription.SignalRequirements )
{
ListViewItem itm = new ListViewItem(sigReq.TsfClassAttribute.ToString() );
lvRequiredSignals.Items.Add(itm);
}
DetailedTestInformation detail = testDescription.DetailedTestInformation;
foreach( ActionType action in detail.Actions )
{
ActionTypeBehavior behavior = action.Behavior;
if( behavior.Item.GetType() == typeof(IeeeStd1641) )
{
IeeeStd1641 sig = (IeeeStd1641)behavior.Item;
if( sig.Any != null )
{
XmlDocument signal = new XmlDocument();
signal.LoadXml(sig.Any.InnerXml);
if( signal.Name == "Signal" )
{
ListViewItem itm = new ListViewItem(signal.InnerXml);
lvRequiredSignals.Items.Add(itm);
}
}
foreach( IeeeStd1641GlobalSignalOperation go in sig.GlobalSignalOperations )
{
if( go.Item.GetType() == typeof(IeeeStd1641GlobalSignalOperationDefine) )
{
IeeeStd1641GlobalSignalOperationDefine define = (IeeeStd1641GlobalSignalOperationDefine)go.Item;
ListViewItem itm = new ListViewItem(define.signalName);
lvRequiredSignals.Items.Add(itm);
}
}
}
}
*
*
* <tsf:AC_SIGNAL name="VIN1" ac_ampl="4.0mV" freq="1.0kHz"/>
<std:TwoWire name="Conn10" hi="J1-1" lo="J1-2" In="VIN1"/>
<!--Measure Amplitude of AC_SIGNAL at J1-3, J1-4-->
<std:TwoWire name="Conn17" hi="J1-3" lo="J1-4"/>
<tsf:DC_SIGNAL name="V_O3" ac_ampl="range 0mV to 100mV errlmt +- 0.1mV" freq="1000Hz"/>
<std:Measure name="Meas4" As="V_O3" attribute="ac_ampl" In="Conn17"/>
*/
}