本文整理汇总了C#中Microsoft.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Reset方法的具体用法?C# Microsoft.Reset怎么用?C# Microsoft.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.Reset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowReport
public void ShowReport(Microsoft.Reporting.WinForms.ReportViewer rptViewer)
{
var report=GenerateRdl();
DumpRdl(report);
rptViewer.Reset();
rptViewer.LocalReport.DisplayName = string.IsNullOrEmpty(BuildReport.PageHeaderText) ? "Report" : BuildReport.PageHeaderText;
rptViewer.LocalReport.LoadReportDefinition(report);
rptViewer.LocalReport.DataSources.Clear();
rptViewer.RefreshReport();
}
示例2: CopyFileWithLogging
private bool CopyFileWithLogging(Microsoft.Build.Tasks.FileState sourceFileState, Microsoft.Build.Tasks.FileState destinationFileState)
{
bool exists = false;
if (Directory.Exists(destinationFileState.Name))
{
base.Log.LogErrorWithCodeFromResources("Copy.DestinationIsDirectory", new object[] { sourceFileState.Name, destinationFileState.Name });
return false;
}
if (Directory.Exists(sourceFileState.Name))
{
base.Log.LogErrorWithCodeFromResources("Copy.SourceIsDirectory", new object[] { sourceFileState.Name });
return false;
}
string directoryName = Path.GetDirectoryName(destinationFileState.Name);
if (((directoryName != null) && (directoryName.Length > 0)) && !Directory.Exists(directoryName))
{
base.Log.LogMessageFromResources(MessageImportance.Normal, "Copy.CreatesDirectory", new object[] { directoryName });
Directory.CreateDirectory(directoryName);
}
if (this.overwriteReadOnlyFiles)
{
this.MakeFileWriteable(destinationFileState, true);
exists = destinationFileState.Exists;
}
bool flag2 = false;
if (this.UseHardlinksIfPossible)
{
base.Log.LogMessageFromResources(MessageImportance.Normal, "Copy.HardLinkComment", new object[] { sourceFileState.Name, destinationFileState.Name });
if (!this.overwriteReadOnlyFiles)
{
exists = destinationFileState.Exists;
}
if (exists && !IsMatchingSizeAndTimeStamp(sourceFileState, destinationFileState))
{
Microsoft.Build.Shared.FileUtilities.DeleteNoThrow(destinationFileState.Name);
}
flag2 = Microsoft.Build.Tasks.NativeMethods.CreateHardLink(destinationFileState.Name, sourceFileState.Name, IntPtr.Zero);
if (!flag2)
{
Exception exceptionForHR = Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error());
base.Log.LogMessageFromResources(MessageImportance.Low, "Copy.RetryingAsFileCopy", new object[] { sourceFileState.Name, destinationFileState.Name, exceptionForHR.Message });
}
}
if (!flag2)
{
base.Log.LogMessageFromResources(MessageImportance.Normal, "Copy.FileComment", new object[] { sourceFileState.Name, destinationFileState.Name });
File.Copy(sourceFileState.Name, destinationFileState.Name, true);
}
destinationFileState.Reset();
this.MakeFileWriteable(destinationFileState, false);
return true;
}
示例3: MakeFileWriteable
private void MakeFileWriteable(Microsoft.Build.Tasks.FileState file, bool logActivity)
{
if (file.Exists && file.IsReadOnly)
{
if (logActivity)
{
base.Log.LogMessageFromResources(MessageImportance.Low, "Copy.RemovingReadOnlyAttribute", new object[] { file.Name });
}
File.SetAttributes(file.Name, FileAttributes.Normal);
file.Reset();
}
}
示例4: ShowReport
public void ShowReport(Microsoft.Reporting.WinForms.ReportViewer rptViewer)
{
if (m_dataSet == null)
{
m_dataSet = new DataTable();
m_dataSet.Columns.Add("JustForNoError");
}
GetColumns();
rptViewer.Reset();
rptViewer.LocalReport.DisplayName = string.IsNullOrEmpty(Rdl.PageHeaderText) ? "Report" : Rdl.PageHeaderText;
rptViewer.LocalReport.LoadReportDefinition(m_rdl);
rptViewer.LocalReport.DataSources.Clear();
rptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("MyData", m_dataSet));
rptViewer.RefreshReport();
}