public static bool Checkvalues (string isscreenshot, String screenshottime, String screenshotsavepath)
{
Try
{
BOOL Flage = false;
DataTable dt = Returntbbyreradxml (BasePath, "screenshot");
if (dt! = NULL)
{
for (int i = 0; i < dt. Rows.Count; i++)
{
if (dt. rows[i]["Isscreenshot"]. ToString () = = Isscreenshot)
{
if (dt. rows[i]["Screenshottime"]. ToString () = = Screenshottime)
{
if (dt. rows[i]["Screenshotsavepath"]. ToString () = = Screenshotsavepath)
{
Flage = true;
Break
}
}
}
}
return flage;
}
Else
{
return flage;
}
}
Catch
{
return false;
}
}
public static DataTable Returntbbyreradxml (String filename,string NodeName)
{
Try
{
DataSet ds = new DataSet ();
DataTable dt = new DataTable ();
if (file.exists (fileName))
{
Ds. READXML (FileName);
if (ds = = null)
{
return null;
}
Else
{
DT = ds. Tables[nodename];
Return dt. Copy ();
}
}
Else
{
return null;
}
}
Catch
{
return null;
}
}
BasePath------------File Store Road strength
Isscreenshot, Screenshottime, Screenshotsavepath, filename,nodename-----------------------node name
C # WinForm Determines whether the current parameter value is consistent with the value in the node