WPF-UI HandyControl 控件简单实战

news2024/9/21 16:31:22

文章目录

  • 前言
  • UserControl简单使用
  • 新建项目
  • 直接新建项目
    • 初始化UserControl
    • Geometry:矢量图形
      • 额外Icon导入
        • 最优解决方案
    • 按钮Button
      • 切换按钮ToggleButton
        • 默认按钮
        • 图片可切换按钮
        • 加载按钮
        • 切换按钮
      • 单选按钮和复选按钮没有太大特点,就不展开写了
      • 总结
    • DataGrid数据表格
    • Growl消息提示
  • 结论

前言

因为HandyControl 的功能非常的丰富,我打算完整的了解一下HandyControl 整个控件的基本使用,而且我的网易云WPF项目也打算用UserControl 进行重构

UserControl简单使用

WPF-UI HandyControl 简单介绍

HandyControl Visual Studio 插件

HandyControl Github地址

HandyControl 官方中文文档

HandyControl 实战Gitee仓库

新建项目

我们下载了HandyControl 插件之后,就可以使用HandyControl模板开始项目。
在这里插入图片描述
但是根据我的测试,第一这个HandyControl的.Net 版本都是.Net Core 5.0的。而且用起来还是不太舒服

直接新建项目

在这里插入图片描述

App.Xaml

<Application x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WpfApp1"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

初始化UserControl

在这里插入图片描述
MainWindow

   <Grid>

       <TabControl  Style="{StaticResource TabControlInLine}"
                   x:Name="MyTable">
           <!--通过设置Collapsed来完全折叠TabItem-->
           <TabItem Header="A">
               <View:ViewA />
           </TabItem>
           <TabItem Header="B">
               <View:ViewB />

           </TabItem>

           <TabItem Header="C">
               <View:ViewC />

           </TabItem>
       </TabControl>
   </Grid>

接下来我会对HandyControl的特色控件进行实战。比如别的UI库没有实现的

Geometry:矢量图形

HandyControl对常用的矢量图形进行了封装
在这里插入图片描述

额外Icon导入

毕竟默认的Icon比较少,而且按照作者的意思,他不希望把HandyControl写的太臃肿。

How to convert a PackIconMarkup to a Geometry object? #256

这里用到了我们之前的矢量图

WPF Icon矢量库 MahApps.Metro.IconPacks

在Resource中添加

<Geometry x:Key="MyTest">矢量代码</Geometry>

然后在IconPacks Browser里面搜索对应的Data
在这里插入图片描述

在这里插入图片描述
我暂时没找到更好的方法,去直接转换。应该是通过某种方法直接拿到里面全部的Geometry数据

    <UserControl.Resources>
    <!--定义数据,这个是直接拿到的矢量数据-->
        <Geometry x:Key="MyTest">M20 12V7H22V13H20M20 17H22V15H20M10 13C12.67 13 18 14.34 18 17V20H2V17C2 14.34 7.33 13 10 13M10 4A4 4 0 0 1 14 8A4 4 0 0 1 10 12A4 4 0 0 1 6 8A4 4 0 0 1 10 4M10 14.9C7.03 14.9 3.9 16.36 3.9 17V18.1H16.1V17C16.1 16.36 12.97 14.9 10 14.9M10 5.9A2.1 2.1 0 0 0 7.9 8A2.1 2.1 0 0 0 10 10.1A2.1 2.1 0 0 0 12.1 8A2.1 2.1 0 0 0 10 5.9Z</Geometry>

    </UserControl.Resources>
    ......其它代码
    <Button IsEnabled="False"
        Margin="5"
        Content="Test"
        hc:BorderElement.CornerRadius="10"
        hc:IconElement.Geometry="{StaticResource MyTest}" />

效果
在这里插入图片描述

最优解决方案

自己新建一个字典:
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

<Application x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WpfApp1"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
                <!--这个是你自己的扩展Geometry字典-->
                <ResourceDictionary Source="/WpfApp1;component/Style/IconPacksGeometry.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

按钮Button

HandyControl 对Button进行了扩展,改造成了图标按钮。默认Icon在左,文本在右。而且添加了一些扩展属性,可以直接进行修改。

  • hc:HandyControl
  • IconElement:图标扩展
    • Geometry:矢量图标
    • Width:宽度
    • Heigth:高度
  • BorderElement:边框扩展
<Button IsEnabled="False"
                Margin="5"
                Content="Test"
                hc:BorderElement.CornerRadius="10"
                hc:IconElement.Geometry="{StaticResource UpDownGeometry}" />

在这里插入图片描述

切换按钮ToggleButton

默认是没有带切换功能的,不太了解,如果你使用的是Default按钮,是不能进行切换的

默认按钮
        <ToggleButton Margin="5"
                      Content="内容"
                      Style="{StaticResource ToggleButtonDefault}"
                      hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}"
                      hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}" />

按钮点击无反应
在这里插入图片描述

图片可切换按钮

如果使用可翻转按钮,Content就无效了,这个我不太理解为什么要无效。
这里的Geometry可以用我之前的直接导入法替换Icon

        <Geometry x:Key="Material.AccountCog">M10 4A4 4 0 0 0 6 8A4 4 0 0 0 10 12A4 4 0 0 0 14 8A4 4 0 0 0 10 4M17 12C16.87 12 16.76 12.09 16.74 12.21L16.55 13.53C16.25 13.66 15.96 13.82 15.7 14L14.46 13.5C14.35 13.5 14.22 13.5 14.15 13.63L13.15 15.36C13.09 15.47 13.11 15.6 13.21 15.68L14.27 16.5C14.25 16.67 14.24 16.83 14.24 17C14.24 17.17 14.25 17.33 14.27 17.5L13.21 18.32C13.12 18.4 13.09 18.53 13.15 18.64L14.15 20.37C14.21 20.5 14.34 20.5 14.46 20.5L15.7 20C15.96 20.18 16.24 20.35 16.55 20.47L16.74 21.79C16.76 21.91 16.86 22 17 22H19C19.11 22 19.22 21.91 19.24 21.79L19.43 20.47C19.73 20.34 20 20.18 20.27 20L21.5 20.5C21.63 20.5 21.76 20.5 21.83 20.37L22.83 18.64C22.89 18.53 22.86 18.4 22.77 18.32L21.7 17.5C21.72 17.33 21.74 17.17 21.74 17C21.74 16.83 21.73 16.67 21.7 16.5L22.76 15.68C22.85 15.6 22.88 15.47 22.82 15.36L21.82 13.63C21.76 13.5 21.63 13.5 21.5 13.5L20.27 14C20 13.82 19.73 13.65 19.42 13.53L19.23 12.21C19.22 12.09 19.11 12 19 12H17M10 14C5.58 14 2 15.79 2 18V20H11.68A7 7 0 0 1 11 17A7 7 0 0 1 11.64 14.09C11.11 14.03 10.56 14 10 14M18 15.5C18.83 15.5 19.5 16.17 19.5 17C19.5 17.83 18.83 18.5 18 18.5C17.16 18.5 16.5 17.83 16.5 17C16.5 16.17 17.17 15.5 18 15.5Z</Geometry>
        <Geometry x:Key="Material.AccountCogOutline">M10 4A4 4 0 0 0 6 8A4 4 0 0 0 10 12A4 4 0 0 0 14 8A4 4 0 0 0 10 4M10 6A2 2 0 0 1 12 8A2 2 0 0 1 10 10A2 2 0 0 1 8 8A2 2 0 0 1 10 6M17 12C16.84 12 16.76 12.08 16.76 12.24L16.5 13.5C16.28 13.68 15.96 13.84 15.72 14L14.44 13.5C14.36 13.5 14.2 13.5 14.12 13.6L13.16 15.36C13.08 15.44 13.08 15.6 13.24 15.68L14.28 16.5V17.5L13.24 18.32C13.16 18.4 13.08 18.56 13.16 18.64L14.12 20.4C14.2 20.5 14.36 20.5 14.44 20.5L15.72 20C15.96 20.16 16.28 20.32 16.5 20.5L16.76 21.76C16.76 21.92 16.84 22 17 22H19C19.08 22 19.24 21.92 19.24 21.76L19.4 20.5C19.72 20.32 20.04 20.16 20.28 20L21.5 20.5C21.64 20.5 21.8 20.5 21.8 20.4L22.84 18.64C22.92 18.56 22.84 18.4 22.76 18.32L21.72 17.5V16.5L22.76 15.68C22.84 15.6 22.92 15.44 22.84 15.36L21.8 13.6C21.8 13.5 21.64 13.5 21.5 13.5L20.28 14C20.04 13.84 19.72 13.68 19.4 13.5L19.24 12.24C19.24 12.08 19.08 12 19 12H17M10 13C7.33 13 2 14.33 2 17V20H11.67C11.39 19.41 11.19 18.77 11.09 18.1H3.9V17C3.9 16.36 7.03 14.9 10 14.9C10.43 14.9 10.87 14.94 11.3 15C11.5 14.36 11.77 13.76 12.12 13.21C11.34 13.08 10.6 13 10 13M18.04 15.5C18.84 15.5 19.5 16.16 19.5 17.04C19.5 17.84 18.84 18.5 18.04 18.5C17.16 18.5 16.5 17.84 16.5 17.04C16.5 16.16 17.16 15.5 18.04 15.5Z</Geometry>

......其它代码
 <ToggleButton Margin="5"
               Content="内容"
               Style="{StaticResource ToggleButtonIconInfo}"
               hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}"
               hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}" />

 <ToggleButton Margin="5"
               Content="内容"
               Style="{StaticResource ToggleButtonIconDanger}"
               hc:IconSwitchElement.Geometry="{StaticResource Material.AccountCog}"
               hc:IconSwitchElement.GeometrySelected="{StaticResource Material.AccountCogOutline}" />

在这里插入图片描述

加载按钮

添加LoadingStyle会将Icon的效果无效

        <ToggleButton Margin="5"
                      Content="内容"
                      Style="{StaticResource ToggleButtonLoadingInfo}"
                      hc:IconSwitchElement.Geometry="{StaticResource Material.AccountCog}"
                      hc:IconSwitchElement.GeometrySelected="{StaticResource Material.AccountCogOutline}" />

在这里插入图片描述

切换按钮

大小有点小,用的时候要放大点

        <ToggleButton Margin="5"
                      Content="内容"
                      FontSize="20"
                      Style="{StaticResource ToggleButtonSwitch}"
                      hc:IconSwitchElement.Geometry="{StaticResource Material.AccountCog}"
                      hc:IconSwitchElement.GeometrySelected="{StaticResource Material.AccountCogOutline}" />

在这里插入图片描述

单选按钮和复选按钮没有太大特点,就不展开写了

总结

HandyControl非常的好用,而且能进行自定义拓展,这里就不展开了。尤其是有了导入其它Icon的Geometry的能力之后,基本所有的图标都可以轻松拿下。

DataGrid数据表格

这里我们就用最简单的自动生成,看看效果
测试类

    public class TemplateDate
    {
        public string Name { get; set; }

        public int Age { get; set; }

        public long Phone { get; set; }

        public enum SexEnum {,, 保密 }

        public SexEnum Sex { get; set; }
    }

ViewModel绑定

    public class ViewBViewModel
    {
        public List<TemplateDate> TemplateDates { get; set; }
        public ViewBViewModel()
        {
            TemplateDates = new List<TemplateDate>() {
                new TemplateDate(){Name="小明",Age = 16,Phone = 13214324920,Sex = TemplateDate.SexEnum.},
                new TemplateDate(){Name="小红",Age = 17,Phone = 38188949204,Sex = TemplateDate.SexEnum.}
            };
        }
    }

View绑定

        <DataGrid CanUserAddRows="False"
                  hc:DataGridAttach.CanUnselectAllWithBlankArea="True"
                  ItemsSource="{Binding TemplateDates}"
                  SelectionMode="Extended"
                  SelectionUnit="Cell" />

在这里插入图片描述
感觉UI效果还行

Growl消息提示

这个部分比较难,可以看看官方的文档

Growl 信息通知

如果想要设置提示的位置,可以手动添加如下控件。可以修改提示出现的位置。不过我个人建议不添加,因为默认的左上角就够用了。

<ScrollViewer VerticalScrollBarVisibility="Hidden"
              HorizontalAlignment="Right">
    <StackPanel hc:Growl.GrowlParent="True"
                VerticalAlignment="Top"
                Margin="0,10,10,10" />
</ScrollViewer>

按钮事件声明

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using HandyControl.Controls;
using HandyControl.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp1.ViewModels
{
    public class ViewAViewModel:ObservableObject
    {
        public RelayCommand InfoBtn { get; set; }

        public RelayCommand SuccessBtn { get; set; }

        public RelayCommand WarningBtn { get; set; }    

        public RelayCommand ErrorBtn { get; set; }

        public RelayCommand AskBtn { get; set; }

        public RelayCommand SeriousBtn { get; set; }

        public RelayCommand ClearBtn { get; set; }

        public RelayCommand InfoGlobalBtn { get; set; }

        public RelayCommand SuccessGlobalBtn { get; set; }

        public RelayCommand WarningGlobalBtn { get; set; }

        public RelayCommand ErrorGlobalBtn { get; set; }

        public RelayCommand AskGlobalBtn { get; set; }

        public RelayCommand SeriousGlobalBtn { get; set; }

        public RelayCommand ClearGlobalBtn { get; set; }

        public ViewAViewModel() {
            InfoBtn = new RelayCommand(() =>
            {
                Growl.Info("消息");
            });
            SuccessBtn = new RelayCommand(() => {
                Growl.Success("成功!");
            });

            WarningBtn = new RelayCommand(() => {
                Growl.Warning("警告");
            });
            ErrorBtn = new RelayCommand(() => {
                Growl.Error("错误");
            });

            AskBtn = new RelayCommand(() => {
                Growl.Ask("询问", isConfirmed =>
                {
                    Growl.Info($"询问结果[{isConfirmed}]");
                    return true;
                });
            
            });
            SeriousBtn = new RelayCommand(() => {
                Growl.Fatal("严重");
            });
            ClearBtn = new RelayCommand(() => { 
            
                Growl.Clear();
            });


            InfoGlobalBtn = new RelayCommand(() =>
            {
                Growl.InfoGlobal("消息");
            });
            SuccessGlobalBtn = new RelayCommand(() => {
                Growl.SuccessGlobal("成功!");
            });

            WarningGlobalBtn = new RelayCommand(() => {
                Growl.WarningGlobal("警告");
            });
            ErrorGlobalBtn = new RelayCommand(() => {
                Growl.ErrorGlobal("错误");
            });

            AskGlobalBtn = new RelayCommand(() => {
                Growl.AskGlobal("询问", isConfirmed =>
                {
                    Growl.InfoGlobal($"询问结果[{isConfirmed}]");
                    return true;
                });

            });
            SeriousGlobalBtn = new RelayCommand(() => {
                Growl.FatalGlobal("严重");
            });
            ClearGlobalBtn = new RelayCommand(() => {

                Growl.ClearGlobal();
            });
        }
    }
}

按钮事件绑定

 <hc:Divider Content="窗体消息"
             Margin="0"
             FontSize="30" />
 <StackPanel Orientation="Horizontal">
     <StackPanel.Resources>
         <Style TargetType="Button"
                BasedOn="{StaticResource ButtonDefault}">
             <Setter Property="Margin"
                     Value="1" />
         </Style>
     </StackPanel.Resources>
     <Button Content="信息"
             Command="{Binding InfoBtn}" />
     <Button Content="成功"
             Command="{Binding SuccessBtn}" />
     <Button Content="警告"
             Command="{Binding WarningBtn}" />
     <Button Content="错误"
             Command="{Binding ErrorBtn}" />
     <Button Content="询问"
             Command="{Binding AskBtn}" />
     <Button Content="严重"
             Command="{Binding SeriousBtn}" />
     <Button Content="清空"
             Command="{Binding ClearBtn}" />
 </StackPanel>
 <hc:Divider Content="桌面消息"
             Margin="0"
             FontSize="30" />
 <StackPanel Orientation="Horizontal">
     <StackPanel.Resources>
         <Style TargetType="Button"
                BasedOn="{StaticResource ButtonDefault}">
             <Setter Property="Margin"
                     Value="1" />
         </Style>
     </StackPanel.Resources>
     <Button Content="信息"
             Command="{Binding InfoGlobalBtn}" />
     <Button Content="成功"
             Command="{Binding SuccessGlobalBtn}" />
     <Button Content="警告"
             Command="{Binding WarningGlobalBtn}" />
     <Button Content="错误"
             Command="{Binding ErrorGlobalBtn}" />
     <Button Content="询问"
             Command="{Binding AskGlobalBtn}" />
     <Button Content="严重"
             Command="{Binding SeriousGlobalBtn}" />
     <Button Content="清空"
             Command="{Binding ClearGlobalBtn}" />
 </StackPanel>

实现效果:
在这里插入图片描述

结论

这里简单使用了一下HandyControl的控件,其实还有很多别的控件,这里由于篇幅就不展开使用了。由于有额外的Icon数据手动添加,HandyControl基本已经完美了,搭配我之前的推荐的LiveCharts2,WPF基本的UI控件已经够用了。其实WPF也是很简单的,主要是国内的相关讨论比较少。我之前写过一个网易云的WPF版本,接下来会使用HandyControl进行重构。

WPF Live Charts2 自学笔记

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1316547.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

用标记接口定义类型

标记接口是不含有任何方法的接口&#xff0c;它的目的是通过将特定接口应用于类来为该类添加类型信息。以下是一个示例&#xff1a; public interface Drawable {// 标记接口&#xff0c;不包含任何方法 }public class Circle implements Drawable {private int radius;public…

过滤器和监听器及应用

Filter及应用 Filter有什么用?一、Filter处理中文乱码二、监听器&#xff0c;统计网站在线人数1.监听器引入2.统计网站在线人数 三、Filter实现权限拦截 Filter有什么用? Filter:过滤器&#xff0c;可以用来过滤网站的数据。 比如处理中文乱码&#xff0c;每次写servlet&…

k8syaml提供的几个有意思的功能,Kubernetes在线工具网站

k8syaml.cn 提供的几个有意思的功能。 一、yaml资源快速生成 之前编写operator的helm的时候就需要自己写deployment、service、configmap这些资源&#xff0c;那么多字段也记不清&#xff0c;都是先找个模版&#xff0c;然后copy改改&#xff0c;再看官方文档&#xff0c;添加…

LeetCode(66)二叉树的最大深度【二叉树】【简单】

目录 1.题目2.答案3.提交结果截图 链接&#xff1a; 二叉树的最大深度 1.题目 给定一个二叉树 root &#xff0c;返回其最大深度。 二叉树的 最大深度 是指从根节点到最远叶子节点的最长路径上的节点数。 示例 1&#xff1a; 输入&#xff1a;root [3,9,20,null,null,15,7]…

[已解决】uniapp内置插件,editor富文本报错(附quill.min.js、image-resize.min.js文件)

在使用uni-app运行内置插件editor时&#xff0c;无法输入内容&#xff0c;控制台报错 原因&#xff1a;查看官网得知&#xff0c;需动态引入quill.min.js、image-resize.min.js文件 解决方法&#xff1a; 1.下载quill.min.js、image-resize.min.js到项目static/eidtor文件中 链…

在Windows上通过cmake-gui及VS2019来 编译OpenCV-4.5.3源码

文章目录 下载OpenCV-4.5.3源码下载opencv_contrib-4.5.3源码打开cmake-gui选择生成器 通过 Visual Studio 2019 打开构建好的.sln工程文件执行编译操作执行安装操作 下载OpenCV-4.5.3源码 可通过github上下载&#xff0c;网上很多&#xff0c;找到tag标签&#xff0c;选择 Op…

TCP/IP详解——HTTP 协议

文章目录 1. HTTP 协议1.1 URL 的格式1.2 请求报文分析1.2.1 请求行1.2.2 请求头 1.3 响应报文分析1.3.1 状态行1.3.2 响应报头 1.4 HTTP 工作原理1.5 Request 消息1.6 Request 包解码1.7 Response 消息1.8 HTTP 协议抓包分析1.8.1 CSNAS 抓包查看1.8.2 Wireshark 抓包查看1.8.…

关于枚举的简单理解

1. 枚举的简单认识 1.1 枚举的引入 枚举是在JDK1.5以后引入的。主要用途是&#xff1a;将一组常量组织起来&#xff0c;在这之前表示一组常量通常使用定义常量的方式如下面的代码所示&#xff1a; public static final int RED 1; public static final int GREEN 2; public…

git代码管理学习文档

1.版本控制 每一版本都会发生变化 更新版本&#xff0c;回退版本 版本控制实际就是控制文件的变化 服务器端和每个人的电脑上都会记录版本的变化&#xff0c;也就是说整个团队都记录了版本的变化。 不需要连网&#xff0c;他是分布式的&#xff0c;在自己电脑上也可以操作。 …

Easy Excel生成复杂下Excel模板(下拉框)给用户下载

引言 文件的下载是一个非常常见的功能&#xff0c;也有一些非常好的框架可以使用&#xff0c;这里我们就介绍一种比较常见的场景&#xff0c;下载Excel模版&#xff0c;导入功能通常会配有一个模版下载的功能&#xff0c;根据下载的模版&#xff0c;填充数据然后再上传。 需求…

【MATLAB第82期】基于MATLAB的季节性差分自回归滑动平均模型SARIMA时间序列预测模型含预测未来

【MATLAB第82期】基于MATLAB的季节性差分自回归滑动平均模型SARIMA时间序列预测模型含预测未来 一、模型介绍 1、模型简介 季节性差分自回归移动平均模型&#xff08;Seasonal Autoregressive Integrated Moving Average Model, SARIMA&#xff09;&#xff0c;又称为周期性…

指针进阶篇

指针的基本概念&#xff1a; 指针是一个变量&#xff0c;对应内存中唯一的一个地址指针在32位平台下的大小是4字节&#xff0c;在64位平台下是8字节指针是有类型的&#xff0c;指针类型决定该指针的步长&#xff0c;即走一步是多长指针运算&#xff1a;指针-指针表示的是两个指…

SQL注入学习(配合SQLi-lab靶场)

前提条件&#xff1a; 在进行sql注入时&#xff0c;首先要确定网页有注入点&#xff0c;一般在URL地址栏中&#xff0c;或者含有输入框的地方会有 SQL注入步骤&#xff1a; 1、判断注入类型 首先判断是什么类型的注入&#xff0c;用id1 and 11 和id1 and 12 判断是数字类型注…

Redis设计与实现之整数集合

目录 一、内存映射数据结构 二、整数集合 1、整数集合的应用 2、数据结构和主要操作 3、intset运行实例 创建新intset 添加新元素到 intset 添加新元素到 intset&#xff08;不需要升级&#xff09; 添加新元素到 intset (需要升级) 4、升级 升级实例 5、关于升级 …

25.Java程序设计-基于SSM框架的微信小程序校园求职系统的设计与实现

1. 引言 1.1 背景 介绍校园求职系统的背景&#xff0c;说明为什么设计这个系统以及系统的重要性。 1.2 研究目的 阐述设计基于SSM框架的微信小程序校园求职系统的目标和意义。 2. 需求分析 2.1 行业背景 分析校园求职行业的特点和需求&#xff0c;以及目前市场上同类系统…

Spring Boot SOAP Web 服务端和客户端

一. 服务端 1. 技术栈 JDK 1.8&#xff0c;Eclipse&#xff0c;Maven – 开发环境SpringBoot – 基础应用程序框架wsdl4j – 为我们的服务发布 WSDLSOAP-UI – 用于测试我们的服务JAXB maven 插件 – 用于代码生成 2.创建 Spring Boot 项目 添加 Wsdl4j 依赖关系 编辑pom…

化学方程式小程序

brief introduction 相信大家上中学时都会被化学方程式折腾得死去活来&#xff0c;尤其是配平&#xff0c;怎么也算不对数字。于是我写出了这款近200行的自动配平程序&#xff0c;这是不是你们黑暗化学中的一丝光亮呢&#xff1f; usage 正常化学式输入&#xff0c;每一种物…

智慧农业大数据可视化UI,数据展示平台(免费可视化大屏模版PS资料)

大屏幕展示方式可以实现信息的直观呈现与交互操作&#xff0c;使农业生产者能够一目了然地掌握有关农情、天气、土壤等数据信息&#xff0c;从而科学决策。智慧农业大数据可视化大屏是提升农业生产效益的一种重要工具。 现分享亩产效益指标、农业大数据可视化、农业数据展示平…

基于EasyExcel的数据导入导出

前言&#xff1a; 代码复制粘贴即可用&#xff0c;主要包含的功能有Excel模板下载、基于Excel数据导入、Excel数据导出。 根据实际情况修改一些细节即可&#xff0c;最后有结果展示&#xff0c;可以先看下结果&#xff0c;是否是您想要的。 台上一分钟&#xff0c;台下60秒&a…

QT Widget - 随便画个圆

简介 实现在界面中画一个圆, 其实目的是想画一个LED效果的圆。代码 #include <QApplication> #include <QWidget> #include <QPainter> #include <QColor> #include <QPen>class LEDWidget : public QWidget { public:LEDWidget(QWidget *pare…