// Prompt information
System. Text. stringbuilder strmsg = New System. Text. stringbuilder ( " Query Information: <HR color = Red> " );
// File directory and name
String Strcurdir, filename, fileext;
// The default value is the directory of the current page.
Strcurdir = Server. mappath ( " Data/historymap/ " );
Fileinfo fi;
Directoryinfo dir;
// Create a directory reference object for the current directory
Directoryinfo dirinfo = New Directoryinfo (strcurdir );
// Cyclically identifies objects of a specified date
Findfile # Region Findfile
Foreach (Filesysteminfo FSI In Dirinfo. getfilesysteminfos ())
{
Filename = "" ;
Fileext = "" ;
If (FSI Is Fileinfo)
{
Fi = (Fileinfo) FSI;
// Get File Name
Filename = Fi. Name;
// Get the file extension
Fileext = Fi. extension;
If (Fileext = " . Rel " )
{
If (Filename = Strrelfilename)
{
Isexistrelfile= True;
}
}
If (Fileext = " . Jpg " )
{
If (Filename = Strjpgfilename)
{
Isexistjpgfile= True;
}
}
}
Else // Otherwise, it is a directory.
{
Dir = (Directoryinfo) FSI;
// Get directory name
Filename = Dir. Name;
// Set the file extension to "folder"
Fileext = " Folder " ;
}
}
# Endregion
// If both files exist
If (Isexistrelfile && Isexistjpgfile)
{
Strmsg. append (strdatenow + " Warning chart query successful! " );
Strstate. Text = Strmsg. tostring ();
// Controls the map window to display the historical graph.
Showhistorymap # RegionShowhistorymap
//Code to be added
# Endregion
}
Else
{
Strmsg. append ( " Not found " + Strdatenow + " Warning chart! " );
Strstate. Text = Strmsg. tostring ();
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.