随笔分类 -  C#

摘要:转:证书加密导入导出C#操作2011年12月15日 使用X.509数字证书加密解密实务(一)-- 证书的获得和管理 一、 获得证书... 2 1、 从CA获得... 2 2、 从windows2003证书服务中获得... 2 3、 使用makecert工具获得... 2 二、 证书的保存... 2 1、 保存在证书存储区... 2 2、 以文件形式保存... 4 2.1. 带有私钥的证书... 4 2.2. 二进制编码的证书... 4 2.3. Base64编码的证书... 4 3、 存储区中的证书跟证书文件相互转换... 4 3.1. 使用工具相互转换... 4 ... 阅读全文
posted @ 2012-12-10 14:04 xiaofoyuan 阅读(7347) 评论(0) 推荐(0)
摘要:http://msdn.microsoft.com/en-us/library/gg442303(v=VS.92).aspx 阅读全文
posted @ 2012-11-13 16:10 xiaofoyuan 阅读(139) 评论(0) 推荐(0)
摘要:1、App设计参考资料http://www.windows8designhandbook.com/2、http://social.msdn.microsoft.com/Forums/zh-CN/wpfzhchs/thread/b09e0e45-7af1-4702-af42-44a7d036e196/宽图动画移动3、http://www.williamlong.info/archives/3286.html win8应用设计 阅读全文
posted @ 2012-11-08 09:33 xiaofoyuan 阅读(251) 评论(0) 推荐(0)
摘要:1、文件选择FileOpenPicker filePicker = new FileOpenPicker() { ViewMode = PickerViewMode.Thumbnail }; //只有图片 filePicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; FillDecoderExtensions(filePicker.FileTypeFilter); StorageFile imageFile = await filePicke... 阅读全文
posted @ 2012-11-07 16:07 xiaofoyuan 阅读(1938) 评论(0) 推荐(1)
摘要:private StorageFile _storageFile;/// <summary> /// 上传文件 /// </summary> /// <param name="url"></param> /// <returns></returns> public async Task<object> UpLoad(string url) { try { //读取文件流 Stream _stream = aw... 阅读全文
posted @ 2012-11-07 15:22 xiaofoyuan 阅读(1130) 评论(0) 推荐(1)
摘要:window.external()函数可以触发后台的ScriptNotify方法 阅读全文
posted @ 2012-11-06 15:39 xiaofoyuan 阅读(278) 评论(0) 推荐(0)
摘要:MemoryStreamstream;byte[] b=stream.ToArray(); string s = System.Text.Encoding.UTF8.GetString(b,0,b.Length); 阅读全文
posted @ 2012-11-02 15:47 xiaofoyuan 阅读(11573) 评论(0) 推荐(1)
摘要:http://json2csharp.com/ 阅读全文
posted @ 2012-10-09 13:25 xiaofoyuan 阅读(344) 评论(0) 推荐(0)
摘要:http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868252.aspxhttp://software.intel.com/zh-cn/articles/Wenxi/中文版,比较详细模拟通知地址:https://manage.dev.live.com/buildhttp://msdn.microsoft.com/zh-cn/library/windows/apps/hh779725.aspx磁贴通知简介和示例 阅读全文
posted @ 2012-08-09 17:20 xiaofoyuan 阅读(174) 评论(0) 推荐(0)
摘要:1、https://www.factual.com/keys/request 第三方地图开发参考网站2、https://developers.google.com/maps/documentation/javascript/谷歌地图开发参考资料 阅读全文
posted @ 2012-04-13 14:23 xiaofoyuan 阅读(222) 评论(0) 推荐(0)
摘要:privateIsolatedStorageSettings setting = IsolatedStorageSettings.ApplicationSettings;//创建键值对对象//存储键值对public void WirteIsolatedStorageSetting(string key, object value) { try { if (!setting.Contains(key))//根据键名判断键是否存在 { setting.Add(key, value);//添加新的键值对数据 } else {... 阅读全文
posted @ 2012-02-20 10:02 xiaofoyuan 阅读(540) 评论(0) 推荐(0)
摘要:/// <summary> /// 使用webclient下载图片 /// </summary> /// <param name="zimgName">图片名称</param> /// <param name="zimgURL">图片地址</param> public void WriteZImg(string zimgName, string zimgURL) { try { //声明图片保存路径变量 string imageSavePath = string.Empty; usi 阅读全文
posted @ 2012-02-02 15:42 xiaofoyuan 阅读(1034) 评论(0) 推荐(2)
摘要:原文地址:http://jonas.follesoe.no/2011/07/22/qr-code-scanning-on-windows-phone-75-using-zxlib/示例代码下载地址:https://github.com/follesoe/WinPhoneSamples/tree/master/ScannerDemo 阅读全文
posted @ 2012-01-09 16:48 xiaofoyuan 阅读(383) 评论(0) 推荐(1)
摘要:http://msdn.microsoft.com/en-us/library/hh202956(v=VS.92).aspx 阅读全文
posted @ 2012-01-06 16:06 xiaofoyuan 阅读(164) 评论(0) 推荐(0)
摘要:foreach(System.Net.Cookie cookie in webIf.Cookie.GetCookies(new Uri("http://baidu.com"))){ string str= cookie.Name + "=" + cookie.Value;} 阅读全文
posted @ 2012-01-04 15:58 xiaofoyuan 阅读(1013) 评论(0) 推荐(0)
摘要://创建ListBoxItemListBoxItem li = new ListBoxItem();li.Content = "test";//创建ContextMenu ContextMenu menu = new ContextMenu(); MenuItem menuItem1 = new MenuItem(); menuItem1.Header = "This is Menu Item 1"; menuItem1.Click += new RoutedEventHandler(MenuItem_Click); menu.Items.Add(men 阅读全文
posted @ 2011-12-19 11:33 xiaofoyuan 阅读(468) 评论(0) 推荐(0)
摘要://开始时间TimeSpan start = new TimeSpan(DateTime.Now.Ticks);//结束时间TimeSpan end=new TimeSpan(DateTime.Now.Ticks);//计算两个时间之间的毫秒级的时间差((TimeSpan)(start.Subtract(end).Duration())).TotalMilliseconds 阅读全文
posted @ 2011-12-15 13:50 xiaofoyuan 阅读(393) 评论(0) 推荐(0)