当前位置: 首页>>代码示例>>C#>>正文


C# Microsoft.Reset方法代码示例

本文整理汇总了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();
 }
开发者ID:carlosgilf,项目名称:prettyjs,代码行数:10,代码来源:ReportRender.cs

示例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;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:52,代码来源:Copy.cs

示例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();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:Copy.cs

示例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();
 }
开发者ID:carlosgilf,项目名称:prettyjs,代码行数:15,代码来源:DynamicReport.cs


注:本文中的Microsoft.Reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。