ClassLibraryWeiBao/QR二维码/Windows/WPF/QrCodeGeoControl.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.ComponentModel;
using Gma.QrCodeNet.Encoding.Windows.Render;

namespace Gma.QrCodeNet.Encoding.Windows.WPF
{
    public class QrCodeGeoControl : Control
    {
        private QrCode m_QrCode = new QrCode();
        private int m_width = 21;
        private bool m_isLocked = false;

        public event EventHandler QrMatrixChanged;

      

        #region LightBrush
        public static readonly DependencyProperty LightBrushProperty =
            DependencyProperty.Register("LightBrush", typeof(Brush), typeof(QrCodeGeoControl), new UIPropertyMetadata(Brushes.White));
        [Browsable(true), EditorBrowsable(EditorBrowsableState.Always), Category("Qr Code")]
        public Brush LightBrush
        {
            get { return (Brush)GetValue(LightBrushProperty); }
            set { SetValue(LightBrushProperty, value); }
        }
        #endregion

        #region DarkBrush
        public static readonly DependencyProperty DarkBrushProperty =
            DependencyProperty.Register("DarkBrush", typeof(Brush), typeof(QrCodeGeoControl), new UIPropertyMetadata(Brushes.Black));
        [Browsable(true), EditorBrowsable(EditorBrowsableState.Always), Category("Qr Code")]
        public Brush DarkBrush
        {
            get { return (Brush)GetValue(DarkBrushProperty); }
            set { SetValue(DarkBrushProperty, value); }
        }
        #endregion

        #region QuietZone
        public static readonly DependencyProperty QuietZoneModuleProperty =
            DependencyProperty.Register("QuietZoneModule", typeof(QuietZoneModules), typeof(QrCodeGeoControl),
            new UIPropertyMetadata(QuietZoneModules.Two, new PropertyChangedCallback(OnQuietZonePixelSizeChanged)));
        [Browsable(true), EditorBrowsable(EditorBrowsableState.Always), Category("Qr Code")]
        public QuietZoneModules QuietZoneModule
        {
            get { return (QuietZoneModules)GetValue(QuietZoneModuleProperty); }
            set { SetValue(QuietZoneModuleProperty, value); }
        }

        #endregion

        #region ErrorCorrectionLevel
        public static readonly DependencyProperty ErrorCorrecLeveltProperty =
            DependencyProperty.Register("ErrorCorrectLevel", typeof(ErrorCorrectionLevel), typeof(QrCodeGeoControl),
            new UIPropertyMetadata(ErrorCorrectionLevel.M, new PropertyChangedCallback(OnMatrixValueChanged)));
        [Browsable(true), EditorBrowsable(EditorBrowsableState.Always), Category("Qr Code")]
        public ErrorCorrectionLevel ErrorCorrectLevel
后面还有 143 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。