
WPF
CLeopard
愿在充满热血的团队与有志青年共创未来。
展开
-
C#根据控件名获取控件对象
需求:在一个项目中,要实现一个控件选择功能,如果一个个的去判断,代码会十分难看,由于控件名有规律,是否可以根据控件直接找到对应的控件对象?实现:利用反射object o = this.GetType().GetField(name, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.I原创 2014-11-07 11:05:57 · 33959 阅读 · 0 评论 -
C#WinForm中TreeView默认展开设置
在Form1_Load事件中添加原创 2014-11-24 16:26:47 · 39974 阅读 · 2 评论 -
遍历子控件清空数据
遍历窗体上所有控件,并清空数据,重要的在于遍历所有控件,这里写了个例子原创 2014-11-24 15:55:17 · 1774 阅读 · 0 评论 -
C#获取CPU序列号代码、硬盘ID、网卡硬件地址等类文件
using System;using System.Management;namespace GetIDs{ /// /// 计算机信息类 /// internal class Computer { public string CpuID; public string MacAddress转载 2014-10-13 17:42:11 · 6539 阅读 · 0 评论 -
inno setup 5 添加快捷方式默认选中
checkablealone 搜索"选中"意思unchecked "非选中"意思原创 2014-10-29 10:58:35 · 2541 阅读 · 0 评论 -
Aspose.Cells区域格式设置
首先设置格式原创 2014-11-14 11:26:04 · 11401 阅读 · 0 评论 -
WPF界面刷新
/// /// Designates a Windows Presentation Foundation application model with added functionalities. /// public class UIHelper : CLeopardTestWPF { private static DispatcherOpe转载 2014-10-11 17:35:43 · 7674 阅读 · 0 评论 -
WPF动画公共类
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows;using System.Windows.Contr转载 2014-10-11 10:47:22 · 2564 阅读 · 0 评论 -
使用Inno Setup 打包.NET程序,并自动安装.Net Framework
Inno Setup 是一个windows系统下的安装包制作程序。它是免费的(而且允许免费用于商业用途)。官网网站:http://www.jrsoftware.org/虽然说.NET 可以使用VS来打包安装包,但可定制化绝对不如Inno Setup,基本的使用这里不做过多介绍。大家Google一下吧。我们在开发.net客户端时候.Net Framework是个比较让人头疼的问题,比如一转载 2014-10-28 23:48:22 · 6433 阅读 · 0 评论 -
WPF设置全局字体和字体嵌入
1 可以在你的MainWindow中设置:Window x:Class="WpfApplication25.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/wi原创 2014-10-29 18:40:26 · 21034 阅读 · 1 评论 -
WPF以管理员运行程序
在App.cs中增加检查管理员代码和重写启动函数原创 2014-10-29 11:20:03 · 6493 阅读 · 0 评论 -
WPF控件绚丽呼吸闪烁源码
RT<Window x:Class="CLeopard.textBoxRun" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="textBo转载 2014-10-09 16:31:34 · 5907 阅读 · 0 评论 -
为无边框窗口设置阴影效果
需要将窗口样式添加到 App.xaml 中转载 2014-10-09 15:43:08 · 2449 阅读 · 0 评论 -
WPF缩放
<Border BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">原创 2014-10-09 10:56:16 · 1663 阅读 · 1 评论 -
WinForm程序或WPF程序只能打开一个子窗体 解决窗口关闭不能再打开的BUG
主窗体:子窗体:原创 2014-10-24 16:33:05 · 3815 阅读 · 0 评论 -
C#实现Zip压缩解压实例
本文只列举一个压缩帮助类,使用的是有要添加一个dll引用ICSharpCode.SharpZipLib.dll。另外说明一下的是,这个类压缩格式是ZIP的,所以文件的后缀写成 .zip还有,如果用这个类来解压rar格式的压缩文件时会报错,就网上说的那个"Wrong Local header signature: 0x21726152"异常。只要解压ZIP压缩格式的压缩文件就不会报错了。 下面就转载 2014-12-25 23:36:26 · 25695 阅读 · 16 评论