本文整理汇总了C#中DataSet.Exists方法的典型用法代码示例。如果您正苦于以下问题:C# DataSet.Exists方法的具体用法?C# DataSet.Exists怎么用?C# DataSet.Exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSet
的用法示例。
在下文中一共展示了DataSet.Exists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Evaluate
//
// - Methods -
//
public override bool Evaluate(DataSet dataSet)
{
return (dataSet.Exists(this.tagSequence));
}
示例2: Execute
protected override void Execute()
{
try
{
WriteHtmlInformation("<br />");
WriteInformation(string.Format("Reading reference media file from {0}",DCMCompareForm.firstDCMFile));
WriteHtmlInformation("<br />");
// Read the DCM File
DicomFile dcmFile = new DicomFile();
DataSet refDataset = new DataSet();
if ((DCMCompareForm.firstDCMFile.ToLower().IndexOf("dicomdir")) != -1)
{
// Read the DICOMDIR dataset
refDataset.DvtkDataDataSet = Dvtk.DvtkDataHelper.ReadDataSetFromFile(DCMCompareForm.firstDCMFile);
}
else
{
dcmFile.Read(DCMCompareForm.firstDCMFile, this);
refDataset = dcmFile.DataSet;
}
refDataset.UnVrDefinitionLookUpWhenReading = false;
FileMetaInformation refFMI = dcmFile.FileMetaInformation;
WriteInformation(string.Format("Reading source media file from {0}",DCMCompareForm.secondDCMFile));
WriteHtmlInformation("<br />");
DataSet srcDataset = new DataSet();
if ((DCMCompareForm.secondDCMFile.ToLower().IndexOf("dicomdir")) != -1)
{
// Read the DICOMDIR dataset
srcDataset.DvtkDataDataSet = Dvtk.DvtkDataHelper.ReadDataSetFromFile(DCMCompareForm.secondDCMFile);
}
else
{
dcmFile.Read(DCMCompareForm.secondDCMFile, this);
srcDataset = dcmFile.DataSet;
}
srcDataset.UnVrDefinitionLookUpWhenReading = false;
FileMetaInformation srcFMI = dcmFile.FileMetaInformation;
// Now get the list of filtered attribute
if(DCMCompareForm.attributesTagList.Count != 0)
{
foreach(string filterAttr in DCMCompareForm.attributesTagList)
{
try
{
if(srcDataset.Exists(filterAttr))
{
srcDataset.Delete(filterAttr);
}
if(refDataset.Exists(filterAttr))
{
refDataset.Delete(filterAttr);
}
}
catch(Exception exception)
{
MessageBox.Show(exception.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
DCMCompareForm.attributesTagList.Clear();
}
WriteInformation(string.Format("Comparing the Media files - {0} and {1}",DCMCompareForm.firstDCMFile,DCMCompareForm.secondDCMFile));
WriteHtmlInformation("<br />");
StaticDicomCompare staticDicomCompare = new StaticDicomCompare();
//Determine the VR display based on Transfer syntax
string srcTransferSyntax = "";
string refTransferSyntax = "";
if((srcFMI != null) && srcFMI.Exists("0x00020010"))
{
// Get the Transfer syntax
DvtkHighLevelInterface.Dicom.Other.Attribute tranferSyntaxAttr = srcFMI["0x00020010"];
srcTransferSyntax = tranferSyntaxAttr.Values[0];
}
else
{
WriteHtmlInformation(string.Format("Couldn't retrieve the Transfer syntax from DCM File {0}",DCMCompareForm.secondDCMFile));
WriteHtmlInformation("<br />");
}
if((refFMI != null) && refFMI.Exists("0x00020010"))
{
// Get the Transfer syntax
DvtkHighLevelInterface.Dicom.Other.Attribute tranferSyntaxAttr = refFMI["0x00020010"];
refTransferSyntax = tranferSyntaxAttr.Values[0];
}
else
//.........这里部分代码省略.........