升级windows mysql版本
Windows 11安装WSL2
N150 万兆小主机折腾记
letsencrypt 自动续期
Janus-Pro 使用
AI学习记录
通过VLAN 进行局域网隔离
阿里云Ubuntu 重0开始
PVE 中LXC的Ubuntu安装minikube
Office Online安装
最新发布
admin
阅读(3448)
评论(0)
在FYJ.Winui和FYJ.Winform中都用到了这个类,也是在网上找的,做了点修改usingSystem;
usingSystem.Collections.Generic;
usingSystem.Text;
usingSystem.Drawing;
namespaceFYJ.Winui.Util
{
publicclassHSLColor
{
privateint_alpha=255;
privateint_hue=0;
privatedouble_saturation=1d;
privatedouble_lightness=1d;
publicHSL [...] 阅读全文
admin
阅读(5417)
评论(0)
在做界面的时候,有时是很小的一张图片,我们不能直接将其放大,而是需要九宫格处理,所以android就原生支持.这是网上找的一段代码,自己经过一些修改。一个帮助类usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows;
usingSystem.Windows.Controls;
usingSystem.Windows.Data;
usingSystem.Windows.Documents;
usingSystem.Windows.I [...] 阅读全文
admin
阅读(4758)
评论(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 [...] 阅读全文
admin
阅读(4477)
评论(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 [...] 阅读全文
admin
阅读(5244)
评论(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. [...] 阅读全文
admin
阅读(3610)
评论(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 [...] 阅读全文
admin
阅读(4139)
评论(0)
是时候抛下Winform学下WPF了,之前不是写了一个FYJ.Winform嘛,确实花了很多时间,感觉很不值。现在来用WPF重构,却只花了一周多时间,当然有些控件没有做。确实花少量工作就能实现以前的大量工作...wifrom要各种重绘和处理windows消息界面跟以前的差不多不过这个无边框的拖动调整大小确实废了点事,当然最后也是网上找的一段。 [...] 阅读全文
admin
阅读(3230)
评论(0)
我就想获取某行某列的文本,本来在winform中很简单的,却发现在wpf中还挺不好做,也许是我还没找到简单的实现。///<summary>
///获取单元格文字
///</summary>
///<paramname="dataGrid1"></param>
///<paramname="str"></param>
///<returns></returns>
publicstaticstringGetCellIndex(DataGriddata [...] 阅读全文
admin
阅读(3584)
评论(0)
这个问题该怎么描述呢,我就是想获取到html再自己处理,貌似可以用HttpModule然后重写Response.Filter的StreamMVC我的做法是publicstaticstringRenderPartialViewToString(Controllercontroller,stringviewName,objectmodel)
{
controller.ViewData.Model=model;
StringWritersw=newStringWriter();
ViewEngineResultviewResult=ViewEngines.Engines.FindPartia [...] 阅读全文
admin
阅读(3583)
评论(0)
前面胡乱贴了些较复杂的一些代码实现,主要过去这么久不知道怎么写,也显示了我的博客后台设计以及数据库设计...应该不会有人有兴趣黑我的博客吧,不过欢迎。我想sql注入应该没有了,xss和xsrf 也许有,当然也许还有其它许多漏洞,自己也没怎么测试。 [...] 阅读全文