上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: //WCF service: string servicePath = System.Web.Hosting.HostingEnvironment.MapPath("~"); //F:\WorkSpace\EHR\src\vs2010\EHR\EHR\bin\Debug\ string strBaseDirectory = System.AppDomain.CurrentDomain.BaseDirectory; //F:\WorkSpace\EHR\src\vs2010\EHR\EHR\bin\Debug\EHR.vshost... 阅读全文
posted @ 2014-01-23 20:33 quietwalk 阅读(2520) 评论(0) 推荐(0) 编辑
摘要: 1.序列化 public static byte[] SerializeObject(object obj) { if (obj == null) return null; MemoryStream ms = new MemoryStream(); BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(ms, obj); ms.Position = 0; ... 阅读全文
posted @ 2014-01-23 20:32 quietwalk 阅读(4021) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Runtime.Serialization.Formatters.Binary;using System.Security.Cryptography;using System.Text;//xlding, 2013/07/25namespace Gemr.Utils{ public class CommonAlgorithms { #region Sort public ... 阅读全文
posted @ 2014-01-23 20:29 quietwalk 阅读(2177) 评论(0) 推荐(0) 编辑
摘要: ObservableCollection oc = new ObservableCollection();ls.ForEach(x => oc.Add(x)); 阅读全文
posted @ 2014-01-23 20:28 quietwalk 阅读(263) 评论(0) 推荐(0) 编辑
摘要: List list = patientmains.OrderBy(p => p.Firstname).ThenBy(p => p.Middlename).ThenBy(p => p.Lastname).ToList(); 阅读全文
posted @ 2014-01-23 20:26 quietwalk 阅读(197) 评论(0) 推荐(0) 编辑
摘要: private void Test() { List lsA = new List(); lsA.Add("A"); lsA.Add("B"); lsA.Add("C"); lsA.Add("D"); List lsB = new List(); lsB.Add("C"); lsB.Add("D"); lsB.Add("E"); lsB.Add("F"); ... 阅读全文
posted @ 2014-01-23 20:25 quietwalk 阅读(469) 评论(0) 推荐(0) 编辑
摘要: public List GetViews() where V : View { var views = from item in dockLayoutManager1.GetItems() where item is LayoutPanel && ((LayoutPanel)item).Content.GetType() == typeof(V) select ((LayoutPanel)item).Content as V; return v... 阅读全文
posted @ 2014-01-23 20:24 quietwalk 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Dictionary 的几种遍历方法Dictionarydic = newDictionary();方法1foreach (var item in dic){Console.WriteLine(dic.Key + dic.Value);}方法2//KeyValuePairforeach (KeyValuePair kv in dic){Console.WriteLine(kv.Key + kv.Value);}方法3//通过键的集合取foreach (string key indic.Keys){Console.WriteLine(key + list[key]);} 阅读全文
posted @ 2014-01-23 20:23 quietwalk 阅读(315) 评论(0) 推荐(0) 编辑
摘要: public static StringBuilder GetProperties(object obj) { if (obj == null) return null; Type t = obj.GetType(); PropertyInfo[] propertyInfo = t.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic); StringBuilder sb = ne... 阅读全文
posted @ 2014-01-23 20:22 quietwalk 阅读(171) 评论(0) 推荐(0) 编辑
摘要: DateTime.Now.ToUniversalTime().ToString("yyMMddHHmmss"); 阅读全文
posted @ 2014-01-23 20:21 quietwalk 阅读(261) 评论(0) 推荐(0) 编辑
摘要: SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );Date dateExecute = sdf.parse(executeDate );Calendar calendar = Calendar.getInstance();calendar.setTime(dateExecute);calendar.add(calendar.DATE,1);String dateStr = sdf.format(calendar.getTi 阅读全文
posted @ 2014-01-23 20:17 quietwalk 阅读(3675) 评论(0) 推荐(0) 编辑
摘要: 提问地址:http://apps2.nlm.nih.gov/medlineplus/contact/index.cfm?lang=en&from=http://www.nlm.nih.gov/medlineplus/connect/emaillist.htmlSearching just by name or the combination of names (2014/01/20)We have use the web application to cite Medline Plus searching result page in our application, and it w 阅读全文
posted @ 2014-01-23 20:15 quietwalk 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-23 20:10 quietwalk 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-23 20:08 quietwalk 阅读(169) 评论(0) 推荐(0) 编辑
摘要: MaskType="RegEx" MaskUseAsDisplayFormat="True" Mask="[0-9]*"<dxe:TextEdit MaskType="Numeric" EditValue="{Binding Path=RowData.Row.TotalPrice}" 阅读全文
posted @ 2014-01-23 20:07 quietwalk 阅读(3613) 评论(0) 推荐(0) 编辑
摘要: StackPanel 的 HorizontalAlignment 属性和 VerticalAlignment 属性 默认情况下,这两个属性都被设置为 Stretch. 阅读全文
posted @ 2014-01-23 20:06 quietwalk 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1.删除 Width 和 Height 属性;2.将 Windows.SizeToContent 属性设置为 WidthAndHeight这时窗口就能自动调整自身大小,从而容纳所包含的内容。通过将 Windows.SizeToContent 属性设置为 Width 或 Hight ,可以使窗口只能在一个方向上改变自身大小。 阅读全文
posted @ 2014-01-23 20:04 quietwalk 阅读(7886) 评论(1) 推荐(2) 编辑
摘要: Border: Button: 使用 ButtonChrome 装饰元素获取特有的圆角和阴影背景效果。ListBox 使用 ListBoxChrome 装饰元素。 阅读全文
posted @ 2014-01-23 20:03 quietwalk 阅读(268) 评论(0) 推荐(0) 编辑
摘要: *.GridSplitter属性是Grid面板的一个特性。(1)预留一行或一列,专门用于放置 GridSplitter对象,如果是行的话,把其Height 设置为 Auto,如果是列的话,把其 Width 设置为 Auto。(2)拉伸整行或整列,使其穿越整行或整列;使用RowSpan或ColumnSpan;(3)为 GridSplitter 设置最小尺寸,垂直分隔的话,设置 Width 为一个固定值,并将VerticalAlignment="Stretch";水平分隔的话,设置Height 为一个固定值,并将 HorizontalAlignment="Stretc 阅读全文
posted @ 2014-01-23 19:59 quietwalk 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #依赖属性的用法与普通属性相同;#只能为依赖对象(继承自 DenpendencyObject的类)1)定义public static readonly DependencyProperty XXXProperty; 阅读全文
posted @ 2014-01-23 19:58 quietwalk 阅读(190) 评论(0) 推荐(0) 编辑
摘要: tbName.SetValue(Grid.RowProperty, 1); 阅读全文
posted @ 2014-01-23 19:57 quietwalk 阅读(336) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2014-01-23 19:57 quietwalk 阅读(2893) 评论(0) 推荐(0) 编辑
摘要: (1)img.MouseUp+= img_MouseUp;(2)调用 UIElement.AddHandler()直接连接事件;img.AddHandler(Image.MouseUpEvent, new MouseButtonEventHandler(img_MouseUp));(3)使用定义事件的类的名称,而不是引发事件的类的名称;img.AddHandler(UIElement.MouseUpEvent, new MouseButtonEventHandler(img_MouseUp));缺点:不能很明确地指明事件是由Image类提供的 阅读全文
posted @ 2014-01-23 19:55 quietwalk 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1.Set the TabIndex="16"2. private void detailGrid_Keydown(object sender, KeyEventArgs e) { try { if (e.Key == Key.Enter) { TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Next); ... 阅读全文
posted @ 2014-01-23 19:54 quietwalk 阅读(2949) 评论(0) 推荐(1) 编辑
摘要: this.tbContent.Document.Blocks.Clear(); 阅读全文
posted @ 2014-01-23 19:53 quietwalk 阅读(751) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2014-01-23 19:52 quietwalk 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-23 19:51 quietwalk 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1.用在textbox等输入控件上,验证输入是否合法。首先定义一个Converter,2.Xaml里面这样子写,意思是输入的数字,如果小于100则显示为红色。3.combox等列表控件里面,也可以用做数据筛选。下面例子中筛选出小于100的项目,红色显示数据源定义为:Xaml: 阅读全文
posted @ 2014-01-23 19:50 quietwalk 阅读(2018) 评论(0) 推荐(0) 编辑
摘要: 1.定义一个全局资源文件,如下 2.使用1)引入命名空间:2)控件上使用 阅读全文
posted @ 2014-01-23 19:46 quietwalk 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-23 19:40 quietwalk 阅读(332) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页