09 2011 档案

摘要:只用代码创建WPF应用:1、VS2010新建|Visual C#|Windows窗体应用程序;名称(NonCompiledXaml)2、Solution Explorer中删除Form1.cs组3、新建项Visual C#|类;名称(Window1)4、Window1.cs的代码using System.Windows;using System.Windows.Controls;using System.Windows.Markup;using System.Drawing;using System.Windows.Media;public class Window1 : Window{ .. 阅读全文
posted @ 2011-09-30 15:16 jacky_j2ee 阅读(211) 评论(0) 推荐(0)
摘要:WPF窗口以及其中所有元素都是使用设备无关单位(device-independent unit)进行度量,一个设备无关单位被定义为1/96英寸。WINDOWS系统中默认为96dpi,即每英寸96个像素;WINDOWS系统通过系统DPI设置告诉WPF,96个像素构成1英寸。最终显示依赖于显示设备。1600像素 x 1200像素 的19英寸的屏幕DPI为100dpi;换句话说,100个像素为1英寸;96像素在此屏幕上的显示会稍小于1英寸。1024像素 x 768像素 的15英寸的屏幕DPI为85dpi;此时96像素在此屏幕上得显示会大于1英寸。2011.09.27 补充:对应设备一个单位 = 一个 阅读全文
posted @ 2011-09-21 22:23 jacky_j2ee 阅读(229) 评论(0) 推荐(0)
摘要:[DataContract] public class Customer { private string firstName; private string lastName; [DataMember] public string FirstName { get { return fi... 阅读全文
posted @ 2011-09-07 15:25 jacky_j2ee 阅读(184) 评论(0) 推荐(0)
摘要:正常代码private TestServiceClient proxy = new TestServiceClient();EndpointAddress address = new EndpointAddress("http://localhost:2345/TestService.svc");......proxy.Endpoint.Address = address;修改为如下代码报错private TestServiceClient proxy = new TestServiceClient();EndpointAddress address = new Endpo 阅读全文
posted @ 2011-09-07 14:40 jacky_j2ee 阅读(8491) 评论(2) 推荐(0)
摘要:同步是阻塞模式,异步是非阻塞模式。 ---------------------------------------------------------------我的理解:同步是指两个线程的运行是相关的,其中一个线程要阻塞等待另外一个线程的运行。异步的意思是两个线程毫无相关,自己运行自己的。--------------------------------------------------------------同步是指:发送方发出数据后,等接收方发回响应以后才发下一个数据包的通讯方式。 异步是指:发送方发出数据后,不等接收方发回响应,接着发送下个数据包的通讯方式。摘录自http://www. 阅读全文
posted @ 2011-09-06 14:16 jacky_j2ee 阅读(205) 评论(0) 推荐(0)
摘要:设置Silverlight的界面编写代码using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shape 阅读全文
posted @ 2011-09-06 11:23 jacky_j2ee 阅读(211) 评论(0) 推荐(0)
摘要:第一步是增加服务引用创建代理类右键添加服务引用确定 阅读全文
posted @ 2011-09-06 10:58 jacky_j2ee 阅读(171) 评论(0) 推荐(0)
摘要:1.新建一个Silverlight项目确定确定2.创建Web Services右键ASP.NET项目,选择添加新项确定随后系统会自动生成2个文件打开TestService.svc.cs编写测试代码using System;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.ServiceModel.Activation;namespace WebServiceTest.Web{ [ServiceContract(Namespace = "")] 阅读全文
posted @ 2011-09-06 10:17 jacky_j2ee 阅读(194) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2011-09-06 09:46 jacky_j2ee 阅读(379) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2011-09-06 09:41 jacky_j2ee 阅读(133) 评论(0) 推荐(0)
摘要:string idTag = "123-890";string theTag = idTag;2个变量将指向同一个对象。 阅读全文
posted @ 2011-09-04 09:26 jacky_j2ee 阅读(117) 评论(0) 推荐(0)
摘要:方式一public enum Color : long{ Red, Green = 50, Blue}Red的值为0 Green的值为50 Blue的值为51 且都为long类型(不加类型,默认为int类型)方式二using System;namespace Sample{ class Sample { [Flags] public enum AccessFlag { NoAccess = 0x0, ReadAccess = 0x1, WriteAccess = 0x2, ExecuteAccess = 0x4 } static void Main() { ... 阅读全文
posted @ 2011-09-04 09:12 jacky_j2ee 阅读(148) 评论(0) 推荐(0)
摘要:System.Console.WriteLine(42.ToString());即使最基本的类型都是一个对象~ 阅读全文
posted @ 2011-09-02 20:49 jacky_j2ee 阅读(108) 评论(0) 推荐(0)
摘要:正确方式 int[,,,] temp = new int[2,3,4,5]; temp = new int[,,,] { { { {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5} }, { {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, }, { {1, 2, 3, 4, 5},... 阅读全文
posted @ 2011-09-02 16:09 jacky_j2ee 阅读(145) 评论(0) 推荐(0)
摘要:开始第一篇随笔~看看效果如何namespace Sample{ class Sam { static void Main() { System.Console.WriteLine("我的文档!"); } }} 阅读全文
posted @ 2011-09-02 16:00 jacky_j2ee 阅读(134) 评论(0) 推荐(0)