随笔分类 - wpf
摘要:long CalculateFiles() { long totalsize = 0; bgWorker.ReportProgress((int)totalsize, UpProcessType.FileCalculate); foreach (UpdateInfo item in updateinfos) { try { HttpWebRequest webReq = (HttpWebReque...
阅读全文
摘要:微软有一个工具叫ILMerge可以合并dll exe等,但是对于wpf的应用程序而言这个工具就不好用了。我的这方法也是从国外一个博客上找来的。仅供大家参考。第一步:把下面的代码写到你的项目文件的标准的Microsoft.CSharp下面,也就是.csproj的文件里<Target Name="AfterResolveReferences"> <ItemGroup> <EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(Ref
阅读全文
摘要:public DownTemplateView() { InitializeComponent(); System.Net.WebClient c = new System.Net.WebClient(); string path = Environment.CurrentDirectory + "\\Record\\" + CommonHelper.ClassID + "\\"; if (!System.IO.Directory.Exists(path)) Sy...
阅读全文
摘要:/// <summary> /// 复制或剪切文件到剪切板 /// </summary> /// <param name="files">文件路径数组</param> /// <param name="cut">true:剪切;false:复制</param> public static void CopyToClipboard(string[] files, bool cut) { if (files == null) return; IDataObject dat...
阅读全文
摘要:System.Windows.Forms.Application.ExitThread(); System.Windows.Forms.Application.Exit(); System.Windows.Forms.Application.Restart(); Process.GetCurrentProcess().Kill();
阅读全文
浙公网安备 33010602011771号