AutoPatientInfoRecorder/src/AntdUI/Forms/LayeredWindow/LayeredFormFloatButton.cs
(开头部分) 16KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
// LIMITATIONS UNDER THE License.
// GITEE: https://gitee.com/antdui/AntdUI
// GITHUB: https://github.com/AntdUI/AntdUI
// CSDN: https://blog.csdn.net/v_132
// QQ: 17379620
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace AntdUI
{
internal class LayeredFormFloatButton : ILayeredFormOpacity, IEventListener
{
FloatButton.Config config;
int BadgeSize = 6, ShadowXY = 20, ShadowS = 40;
public override bool MessageClose => false;
public LayeredFormFloatButton(FloatButton.Config _config)
{
maxalpha = 255;
config = _config;
TopMost = config.TopMost;
if (!config.TopMost) config.Form.SetTopMost(Handle);
Font = config.Font == null ? config.Form.Font : config.Font;
Helper.GDI(g =>
{
var dpi = Config.Dpi;
BadgeSize = (int)Math.Round(BadgeSize * dpi);
//ShadowXY = (int)Math.Round(ShadowXY * dpi);
//ShadowS = ShadowXY * 2;
_config.MarginX = (int)Math.Round(_config.MarginX * dpi);
_config.MarginY = (int)Math.Round(_config.MarginY * dpi);
_config.Size = (int)Math.Round(_config.Size * dpi);
int size = _config.Size, t_size = size + ShadowS;
float icon_size = size * 0.45F, xy = (size - icon_size) / 2F;
int hasx = 0, hasy = 0;
if (_config.Vertical)
{
foreach (var it in _config.Btns)
{
it.PropertyChanged += Notify_PropertyChanged;
it.rect = new Rectangle(hasx, hasy, t_size, t_size);
it.rect_read = new Rectangle(hasx + ShadowXY, hasy + ShadowXY, size, size);
it.rect_icon = new RectangleF(it.rect_read.X + xy, it.rect_read.Y + xy, icon_size, icon_size);
hasy += t_size;
后面还有 361 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。