摘要: /* * ===================================================================================== * * Filename: haffman.c * * Description: huffman coder decoder * * Version: 1.0 * Created: * Revision: none ... 阅读全文
posted @ 2016-06-16 08:58 GavinJune 阅读(15353) 评论(2) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Web; using System.Text; using System.Reflection; using System.Collections; using System.Data; using System.Data.Common; using System.Web.S... 阅读全文
posted @ 2016-05-09 16:40 GavinJune 阅读(4824) 评论(0) 推荐(2) 编辑
摘要: 由于公司的需求,这几天研究下了验证码识别。对验证码识别大致分这几个过程,第一步获取验证码,第二对验证码处理,如果颜色单一没什么背景杂色就直接二值化处理,注意阙值,有干扰线的把干扰线和背景去掉,最终变为背景为白色,验证码前景色为黑色。第三步就是切割,把验证码从图片中切割出来,第四建立识别库,切割后的图 阅读全文
posted @ 2016-04-18 09:06 GavinJune 阅读(6440) 评论(4) 推荐(7) 编辑
摘要: 1、简介 随着多核时代的到来,并行开发越来越展示出它的强大威力!使用并行程序,充分的利用系统资源,提高程序的性能。在.net 4.0中,微软给我们提供了一个新的命名空间:System.Threading.Tasks。2、测试类using System;using System.Collection... 阅读全文
posted @ 2015-01-14 19:06 GavinJune 阅读(1539) 评论(0) 推荐(1) 编辑
摘要: 一、ImageButton1、继承ImageButtonButton,添加依赖属性using System;using System.Windows;using System.Windows.Controls;namespace June.Wpf.Tookit.Controls{ public... 阅读全文
posted @ 2015-01-09 16:43 GavinJune 阅读(11362) 评论(1) 推荐(1) 编辑
摘要: 1. 在你的工程中,添加app.config文件。文件的内容默认为:1 2 3 2.如果你想给程序配置一些参数,就在标签中添加.例如下面:1 2 3 4 5 6 7 3.然后你在后台程序里需要的地方读写它就可以了。记住需要添加引用usi... 阅读全文
posted @ 2015-01-06 15:59 GavinJune 阅读(11774) 评论(4) 推荐(3) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windo... 阅读全文
posted @ 2015-01-06 15:45 GavinJune 阅读(3320) 评论(0) 推荐(0) 编辑
摘要: 1、不规则形状按钮(通过更改path实现) View Code 阅读全文
posted @ 2014-12-23 15:42 GavinJune 阅读(2206) 评论(0) 推荐(1) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents... 阅读全文
posted @ 2014-12-08 18:41 GavinJune 阅读(4612) 评论(0) 推荐(2) 编辑
摘要: 1、在项目中使用ListBox时,经常会将ItemContainerStyle和ItemTemplate的作用搞混,ItemTemplate可以搞定一切好似ItemContainerStyle有点多余。我们再来看下ItemContainerStyle和ItemTemplate。 ItemContainerStyle用于给每个Item的容器定义样式,其类型是Style。包含了操作Item的Trigg... 阅读全文
posted @ 2014-11-19 15:30 GavinJune 阅读(1392) 评论(0) 推荐(0) 编辑
摘要: 1、WPF 4 DataGrid 控件(基本功能篇) 基本使用,绑定数据展示 2、WPF 4 DataGrid 控件(自定义样式篇) 定义行,列,头,单元格等样式 3、WPF 4 DataGrid 控件(进阶篇一) 自定义单元格模板 4、WPF 4 DataGrid 控件(进阶篇二) 为DataGrid 行增加一些必要的详细信息 阅读全文
posted @ 2014-11-12 15:55 GavinJune 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: 一、WPF灰度处理(转) 文章的内容是来自微软中文技术论坛的一个帖子,当时是想将一段将图片灰度处理的代码转换为XAML的一个样式,在这里要谢谢 Xiao Yan Qiang、Sheldon _Xiao、shixin的热情回答,现在将他们的回答贴出来供大家学习参考.内容如下: 提问: 这个功能如何写成一个样式,将一个窗体内所有的Image控件的图片格式都转换为Gray8 BitmapImage bi... 阅读全文
posted @ 2014-11-11 14:53 GavinJune 阅读(3922) 评论(0) 推荐(0) 编辑
摘要: 很多时候,我们会使用图片来装饰UI,比如作为控件背景等。而这些图片可以分为两种形式,即存在于本地文件系统中的图片和存在于内存中的图片对于这两种形式的图片,在WPF中,使用方法不同,下面主要说明针对这两种形式图片的使用方法一、存在于本地文件系统中的图片文件对于此类图片,使用非常简单,在xaml中直接指定路径即可,如: 12 3 4 5对应的的C#代码为 1ImageBrush imageBr... 阅读全文
posted @ 2014-11-07 14:02 GavinJune 阅读(7643) 评论(0) 推荐(0) 编辑
摘要: 1、关于WebClient第三方的封装,支持多文件上传等using System; using System.Collections.Generic; using System.Text; using System.Net; using System.Net.Sockets; using ... 阅读全文
posted @ 2014-11-06 16:01 GavinJune 阅读(41893) 评论(4) 推荐(5) 编辑
摘要: 如果你在创建项目的时候细心的查看一下项目的结构,你会发现里面有一个App.xaml,一见到App我们知道是应用程序的关键了配置了,当然,WPF的启动窗体也在这里面设置的。 我们可以在App的中配置启动页,如下所示: 当然,我们还可以再App.cs重写OnStartUp来设置要启动的页面来设置启动的页面,如: public partial class App : Application { pr... 阅读全文
posted @ 2014-10-29 13:04 GavinJune 阅读(26235) 评论(0) 推荐(3) 编辑
摘要: 1.定义一个线程 var task1 = Task.Factory.StartNew(() => DoSomeWork());方法如下: View Code private static object DoSomeWork() { Console.WriteLine("nihao "); System.Threading.... 阅读全文
posted @ 2014-10-27 16:44 GavinJune 阅读(1424) 评论(0) 推荐(1) 编辑
摘要: 一个Metro风格的开源项目 MahApps.Metro 阅读全文
posted @ 2014-10-13 17:41 GavinJune 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 1、使用架构(XSD)验证XML文件 2、使用自动生成工具: 工具目录:C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools 工具名称:xsd.exe 使用帮助:生成xml架构文档xsd——>拷贝xml文件到工具目录下,打开命令工具,进入该目录,执行命令:xsd my... 阅读全文
posted @ 2014-10-11 11:50 GavinJune 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 关于Task类处理多线程简单示例8天玩转并行开发——第二天 Task的使用 阅读全文
posted @ 2014-10-09 13:53 GavinJune 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 一、Application Data简介 Applicaion Data相当于桌面应用的注册表,存储一些用户配置信息,如运行时状态,用户喜好等,需要注意的时,当卸载应用时,这些数据会被删除,所以不要存储重要数据。 Applicaion Data即使在应用更新以后也不会丢失,有一个版本控制。二、按... 阅读全文
posted @ 2014-10-08 17:15 GavinJune 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 1、Buttonprotected override void OnNavigatedTo(NavigationEventArgs e) { /* * Button - 按钮控件,其全部功能是通过其基类 ButtonBase 提供的 ... 阅读全文
posted @ 2014-10-08 15:58 GavinJune 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 1 TextBox简单实例内容摘要:包含文本的选中,弹出什么类型的键盘,回车隐藏键盘, ... 阅读全文
posted @ 2014-09-30 17:36 GavinJune 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 1 TextBlock简单实例应用 ... 阅读全文
posted @ 2014-09-30 13:47 GavinJune 阅读(856) 评论(0) 推荐(0) 编辑
摘要: 1 Buton入门简单应用 ... 阅读全文
posted @ 2014-09-30 13:45 GavinJune 阅读(423) 评论(0) 推荐(1) 编辑
摘要: 1、设计模式之单例模式 : http://www.cnblogs.com/sndnnlfhvk/p/3978363.html 由浅入深介绍单例模式,并介绍了多线程下的单例模式。写的相当不错。 阅读全文
posted @ 2014-09-28 14:02 GavinJune 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1、页面导航与页面传值:http://blog.csdn.net/tcjiaan/article/details/7895487 阅读全文
posted @ 2014-09-26 17:56 GavinJune 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 第一个页面:前台 后台 private void Button_Click_1(object Sender,RoutedEventArgs e){ Frame.Navigate(typeof(另一页面));} 另一个页面:前台 后台 private void Button_Click_1(object Sender,RoutedEventArgs e){ Frame.GoBack(... 阅读全文
posted @ 2014-09-26 17:10 GavinJune 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 无意间看到这个需求,查阅了相关文章,有两篇不错的博客给出了解决方案,地址如下: 1、在WPF程序中将控件所呈现的内容保存成图像 2、随心所欲导出你的 UI 界面到 PDF 文件 主要使用的接口: Silverlight 平台:下我们使用 WriteableBitmap 类来渲染 UI 到图片。通过 Render 方法即可生成图片。这种方法不仅可以渲染某个控件,同时可以创建整个页面。只需要把根节点赋... 阅读全文
posted @ 2014-09-11 11:51 GavinJune 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: 1、读取Isolated Storage 每个Metro程序都有三个文件夹:Local,Roaming,Temp。每个文件夹的访问方法都是相同的. Local用于将数据存储在本地,这是程序特定的文件夹. Roaming存储的文件可能会用于与其他程序进行同步. Temp中的文件,在程序每次启动的时候都... 阅读全文
posted @ 2014-09-10 11:46 GavinJune 阅读(1449) 评论(0) 推荐(1) 编辑
摘要: 【译】.NET中六个重要的概念:栈、堆、值类型、引用类型、装箱和拆箱 - Edison Chou - 博客园http://www.cnblogs.com/edisonchou/p/3947170.html 阅读全文
posted @ 2014-09-02 09:14 GavinJune 阅读(658) 评论(0) 推荐(0) 编辑