Source/BubbleBarOverlay.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.Windows.Forms;
using System.ComponentModel;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Represents overlay class to support bubble effects on BubbleBar control.
/// </summary>
[ToolboxItem(false)]
internal class BubbleBarOverlay:Control
{
#region Private Variables
private BubbleBar m_BubbleBar=null;
private Timer m_VisibilityTimer=null;
#endregion
#region Internal Implementation
public BubbleBarOverlay(BubbleBar parent)
{
if(parent==null)
throw new InvalidOperationException("Parent BubbleBar object for BubbleBarOverlay cannot be null.");
m_BubbleBar=parent;
this.SetStyle(ControlStyles.UserPaint,true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
this.SetStyle(ControlStyles.Opaque,true);
this.SetStyle(ControlStyles.ResizeRedraw,true);
//this.SetStyle(DisplayHelp.DoubleBufferFlag,true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor,true);
this.SetStyle(ControlStyles.ContainerControl,false);
this.SetStyle(ControlStyles.Selectable,false);
this.BackColor=Color.Transparent;
}
protected override void OnPaint(PaintEventArgs e){}
internal void UpdateWindow()
{
// Create bitmap for drawing onto
Bitmap memoryBitmap = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppArgb);
using(Graphics g = Graphics.FromImage(memoryBitmap))
{
// Draw the background area
g.Clear(Color.Transparent);
g.CompositingMode=System.Drawing.Drawing2D.CompositingMode.SourceCopy;
g.TextRenderingHint = DisplayHelp.AntiAliasTextRenderingHint;
g.SmoothingMode=System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
PaintEventArgs p=new PaintEventArgs(g,this.DisplayRectangle);
m_BubbleBar.OnPaintOverlay(p);
// Get hold of the screen DC
IntPtr hDC = NativeFunctions.GetDC(IntPtr.Zero);
后面还有 222 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。