2012年3月30日

Upload Large file

摘要: public static string MyUploader(string strFileToUpload, string strUrl){ string strFileFormName = "file"; Uri oUri = new Uri(strUrl); string strBoundary = "----------" + DateTime.Now.Ticks.ToString("x"); // The trailing boundary string byte[] boundaryBytes = Encoding.ASC 阅读全文

posted @ 2012-03-30 15:59 Y# 阅读(357) 评论(0) 推荐(0) 编辑

2011年11月24日

BingMapsSDK

摘要: http://msdn.microsoft.com/en-us/library/dd877180.aspx 阅读全文

posted @ 2011-11-24 08:59 Y# 阅读(100) 评论(0) 推荐(0) 编辑

2011年11月11日

鼠标 控件 位置 关系

摘要: //To get a point relative to a UI element: private Point GetPointRelativeToElement(UIElement element, Point point) { return element.TranslatePoint(point, element); }//To get the absolute screen position of a UI element, private Point GetAbsolutePositionOfElement(UIElement element) { return e... 阅读全文

posted @ 2011-11-11 19:34 Y# 阅读(168) 评论(0) 推荐(0) 编辑

2011年8月16日

LS 存取文件

摘要: partial void GetFile_Execute() { // Download file from selected record. var doc = this.DocumentsSet.SelectedItem; if (doc == null) return; Dispatchers.Main.BeginInvoke(() => { SaveFileDialog sfd = new SaveFileDialog(); string defaultFilter = "Images *.jpg, *.png, *.gif|*.jpg;*.png;*.gif|Docu 阅读全文

posted @ 2011-08-16 16:03 Y# 阅读(180) 评论(0) 推荐(0) 编辑

2011年6月15日

验证证书和安装证书

摘要: protected void Page_Load(object sender, EventArgs e) { if (!isExsitCertificate(StoreLocation.CurrentUser, StoreName.Root, X509FindType.FindByIssuerName, "CN=颁发者名称")) { //从证书文件载入证书,如果含有私钥的,需要提供保存证书时设置的密码 string path = Server.MapPath(@"") + "\\scriptx\\Root.cer"; X509Cert 阅读全文

posted @ 2011-06-15 18:00 Y# 阅读(379) 评论(1) 推荐(0) 编辑

2011年6月14日

各种版本

摘要: using System.Deployment.Application; Content.Text = "程序集版本:" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() +"\n"; Content.Text += "文件版本:" + Application.ProductVersion.ToString() +"\n"; Content.Text += "部署版本:" + Appl 阅读全文

posted @ 2011-06-14 08:45 Y# 阅读(166) 评论(0) 推荐(0) 编辑

2011年6月13日

Uri

摘要: /WpfApplication1;component/Images/Untitled.png", UriKind.Relative);This will load a image called "Untitled.png" in a folder called "Images" with its "Build Action" set to "Resource" in an assembly called "WpfApplication1". 阅读全文

posted @ 2011-06-13 18:19 Y# 阅读(123) 评论(0) 推荐(0) 编辑

证书

摘要: 一、从 .pvk 和 .spc 格式转换成 .pfx 格式 (1) 下载微软的转换工具软件: pvkimprt.rar ,并成功安装; (2) 请确认您电脑上已经安装了颁发代码签名证书的中级根证书,如果没有,请先点击安装: WoSignt代码签名证书的中级根证书: WoSign Code Signing Authority (3) 在 DOS 状态下,进入保存两个签名证书文件 mycert.pvk 和 mycert.spc 的目录,请键入命令: pvkimprt mycert.spc mykey.pvk 按提示输入私钥密码后,启动证书导入过程,按几个回车就成功把证书导入到 Windows 证书 阅读全文

posted @ 2011-06-13 13:04 Y# 阅读(706) 评论(0) 推荐(0) 编辑

2011年6月9日

ClickOnce FIleAssociation Commandline

摘要: Traditionally, handling command-line args in an app has been a simple case of reading arguments from the “int main()” function (or equivalent). In WPF this changes somewhat.The usual setup is that you have your App.xaml.cs, which loads your initial window. While it’s the former that has access to th 阅读全文

posted @ 2011-06-09 15:59 Y# 阅读(266) 评论(0) 推荐(0) 编辑

2011年6月8日

Single Instance Application

摘要: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.VisualBasic.dllusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;namespace PGPowerPoint_ListTool{ class SingleInstanceApplicationWrapper:Microsoft.VisualBasic.A 阅读全文

posted @ 2011-06-08 14:17 Y# 阅读(206) 评论(0) 推荐(0) 编辑

导航