摘要: string xmlFile = @"D:\Documents\Visual Studio 2013\Projects\Jesee.Web.Test\ConsoleApplication1\XMLFile1.xml"; XDocument doc = XDocument.Load(xmlFile); 阅读全文
posted @ 2016-09-02 14:51 Jesee.Liu 阅读(1712) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://developer.51cto.com/art/201302/380622.htm, 方法一:OleDb: 用这种方法读取Excel速度还是非常的快的,但这种方式读取数据的时候不太灵活,不过可以在 DataTable 中对数据进行一些删减修改。 优点:读取方式简单、读取速度快 阅读全文
posted @ 2016-05-18 11:59 Jesee.Liu 阅读(397) 评论(0) 推荐(0) 编辑
摘要: ViewPager是安卓4.0之后新加的控件,其可以在一个activity中添加多个view,并按顺序显示,而且支持左右滑动,这是很有用的。既可以用来构建流行的像windows一样的属性页,也可以用来制作使用向导,产品展示,对流行的微博,QQ,流行的商业客户界面都可以很轻松的实现。而且多view和多... 阅读全文
posted @ 2015-12-31 15:54 Jesee.Liu 阅读(1503) 评论(0) 推荐(0) 编辑
摘要: 在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于findViewById()。不同点是LayoutInflater是用来找res/layout/下的xml布局文件,并且实例化;而findViewById()是找xml布局文件下的具体widget控件(如Button、Tex... 阅读全文
posted @ 2015-12-31 14:12 Jesee.Liu 阅读(79) 评论(0) 推荐(0) 编辑
摘要: HttpWebRequest和WebClient的区别(From Linzheng):1,HttpWebRequest是个抽象类,所以无法new的,需要调用HttpWebRequest.Create();2,其Method指定了请求类型,这里用的GET,还有POST;也可以指定ConentType;3,其请求的Uri必须是绝对地址;4,其请求是异步回调方式的,从BeginGetResponse开始,并通过AsyncCallback指定回调方法;5,WebClient 方式使用基于事件的异步编程模型,在HTTP响应返回时引发的WebClient回调是在UI线程中调用的,因此可用于更新UI元素的属 阅读全文
posted @ 2013-01-05 10:47 Jesee.Liu 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1. WriteableBitmap.SetSource 和 WriteableBitmap.LoadJpeg是不同的。[csharp] view plaincopyprint?constint CANVAS_WIDTH = 480; BitmapImage bmp = new BitmapImage(); bmp.SetSource(stream); //stream为原始图片数据,例如可以是从文件中读到的 int w = CANVAS_WIDTH; int h = CANVAS_WIDTH * bmp.PixelHeight / bmp.PixelWidth; WriteableBit.. 阅读全文
posted @ 2012-12-10 19:17 Jesee.Liu 阅读(397) 评论(0) 推荐(0) 编辑
摘要: List<person> persons=new Persons();根据人名来排序persons.Sort(delegate(Person p1,Person p2)=>{ return Comparer<string>.default.Compare(p1.Name,p2.Name)}) 阅读全文
posted @ 2012-11-30 10:28 Jesee.Liu 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 使用Pivot控件,白色主题,点击appbar进入其他页面会出现白条问题。解决方案:将ApplicationBar 的 Opacity属性设置为0.99。<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.99"> 阅读全文
posted @ 2012-11-14 10:21 Jesee.Liu 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1 Converter在用数据绑定的时候应该尽量少用Converter,因为Converter对UI线程是一个不小的开销:运行时需要从Silverlight转到处理代码,然后执行Converter再把结果返回给Silverlight。如果converter做了大量的工作,那么UI线程将会被明显阻塞。替代方案:尽量把数据转换的操作放到对象类或者viewmodel中,虽然讲转换过程放到对象类中会破坏封装,但却能大大的提高程序的性能。 2 DataTemplates数据模板的问题涉及到ListBox等集合面板的渲染速度,如果集合面板中的项都用到了相同的数据模板,当用户滑动屏幕展示其他项时ListB. 阅读全文
posted @ 2012-09-18 10:46 Jesee.Liu 阅读(219) 评论(1) 推荐(0) 编辑
摘要: 在MainPage中,前台代码:View Code 1<phone:PhoneApplicationPage2x:Class="用户自定义控件的动态属性追加.MainPage"3xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"4xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"5xmlns:phone="clr-namespace:Microsoft.Phone.Controls; 阅读全文
posted @ 2012-08-15 19:07 Jesee.Liu 阅读(117) 评论(0) 推荐(0) 编辑