上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: http://archive.cnblogs.com/a/2014017/今天用VS2010开发了一个WCF服务进行一个简单测试,没想到这点小事竟然折腾了我2个小时。 为避免其他兄弟遇到相同的问题少走弯路做一下总结。 操作系统:Windows7 旗舰版 开发环境:VS2010 .NET Framework4.0 ASP.NET4.0 第一步:检查Windows7中IIS是否安装了必要的组件 方法:控制面板->程序和功能->打开或关闭Windows功能 以下图片中标注的功能Windows7默认不会安装的 第二步:检查IIS的配置 系统必备安装完成后打开IIS服务管理器,点默认网站,双 阅读全文
posted @ 2012-01-17 15:48 quietwalk 阅读(359) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/wuzhengqing1/article/details/7010902取出richTextBox里面的内容 第一种方法:将richTextBox的内容以字符串的形式取出 string xw = System.Windows.Markup.XamlWriter.Save(richTextBox.Document); 第二种方法:将richTextBox的类容以二进制数据的方法取出 FlowDocument document = richTextBox.Document; System.IO.Stream s = new System.IO.Memo.. 阅读全文
posted @ 2012-01-11 13:21 quietwalk 阅读(11019) 评论(0) 推荐(1) 编辑
摘要: http://www.114la.com/other/rgb.htm因为兼容性问题,色阶板功能只能在IE浏览器中运行 RGB颜色对照表 #FFFFFF ... 阅读全文
posted @ 2012-01-03 15:13 quietwalk 阅读(1264) 评论(0) 推荐(0) 编辑
摘要: http://fqctyj.blog.163.com/blog/static/70843455200810812410361/ 这几天一直有人问我如何保存RichTextBox的文本到数据库,包括格式等等,然后需要的再从数据库取出来,并且显示到RichTextBox中。 其实,RichTextBox的文本是一个FlowDocument类型的对象,我们只需要利用XamlReader和XamlWriter就能很好的完成上述工作。 【保存Document到流】 FlowDocument document = richTextBox.Document; Stream s = new ... 阅读全文
posted @ 2012-01-03 10:55 quietwalk 阅读(1682) 评论(1) 推荐(0) 编辑
摘要: 代码:NavigationService类型的基本成员sealed class NavigationService : IContentContainer { // 导航 public bool Navigate(Uri source); // 导航到URI public void Refresh(); // 重新导航到当前内容 public void StopLoading(); // 停止当前的导航 // 导航历史 public bool CanGoBack { get; } // Content in back nav. history? public bool CanGoForward 阅读全文
posted @ 2011-12-30 15:16 quietwalk 阅读(606) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-12-29 09:38 quietwalk 阅读(139) 评论(0) 推荐(0) 编辑
摘要: DeleteBasicProtocolRecursively private void DeleteBasicProtocolRecursively(ModelContainer container, string parentId, string strProtocolId) { #region BasicProtocolStructure var nodes = from node in container.BasicProtocolStructures where node.Pid == parentId select node; if (nodes... 阅读全文
posted @ 2011-12-14 15:39 quietwalk 阅读(725) 评论(0) 推荐(0) 编辑
摘要: Script: <tr> <td valign="top"> <table style="width:100%; border-color:Gray; border-style:double; border-width:3"> <%=ViewState["ViewCarePlanRiskFactors"]%> </table> </td> <td valign="top"> <table style="width:1 阅读全文
posted @ 2011-12-11 15:20 quietwalk 阅读(874) 评论(0) 推荐(0) 编辑
摘要: List<MyBasicProtocol> adultProtocolList = new List<MyBasicProtocol>(); adultProtocolList = new QhrServiceClient().GetAdultBasicProtocol(); if (adultProtocolList != null) { adultProtocolList.Sort((MyBasicProtocol p1, MyBasicProtocol p2) => { if (p2.Name.CompareTo(p1.Name) != 0) return. 阅读全文
posted @ 2011-12-11 10:00 quietwalk 阅读(212) 评论(0) 推荐(0) 编辑
摘要: try { service.AddOperateLog(mol); } catch (Exception ex) { if (service.InnerChannel.State == System.ServiceModel.CommunicationState.Faulted) { service = new QhrServiceClient(); MyExceptionRecord my = new MyExceptionRecord(); my.Id = System.Guid.NewGuid().ToString(); my.Occurr... 阅读全文
posted @ 2011-12-11 09:59 quietwalk 阅读(312) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Qhr.QhrService; namespace Qhr { public partial class test : System.Web.UI.Page { Qhr.QhrService.QhrServiceClient proxy = new QhrService... 阅读全文
posted @ 2011-12-06 19:43 quietwalk 阅读(394) 评论(0) 推荐(0) 编辑
摘要: sting , not null string XXXXXXX; [DataMember(IsRequired = true)] public string XXXXXXX //30,r { get { return XXXXXXX; } set { if ((value + "").Length == 0) { string strMessage = ("XXXXXXX:The XXXXXXX should not be null or empty string."); ModelContext.RecordException(string.Em... 阅读全文
posted @ 2011-12-05 17:29 quietwalk 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 代码:<htmlxmlns="http://www.w3.org/1999/xhtml"> <headrunat="server"> <title>无标题页</title> </head> <body> <formid="form1"runat="server"> <divstyle="text-align:center;"> <divstyle="margin:5px;float:l 阅读全文
posted @ 2011-12-05 10:50 quietwalk 阅读(225) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/yang_sy/archive/2011/05/24/2054834.html【摘要】 安全是任何系统至关重要的一个方面,尤其当该系统由分布式的程序和服务组成;安全还是一个非常广泛的话题。因为这些原因,你应该考虑如何在不同的场 景下实现系统的安全。这些关于安全的内容将通过三章内容进行一一介绍。在本章,我们把注意力集中在企业内部WCF服务的安全管理方面。在此场景中,运行 WCF服务的服务端和客户端之间已经存在必要的信任关系;通过客户端访问该服务的用户都来自同一个安全域。WCF服务可以直接访问该域内的信息,并直接使 用这些信息验证用户。在第五章&quo 阅读全文
posted @ 2011-12-02 16:02 quietwalk 阅读(758) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/yang_sy/archive/2011/05/18/2049391.html【前言】 捕获和处理异常是任何专业的应用程序的一个重要组成部分。在一个复杂的桌面程序 上,许多场景都能产生一个异常,从程序错误、意外的事件、不完整的用户输入,到运行该程序一个或多个的硬件故障。在分布式环境中,异常的发生场景就更多 了。因为网络的状态,在某些情况下,无论应用程序开发人员、还是网络管理员都无法控制网络的发挥功效或者维持其处于正常的工作状态。如果把应用程序访问第 三方组件考虑在内,那么还应考虑你的分布式程序能否可靠地工作. 本章将介绍如何处理客户端和服务端的.. 阅读全文
posted @ 2011-12-02 15:20 quietwalk 阅读(743) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/yang_sy/archive/2011/05/16/2046599.html第二章 寄宿WCF服务 【摘要】 本章先描述WCF service的工作原理;然后阐述寄宿WCF服务的各种方式;随后通过创建WPF程序和Windows Service来寄宿WCF服务;最后讲述支持WCF内置的各种绑定以及如何对一个WCF服务实现多重绑定。 在第一章中,我们为你介绍了如何创建一个 WCF服务,并将其部署到IIS上,然后通过客户端程序访问该服务。在本章中,我们将关注WCF工作的细节;各种寄宿WCF服务的方式;此外,你还将学习 到如何创建和配置宿主程序,其... 阅读全文
posted @ 2011-12-02 14:50 quietwalk 阅读(3130) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/yang_sy/archive/2011/05/10/2041741.html1. 什么是WCF 如果你阅读本书的目的是为了解如何使用WCF构建分布式应用程序和服务,那么什么是WCF,为什么使用WCF?该如何使用WCF? 回答这些问题,让我们来回顾一下历史。 (1)早期个人电脑时代的应用程序 个 人电脑时代,业务解决方案由一套应用程序组合而成。一般会包含文字处理程序,电子表格处理程序,和数据库套件。有经验用户能够把业务数据存贮在数据库中, 然后使用电子表格分析数据,并创建基于数据的报表与文档,或利用文字处理软件写分析报告。这些程序往往安装在同一.. 阅读全文
posted @ 2011-12-02 14:41 quietwalk 阅读(1516) 评论(0) 推荐(1) 编辑
摘要: http://www.cnblogs.com/yang_sy/archive/2011/05/10/2041740.html【题外】 一直在博客园看东西,偶尔也写点东西,但是一直没有做完成的系列。之前曾有关于SQL Server认证系列的随笔,不过那只能称之为个人的笔记,或许个人的笔记都算不上。因为其完全从书本摘抄,连翻译都省却了。打算以后还是要好好的写文 章,多思考,对技术负责。并下网从中吸取经验和教训,并与大家分享和交流。本人计划陆续推出《WCF4.0 step by step》的翻译,本人非科班出身,英语有时候需要求助字典来完成,之前也从未翻译过东西。所以这将是一条非常艰巨的任务。之.. 阅读全文
posted @ 2011-12-02 14:39 quietwalk 阅读(536) 评论(0) 推荐(0) 编辑
摘要: 要求:1、总长8位;2、至少一个大写字母;3、至少一个小写字母;4、至少一个数字(0~9);5、至少一个特殊字符; using System; using System.Collections.Generic; using System.Text; /**************************************************** * Author:quietwalk * Date:2011-12-02 * Fuction:Generate a random password that consists of mixed case (at least... 阅读全文
posted @ 2011-12-02 11:04 quietwalk 阅读(611) 评论(0) 推荐(1) 编辑
摘要: http://xahanjianxin.blog.163.com/blog/static/4458605720082215539592/ASCII, American Standard Code for Information Interchange 念起来像是 "阿斯key",定义从 0 到 127 的一百二十八个数字所代表的英文字母或一样的结果与意义。由于只使用7个位元(bit)就可以表示从0到127的数字,大部分的电脑都使用8个位元来存取 字元集(character set),所以从128到255之间的数字可以用来代表另一组一百二十八个符号,称为 extended A 阅读全文
posted @ 2011-12-02 08:32 quietwalk 阅读(25313) 评论(0) 推荐(3) 编辑
摘要: <Grid IsSharedSizeScope="True"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" SharedSizeGroup="myGroup" /> <ColumnDefinition /> <ColumnDefinition SharedSizeGroup="myGroup" /> </Grid.ColumnDefinitions> <Label Gri 阅读全文
posted @ 2011-12-01 19:41 quietwalk 阅读(407) 评论(0) 推荐(0) 编辑
摘要: <Grid Background="LightBlue"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" /& 阅读全文
posted @ 2011-12-01 19:06 quietwalk 阅读(241) 评论(0) 推荐(0) 编辑
摘要: HorizontalAlignment:Left,Center,Hight,Stretch(default) VerticalAlignment:Top,Center,Bottom,Stretch(default) 可以让一个元素自己决定如何使用父面板给它的额外空间。 只有当一个父面板给子元素的空间比子元素真正需要的多时,这两个属性才是有用的。 HorizontalContentAlignment:Left(default),Center,Hight,Stretch VerticalContentAlignment:Top(default),Center,Bottom,S... 阅读全文
posted @ 2011-11-28 20:19 quietwalk 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 最好不要设置显式尺寸。父元素的行为能改变一个元素在屏幕上的最终尺寸。 DesiredSize:在布局基于其他属性值时才被计算出来。 RenderSize:表示元素在布局完成之后的最终尺寸。 Margin:控制元素边界以外有多少空间。(System.Windows.Thickness类型) Padding:控制元素边界以内有多少空间。(System.Windows.Thickness类型) myControl.Margin=new ThickNess(10);//Margin=”10”; myControl.Margin=new Thickness(20,5,20,5);//Ma... 阅读全文
posted @ 2011-11-28 20:18 quietwalk 阅读(709) 评论(0) 推荐(0) 编辑
摘要: 枚举 Visible(可见)——元素获得渲染并参与布局。 Collapsed(折叠)——元素不可见并且不参与布局。 Hidden(隐藏)——元素不可见但是参与布局。 <StackPanel Height="100" Background="Aqua"> <Button Visibility="Collapsed">Collapsed Button</Button> <Button>Below a Collapsed Button</Button> </StackPane 阅读全文
posted @ 2011-11-28 20:18 quietwalk 阅读(183) 评论(0) 推荐(0) 编辑
摘要: TextChanged SelectionChanged TextWrapping=Wrap不允许有任何一行超过控件的边界,即使在一个字的中间,也会强行换行。 TextWrappong=WrapWithOverflow 仅保留一行,只要一有机会,长文字就会被截断。 AcceptReturn=true可以在输入时通过回车键来换行。 SpellCheck.IsEnabled=true 启用拼写检查。 阅读全文
posted @ 2011-11-28 20:17 quietwalk 阅读(181) 评论(0) 推荐(0) 编辑
摘要: CaretIndex SelectionStart SelectionEnd CaretPostion(TextPointer类型) 内容存在 Document属性里(FlowDocument) 阅读全文
posted @ 2011-11-28 20:17 quietwalk 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 不是从 TextBoxBase继承。 不支持 Cut, Copy, Undo, Redo 命令,也不支持拼写检查。 支持 Paste。 PasswordChar属性设置显示的字符。 文本保存在 Password 的字符串属性里,内部把密码存放在一个 System.Security.SecurityString对象中。 阅读全文
posted @ 2011-11-28 20:17 quietwalk 阅读(220) 评论(0) 推荐(0) 编辑
摘要: <StatusBar> <Label>27</Label> <Separator /> <Label>Zoom</Label> <ComboBox> </ComboBox> <Separator /> <Button> <Image Source="/Pictures/toolbar1.png" /> </Button> </StatusBar> 阅读全文
posted @ 2011-11-28 20:16 quietwalk 阅读(206) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/w01fer/blog/item/93d185119a58ca0b213f2ea2.htmlLUHN算法,主要用来计算信用卡等证件号码的合法性。 next section from:http://en.wikipedia.org/wiki/Luhn_algorithm The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, is a simple checksum formula used t 阅读全文
posted @ 2011-11-28 13:34 quietwalk 阅读(2942) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页