WinHtmlEditor/Common/ContextMenuForm.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WinHtmlEditor
{
/// <summary>
/// Provides a System.Windows.Forms.Form that have a ContextMenu behavior.
/// Use this Form by extending it or by adding the control using the method:
/// <code>SetContainingControl(Control control)</code>
/// </summary>
public partial class ContextMenuForm : Form
{
private bool _locked;
/// <summary>
/// Gets or sets a value indicating that the form is locked.
/// The form should be locked when opening a Dialog on it.
/// </summary>
public bool Locked
{
get { return _locked; }
set
{
_locked = value;
}
}
private Control _parentControl = null;
/// <summary>
/// Initialize a new instace of the ContextMenuForm in order to hold a control that
/// needes to have a ContextMenu behavior.
/// </summary>
public ContextMenuForm()
{
InitializeComponent();
}
/// <summary>
/// Shows the form on the specifies parent in the specifies location.
/// </summary>
/// <param name="parent"></param>
/// <param name="startLocation"></param>
/// <param name="width"></param>
public void Show(Control parent, Point startLocation, int width)
{
_parentControl = parent;
Point location = parent.PointToScreen(startLocation);
this.Location = location;
this.Width = width;
this.Show();
}
/// <summary>
/// Set the control that will populate the ContextMenuForm.
/// <remarks>
/// Any scrolling should be implemented in the control it self, the
/// ContextMenuForm will not support scrolling.
/// </remarks>
/// </summary>
后面还有 30 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。