2011年8月18日
摘要: 编写程序的时候,经常需要用的项目根目录。自己总结如下1、取得控制台应用程序的根目录方法 方法1、Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径 方法2、AppDomain.CurrentDomain.BaseDirectory 获取基目录,它由程序集冲突解决程序用来探测程序集2、取得Web应用程序的根目录方法 方法1、HttpRuntime.AppDomainAppPath.ToString();//获取承载在当前应用程序域中的应用程序的应用程序目录的物理驱动器路径。用于App_Data中获取 方法2、Server.MapPath("& 阅读全文
posted @ 2011-08-18 23:32 wtq 阅读(62677) 评论(3) 推荐(5) 编辑
摘要: 前台代码 1<Grid>2<Buttonx:Name="btnClick"Width="40"Height="30"Content="Ckick"Click="BtnClick"></Button>3</Grid> 1,先给出事件模型如下;给一个按钮绑定一个单击事件如下代码; 前台代码1<Grid>2<Buttonx:Name="btnClick"Width="40"Height=" 阅读全文
posted @ 2011-08-18 21:13 wtq 阅读(416) 评论(0) 推荐(1) 编辑
摘要: 1,使用标签扩展为对象的属性赋值。如图:代码如下:TextBlock1<Window.Resources>2<sys:Stringx:Key="hellostring">HelloString</sys:String>34</Window.Resources>5<Grid>6<TextBlockHeight="20"Width="300"Text="{StaticResourceResourceKey=hellostring}"/>78< 阅读全文
posted @ 2011-08-18 20:40 wtq 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 1。给一个stop按钮赋予一个stop的图形。如图: 代码如下: View Code 1<Windowx:Class="wpfTest.MainWindow"2xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"3xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"4xmlns:local="clr-namespace:wpfTest"5Title="MainWind 阅读全文
posted @ 2011-08-18 17:54 wtq 阅读(1702) 评论(0) 推荐(1) 编辑
摘要: 1,在使用excel时,经常会碰到使用某一列的值同时乘以某一个数。 具体做法是:使用选择性 粘贴如下; 先在一个单元格输入2,复制它,选定你乘2的区域,选择性粘贴/乘如图:这样,搞定。参考 http://iask.sina.com.cn/b/508943.html 阅读全文
posted @ 2011-08-18 11:19 wtq 阅读(9676) 评论(0) 推荐(0) 编辑
摘要: 参考:msdn-typeconverter http://www.cnblogs.com/ericwen/archive/2007/12/11/typeconverter.html http://www.codeproject.com/KB/webforms/TypeConverters.aspx 阅读全文
posted @ 2011-08-18 00:57 wtq 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1,使用path画图。先上图:代码如下:View Code 1<GridWidth="713"MinWidth="200"MinHeight="100">2<RectangleWidth="300"Height="200"Stroke="Black"Fill="Blue"RadiusX="100"RadiusY="100"></Rectangle>3<PathData=&qu 阅读全文
posted @ 2011-08-18 00:41 wtq 阅读(1486) 评论(0) 推荐(1) 编辑