珂珂的个人博客 - 一个程序猿的个人网站

最新发布

[未分类]

WPF九宫格切图

admin 阅读(5334) 评论(0)

在做界面的时候,有时是很小的一张图片,我们不能直接将其放大,而是需要九宫格处理,所以android就原生支持.这是网上找的一段代码,自己经过一些修改。一个帮助类usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Data; usingSystem.Windows.Documents; usingSystem.Windows.I [...]   阅读全文

[未分类]

FYJ.Winui系列(五)-主窗体

admin 阅读(4660) 评论(0)

基窗体写好,后面已经很简单了XAML代码<local:BaseWindowx:Class="FYJ.Winui.MainWindow" x:Name="mainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FYJ.Winui&qu [...]   阅读全文

[未分类]

FYJ.Winui系列(四)-基窗体

admin 阅读(4383) 评论(0)

这当然也是费时间很多的一个点,我还在想着winform的继承思想,由于要继承不能有XAML代码,不过我们可以用变种方法来实现。WPF做界面确实比Winform好太多了.我们可以把窗体写成一个Style<ResourceDictionaryxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FY [...]   阅读全文

[未分类]

FYJ.Winui系列(三)-换肤控件

admin 阅读(5143) 评论(0)

这个事比较复杂,不过相对与FYJ.Winfrom中实现的可是简单许多了,这之前有点小问题,就是启动后要点两次才会换色,后来就一次,始终没打找到原因privatevoidCanvImage_sMouseDown(objectsender,MouseButtonEventArgse) { Pointp=e.GetPosition((IInputElement)sender); this.ellipsePixel_s.SetValue(Canvas.LeftProperty,p.X-4); this.ellipsePixel_s.SetValue(Canvas.TopProperty,p. [...]   阅读全文

[未分类]

FYJ.Winui系列(二)-按钮控件

admin 阅读(3505) 评论(0)

这里做简单了,只写了两种状态,正常状态和鼠标移进去的状态。来看看xaml代码<Buttonx:Class="FYJ.Winui.ButtonUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-com [...]   阅读全文

[未分类]

FYJ.Winui系列(一)

admin 阅读(4101) 评论(0)

是时候抛下Winform学下WPF了,之前不是写了一个FYJ.Winform嘛,确实花了很多时间,感觉很不值。现在来用WPF重构,却只花了一周多时间,当然有些控件没有做。确实花少量工作就能实现以前的大量工作...wifrom要各种重绘和处理windows消息界面跟以前的差不多不过这个无边框的拖动调整大小确实废了点事,当然最后也是网上找的一段。 [...]   阅读全文

[未分类]

wpf获取DataGrid文本

admin 阅读(3147) 评论(0)

我就想获取某行某列的文本,本来在winform中很简单的,却发现在wpf中还挺不好做,也许是我还没找到简单的实现。///<summary> ///获取单元格文字 ///</summary> ///<paramname="dataGrid1"></param> ///<paramname="str"></param> ///<returns></returns> publicstaticstringGetCellIndex(DataGriddata [...]   阅读全文

[未分类]

MVC生成静态html页的做法

admin 阅读(3497) 评论(0)

这个问题该怎么描述呢,我就是想获取到html再自己处理,貌似可以用HttpModule然后重写Response.Filter的StreamMVC我的做法是publicstaticstringRenderPartialViewToString(Controllercontroller,stringviewName,objectmodel) { controller.ViewData.Model=model; StringWritersw=newStringWriter(); ViewEngineResultviewResult=ViewEngines.Engines.FindPartia [...]   阅读全文

[未分类]

FYJ.Blogs开发系列(十一)-后记

admin 阅读(3550) 评论(0)

前面胡乱贴了些较复杂的一些代码实现,主要过去这么久不知道怎么写,也显示了我的博客后台设计以及数据库设计...应该不会有人有兴趣黑我的博客吧,不过欢迎。我想sql注入应该没有了,xss和xsrf 也许有,当然也许还有其它许多漏洞,自己也没怎么测试。 [...]   阅读全文

[未分类]

FYJ.Blogs开发系列(十)-主页查询存储过程

admin 阅读(4008) 评论(0)

USE[db_blogs] GO /******Object:StoredProcedure[dbo].[blog_proc_main]ScriptDate:2014/5/2923:52:35******/ SETANSI_NULLSON GO SETQUOTED_IDENTIFIERON GO --============================================= --Author: <fangyj> --Createdate:<2012-12-30> --Description: <个人博客首页> --分类 [...]   阅读全文