本文整理汇总了C#中System.IO.FileSystem.LoadFileData方法的典型用法代码示例。如果您正苦于以下问题:C# FileSystem.LoadFileData方法的具体用法?C# FileSystem.LoadFileData怎么用?C# FileSystem.LoadFileData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.FileSystem
的用法示例。
在下文中一共展示了FileSystem.LoadFileData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindData
private void BindData()
{
FileSystem fs = new FileSystem(Globals.CurrentIdentity);
CFile file = fs.GetFile(GetFileID());
if (!GetStudentMode()) {
divPerms.Visible = true;
ucFilePerms.FileID = file.ID;
ucFilePerms.BindData();
} else
divPerms.Visible = false;
cmdUpdate.Visible = iDirections.Visible = divUpload.Visible = !GetStudentMode();
txtName.Text = file.Alias;
if (file.IsDirectory()) {
divData.Visible = false;
txtType.Enabled = false;
txtType.Text = "Folder";
}
else {
divData.Visible = true;
txtType.Enabled = true;
txtType.Text = Path.GetExtension(file.Name);
txtDesc.Text = file.Description;
if (txtType.Text == ".url") {
fs.LoadFileData(file);
string url = new string(file.Data);
txtUrl.Text = url;
lnkEdit.Attributes.Add("onClick",
@"window.open('" + url + "', '"+"Mike"[email protected]"', 'width=800, height=600 " +
@", scrollbars=yes, menubar=yes, resizable=yes, status=yes, toolbar=yes')");
lnkDownload.Enabled = false;
rdbData.Checked = false; rdbLink.Checked = true;
} else {
txtUrl.Text = "";
rdbData.Checked = true; rdbLink.Checked = false;
lnkEdit.Attributes.Add("onClick",
@"window.open('Controls/Filesys/viewfile.aspx?FileID=" + file.ID +
@"', '"[email protected]"', 'width=770, height=580')");
lnkDownload.Attributes.Add("onClick",
@"window.open('Controls/Filesys/dlfile.aspx?FileID=" + file.ID +
@"', '"[email protected]"', 'width=770, height=580')");
lnkDownload.Enabled = true;
}
}
txtType.Enabled = txtDesc.Enabled = txtName.Enabled =
!GetStudentMode();
}
示例2: ReDiscover
public string ReDiscover(AutoEvaluation eval, out double points, out int time, out int count)
{
string xmltests;
FileSystem fs = new FileSystem(Globals.CurrentIdentity);
CFile zone = fs.GetFile(eval.ZoneID);
CFile xmldesc = fs.GetFile(Path.Combine(zone.FullPath, "__testsuite.xml"));
if (xmldesc == null)
throw new JUnitToolException("No proper JUnit Test Suite uploaded");
fs.LoadFileData(xmldesc);
xmltests = new string(xmldesc.Data);
GetSuiteInfo(xmltests, out points, out time, out count);
return xmltests;
}