You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/UCDraw/PcgDraw/DrawerPanel.cs

52 lines
1.2 KiB
C#

1 month ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace PcgDraw
{
/// <summary>
/// 停靠控件基类
/// </summary>
public partial class DrawerPanel : DockContent
{
/// <summary>
/// Initializes a new instance of the <see cref="DrawerPanel"/> class.
/// </summary>
public DrawerPanel()
{
InitializeComponent();
}
/// <summary>
/// 标识
/// </summary>
public int ID { get; set; }
/// <summary>
/// 主控件
/// </summary>
public Control MainControl
{
get
{
if (this.Controls.Count > 0)
{
return this.Controls[0];
}
return null;
}
set
{
this.Controls.Clear();
this.Controls.Add(value);
value.Dock = DockStyle.Fill;
}
}
}
}