摘要: 基于手机的应用,不可缺少的一项就是位置信息,在WP7中,微软提供了一个GeoCoordinateWatcher类,可以方便的拿到当前所在的经纬度GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default); watcher.MovementThreshold = 20; watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(... 阅读全文
posted @ 2012-01-01 17:40 xpsnets 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 在应用开发中,有些提示是不需要用户做反应的,但是又是不得不提醒用户的,这时候用MessageBox,就显得不是那么合适了.在芒果中,微软添加了ProgressIndicator的API,可以用来在标题栏显示提示信息,这无疑方便了用户,在接收提示信息的时候,不会被强迫操作.同样,ProgressIndicator的使用非常简单,首先在XAML文件中添加如下代码:<shell:SystemTray.ProgressIndicator> <shell:ProgressIndicator x:Name="indicator" /> </shell:Sy 阅读全文
posted @ 2012-01-01 17:39 xpsnets 阅读(280) 评论(0) 推荐(0) 编辑
摘要: public string EncodeBase64(string code) { byte[] bytes = Encoding.Unicode.GetBytes(code); return Convert.ToBase64String(bytes); }编码public string EncodeBase64(string code) { byte[] bytes = Encoding.Uni... 阅读全文
posted @ 2010-06-04 17:37 xpsnets 阅读(366) 评论(1) 推荐(1) 编辑