自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(104)
  • 资源 (1)
  • 收藏
  • 关注

原创 OssMetro网盘简介及源代码

一 简介     OssMetro网盘是基于阿里云OSS服务开发的一款界面美观,功能强大的网盘应用。界面采用metro风格,使用在官网.Net SDK基础上开发的OSS .NET 4.5 SDK。运行需要安装.NET 4.5 Framework。下载地址: 点击打开链接代码地址:https://github.com/ZhongleiYang/OssMetroClient

2012-10-16 22:50:05 14325 1

原创 阿里云OSS SDK(.NET4.5)开源代码

参加阿里云开发比赛,准备用C#做个oss客户端,发现原来的.net开发包不太好用。正逢微软发布vs2012和 .net4.5,在原来的.net sdk代码基础上重写了SDK。接口与原来的SDK基本保持一致。目前sdk还处于测试和代码优化阶段,我正在用它做个metro风格的客户端。欢迎大家测试和建议。新SDK API基于TPL (Task Parallel Library)。增加

2012-09-11 15:30:31 9667 2

转载 10分钟了解C#中的协变和逆变

http://www.2cto.com/kf/201206/136883.html   作者:cnn237111说十分钟可能有哗众取宠的嫌疑,本人写这个博客,话了半天时间,查阅了很多资料才完成,因此要弄懂协变逆变的本质,可能要多花点时间。-------------------------------------------------------------------------

2013-03-13 11:51:26 1193

转载 《Rework》摘录及感想

转自:http://coolshell.cn/articles/9156.html#jtss-tsina读了《Rework》这本书好多遍,每次读都有不同的感想。但从来没有把这些感想记录下来,今天把《Rework》书中的一些章节做一些摘录,并把我的一些感想总结出来。供大家参考。这是一本平生以来让我中毒很深的书,也是一本让我思考得很多的书。希望看到这篇文章的人都能好好地读读这本书。这本书并

2013-03-11 10:09:31 1040

翻译 10个强大的Visuals Studio调试小技巧

原文:http://www.codeproject.com/Articles/359801/10plus-powerful-debugging-tricks-with-Visual-Studi简介调试是软件开发周期中很重要的一部分。它具有挑战性,同时也很让人疑惑和烦恼。总的来说,对于稍大一点的程序,调试是不可避免的。最近几年,调试工具的发展让很多调试任务变的越来越简单和省时。这篇文

2013-02-23 14:01:06 2613 1

原创 c#生成大量随机码

最近公司需要一个生成大量随机码用于数字销售。代码如下: class Program { static void Main(string[] args) { StreamWriter swriter = new StreamWriter("1.txt", true); for (int i = 0; i

2013-01-17 15:36:27 1641 2

转载 Mono在国内的发展历程(相关文章汇总)

转自:http://www.cnblogs.com/shanyou/archive/2012/07/28/2612919.htmlMono在国内的发展历程(相关文章汇总)一则新闻《软件服务提供商Xamarin融资1200万美元》,更详细的内容可以看Xamarin的官方博客Xamarin raises $12M to help you make better ap

2012-12-28 17:50:17 1330

转载 当你输入一个网址的时候,实际会发生什么?

转自:http://www.cnblogs.com/wenanry/archive/2010/02/25/1673368.html当你输入一个网址的时候,实际会发生什么?原文:http://igoro.com/archive/what-really-happens-when-you-navigate-to-a-url/  作为一个软件开发者,你一定会

2012-11-18 21:35:41 518

转载 VMware Workstation unrecoverable error: (vmx)解决办法

报错内容VMware Workstation unrecoverable error: (vmx)Exception 0xc0000006 (disk error while paging) has occurred.A log file is available in "E:\Red Hat Enterprise Linux 5\vmware.log". A core file is a

2012-11-14 15:37:42 2519

转载 SQL Join的一些总结

转自: http://www.cnblogs.com/rush/archive/2012/03/27/2420246.html1.1.1 摘要Join是关系型数据库系统的重要操作之一,SQL Server中包含的常用Join:内联接、外联接和交叉联接等。如果我们想在两个或以上的表获取其中从一个表中的行与另一个表中的行匹配的数据,这时我们应该考虑使用Join,因为Jo

2012-10-25 14:30:40 585

转载 erlang安装和学习资料

首先来段erlang语言写的示例:快速排序:qsort([]) -> [];qsort([Pivot|T]) ->qsort([X || X ++ [Pivot] ++qsort([X || X = Pivot]).真的很简洁,很有趣。 :)以下转自:http://www.cnblogs.com/goldli/

2012-09-12 17:52:41 822

原创 agsxmpp client 连接openfire

agsxmpp 连接openfire 需修改源代码如下:1. 修改 agsxmpp 里的Mechanism.cs 里                       //case "DIGEST-MD5": //注释掉  case "DIGEST-MD5": 使plain 变为   默认设置                    //return Mechanism

2012-09-10 16:21:43 5055 1

原创 xml的序列化和反序列化

xml的序列化和反序列化简单例子如下: [XmlRoot("Person")] public class Person { [XmlElement("Name")] public string Name; [XmlElement("Age")] public int Age; } cl

2012-09-05 19:30:13 1031

原创 try-catch-finally

try区域里使用资源,catch区域处理try抛出的异常,finally释放资源。finally 是无论是否有异常都执行的语句块。 using System; using System.IO; public class TestTryFinally { public static void Main() {

2012-09-05 19:14:39 578

原创 c# HttpClient上传和下载的进度显示问题

WebClient中有DownloadProgressChangedEventHandler等事件可以响应http请求(或者其他web请求)的进度。在c# 5.0中,HttpClient的函数都是以Task异步函数存在,没有事件可以回调显示上传或下载的进度。我找了很久,终于发现ProgressMessageHandler 可以解决这个问题,链接:http://msdn.microsoft.

2012-08-31 14:05:42 10746 4

原创 c#中的多线程异常处理

1.对于Thread操作的异常处理public static void Main(){  try  {    new Thread (Go).Start();  }  catch (Exception ex)  {    // We'll never get here!    Console.WriteLine ("Exception!");  }}

2012-08-29 15:33:52 11711

原创 Inversion of control (控制反转)

IOC实际上就是为了解耦,减小对象之间的依赖。看下面的图中代码,clsCustomer类依赖clsAdderess类。这样代码会有一个问题,clsAdderess类改了代码以后,clsCustomer类同样需要重编译。解决这个问题,要引入接口对他们进行解耦。比如 构造函数的方法容器实际上这就是mef模式的解决方法。ME

2012-08-22 18:12:39 677

原创 .net 4.5的异步编程

.net 4.5 最大的功能就是对异步编程的改进,增加了await async 关键字让异步编程变的和同步编程一样简单。这个模式是基于task parallel library实现的。下面看下一个简单的wpf程序:  async private void Button_Click_1(object sender, RoutedEventArgs e)        {

2012-08-22 12:45:33 1476

转载 HttpClient in .net Framework 4.5

转自书:C# 5.0 IN A NUTSHELL (待翻译)HttpClientHttpClient is new to Framework 4.5 and provides another layer on top ofHttpWebRequest and HttpWebResponse. It was written in response to the growth

2012-08-21 21:06:49 6376 2

原创 git使用技巧 (1)

git主要分3个区:工作区,暂存区,版本库工作区:目前工作的文件夹暂存区:可以把修改的提交到缓存区,保存起来。相当于提交任务的缓存。版本库:服务器的文件提交:工作区修改后用add命令提交到暂存区,可再在工作区下修改,继续提交到暂存区,用 commit命令把暂存区的change提交到版本库(服务器)。git add

2012-08-13 18:22:56 1369

原创 Caliburn Micro

Caliburn Micro是一个mvvm的框架可以应用于WPF,Silverlight,WP7。具体资料:https://www.mindscapehq.com/blog/index.php/2012/01/12/caliburn-micro-part-1-getting-started/http://www.cnblogs.com/Zhouyongh/archive

2012-08-02 10:29:45 2560

原创 c#程序的远程调试

1. 在远程机器上拷贝msvsmon.exe所在的x86文件夹2. 用管理员权限打开msvsmon.exe3. 在本机上点击vs的tools,attach process;4. 找到需要调试的远程机器名,选择managed(v 4.0), 找到程序列表,attach。注意:  1  两台机器必须用同一账号登录,且是管理员权限,在同一域中。   2 关掉两台机器的防火

2012-07-02 19:38:33 1355

转载 使用 C# 或 Visual Basic 创建你的第一个 Metro 风格应用

http://msdn.microsoft.com/zh-cn/library/windows/apps/br211380使用 C# 或 Visual Basic 创建你的第一个 Metro 风格应用10(共 11)对本文的评价是有帮助 - 评价此主题[本文档尚属初步文档,可能会随时发生更改。]我们将向你介绍使用 C# 或 Microsoft Visual Basi

2012-06-12 18:11:37 1975

转载 License Key Generator

http://licensekeygenerator.codeplex.com/

2012-06-12 18:08:38 2228

转载 How to detect Windows 64 bit platform with .net?

http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-netIntPtr.Size won't return the correct value if running in 32-bit .NET Framework 2.0 on 64-bit Windows

2012-06-12 18:04:47 394

原创 search son or parent process

参考:http://stackoverflow.com/questions/2531837/how-can-i-get-the-pid-of-the-parent-process-of-my-application     Process searchSonProcess(int processId)        {            var myId =

2012-06-12 18:02:27 540

转载 How to: Create a Binding in Code

http://msdn.microsoft.com/en-us/library/ms742863.aspxpublic class MyData : INotifyPropertyChanged{ private string myDataProperty; public MyData() { } public MyData(DateTime date

2012-06-12 17:51:23 369

转载 Custom Command WPF

http://stackoverflow.com/questions/601393/custom-command-wpfI use a static class that I place after the Window1 class (or whatever the window class happens to be named) where I create instances

2012-05-11 16:00:12 816

原创 uninstall software using uninstallString

1. read uninstallString2. parse the string3. run command line

2012-05-04 09:28:44 994

转载 How to Execute a Command in C# ?

http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-CThis article will help you to execute a command in C#, just like we execute a command using the Windows command promptAdd

2012-05-04 09:25:42 789

转载 Why is the Asynchronous mode is better than the Synchronous one when handling clients requests?

http://stackoverflow.com/questions/3161916/why-is-the-asynchronous-mode-is-better-than-the-synchronous-one-when-handling-clYes, asynchronous requests can often be handled without the expense o

2012-05-04 09:20:50 433

转载 FileStream Read File

http://www.csharp-examples.net/filestream-read-file/FileStream Read File [C#]This example shows how to safely read file using FileStream in C#. To be sure the whole file is correctly read,

2012-04-19 13:08:24 2824

转载 Cast int to Enum in C#

http://stackoverflow.com/questions/29482/cast-int-to-enum-in-c-sharpFrom a string:YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString); From an int:YourEnum foo = (YourEnu

2012-04-19 13:07:41 1014

转载 All about abstract classes

http://www.codeproject.com/Articles/6118/All-about-abstract-classesIntroductionAbstract classes are one of the essential behaviors provided by .NET. Commonly, you would like to make classe

2012-04-19 13:06:26 420

转载 C# 获取当前目录的各种方法

Application.StartupPath;Environment.SpecialFolder.ApplicationData Environment.SpecialFolder命名空间可以获取很多特定的路径目录。    Environment.SpecialFolder.       ApplicationData       CommonApplicationData

2012-04-13 17:13:35 11656

原创 metro client

想做一个metro风格的client参照 http://mishrareader.codeplex.com/

2012-04-12 10:47:59 548

原创 c# load dll dynamic and run the method

Assembly testDLL = Assembly.LoadFile(Directory.GetCurrentDirectory() +  @"\testDll.dll");            Type type = testDLL.GetType("testDll.TestClass");            object instanceOfMyType = Activato

2012-04-11 16:22:33 683

转载 XmlnsDefinition for a Cool Namespace Mapping

http://blog.pixelingene.com/2006/10/xmlnsdefinition-for-a-cool-namespace-mapping/In XAML, when you want to reference a CLR type, you have to add a namespace mapping that maps the XML namespa

2012-04-10 17:58:35 1124

转载 How to maintain user.config settings when upgrading

http://bytes.com/topic/c-sharp/answers/522191-how-maintain-user-config-settings-when-upgradingAdd a Setting to your project called ApplicationVersion, then use code likethe following in the star

2012-04-10 17:57:28 366

转载 wpf copy or move file with dialog

http://stackoverflow.com/questions/3041211/show-a-copying-files-dialog-form-while-manually-copying-files-in-cThere is one built in from the Microsoft.VisualBasic.FileIO Namespace. Don'

2012-04-10 17:56:31 623

OssMetro网盘

OssMetro网盘是基于阿里云OSS服务开发的一款界面美观,功能强大的网盘应用。界面采用metro风格,使用在官网.Net SDK基础上开发的OSS .NET 4.5 SDK。运行需要安装.NET 4.5 Framework。

2012-10-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除