• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
梦幻仙境的精灵
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  C#

winform input 输入数值(可以小数,负数)

摘要:public partial class UCNumberBox : UserControl { public UCNumberBox() { InitializeComponent(); } private bool _IsDecimal = true; /// <summary> /// 是否为 阅读全文
posted @ 2022-07-21 08:31 梦幻仙境的精灵 阅读(352) 评论(0) 推荐(0)
自定义WPF UI控件,并实现binding属性

摘要:<UserControl x:Class="CostWPF.UserControls.LabelComboBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.mi 阅读全文
posted @ 2022-07-18 11:03 梦幻仙境的精灵 阅读(349) 评论(0) 推荐(0)
使用 WPF Prism 添加UserControl时,设计器没有实时显示

摘要:xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformat 阅读全文
posted @ 2022-07-18 10:49 梦幻仙境的精灵 阅读(321) 评论(0) 推荐(0)
WPF 宽度跟父控件(或者另一个控件)走

摘要:<UserControl Width="{Binding RelativeSource= {RelativeSource FindAncestor, AncestorType={x:Type ListView}}, Path=ActualWidth}" Height="{Binding Relati 阅读全文
posted @ 2022-07-18 10:46 梦幻仙境的精灵 阅读(1323) 评论(0) 推荐(0)
VSIX项目,添加右键菜单(二)

摘要:1、新建VSIX项目后,里边基本什么都没有 项目上右击,添加新建项 随便起一个名字,例如我的是 RightCmd 2、里边有一个vsct的文件,这个文件相当于MVC里的html,是用于配置显示的。 打开它,里边前几行,有一个引入的文件,vsshlids.h,这个文件,你可以去 项目路径\packag 阅读全文
posted @ 2017-08-07 17:59 梦幻仙境的精灵 阅读(3007) 评论(0) 推荐(0)
VSIX项目,Visual Studio Package,(一)

摘要:VS2015以后,没有Visual Studio Package了,直接在“模版”-》“Extensibility”->"VSIX Project" 阅读全文
posted @ 2017-08-07 17:21 梦幻仙境的精灵 阅读(770) 评论(0) 推荐(0)
asp.net mvc 返回音频,可支持快进

摘要:在响应头里,需要加上 Response.AddHeader("Content-Range", string.Format("bytes {0}-{1}/{2}", startbyte, endbyte, fSize)); public FileStreamResult StreamUploadedS 阅读全文
posted @ 2016-04-08 16:40 梦幻仙境的精灵 阅读(601) 评论(0) 推荐(0)
设计模式

摘要:1、单例模式,饿汉式与懒汉式的综合使用 /////////////////2016-03-15 21:00 2、简单工厂模式和工厂模式的区别 简单模式,只有一个工厂,根据特定的参数,返回相应的处理类(一般是处理类的接口,接口类或抽象类) 工厂模式,有多个工厂,继承自同一个工厂接口(类),一般定义一个 阅读全文
posted @ 2016-03-07 21:23 梦幻仙境的精灵 阅读(290) 评论(0) 推荐(0)
oledb 操作 excel

摘要:oledb excelhttp://wenku.baidu.com/search?word=oledb%20excel&ie=utf-8&lm=0&od=0[Asp.net]常见数据导入Excel,Excel数据导入数据库解决方案,总有一款适合你!http://www.cnblogs.com/wol... 阅读全文
posted @ 2015-01-05 08:37 梦幻仙境的精灵 阅读(571) 评论(0) 推荐(0)
[转]基于SQL脚本将数据库表及字段提取为C#中的类

摘要:开发时,勉不了需要使用SQL直接与数据库交互,这时对于数据库中的表名及字段名会使用的比较多。如果每使用一次都复制一个,实在蛋疼。所以就考虑将其做成const常量。但是数据库中的表和字段相当多,一个一个敲,不但累,还有可能敲错。要保证正确,最好的办法当然是使用工具或者脚本。这里提供一个SQL脚本的实现... 阅读全文
posted @ 2015-01-02 22:23 梦幻仙境的精灵 阅读(1172) 评论(0) 推荐(0)
C# Winform里面用Console.WriteLine输出到哪了

摘要:C# Winform里面用Console.WriteLine输出也不会报错显示在 VS IDE 的视图→输出窗口,且只在 Debug 环境下此语句执行。如果是 Release 环境,在 Win32 程序中 System.Console、System.Diagnostics.Debug、System.... 阅读全文
posted @ 2014-12-22 17:08 梦幻仙境的精灵 阅读(10943) 评论(0) 推荐(0)
RSA 加解密

摘要:#region RSA public static byte[] GetBytes(String num) { BigInteger n = new BigInteger(num, 10); String s =... 阅读全文
posted @ 2014-12-19 10:17 梦幻仙境的精灵 阅读(173) 评论(0) 推荐(0)
3DES 加解密,对长度不限制

摘要:#region 3DES /// /// 3DES加密 /// /// 需加密的字符串 /// 密匙 /// public static string DES3Encrypt(string str... 阅读全文
posted @ 2014-12-19 10:16 梦幻仙境的精灵 阅读(1824) 评论(0) 推荐(0)
实体类和xml之间的序列化

摘要:/// /// Xml序列化与反序列化 /// public class XmlUtil { public static string GetRoot(string xml) { if (xml == null) ... 阅读全文
posted @ 2014-12-19 10:14 梦幻仙境的精灵 阅读(557) 评论(1) 推荐(0)
常用

摘要:1、 style="word-break: break-all" 自动回车2、图片链接 3、@using(Html.BeginForm("Upload","File",FormMethod.Post,new {enctype="multipart/form-data"})){@Html.TextBo... 阅读全文
posted @ 2014-12-19 10:07 梦幻仙境的精灵 阅读(128) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3