using System; using System.Windows.Forms; namespace DeviceRepairAndOptimization.Pages { public partial class FormBase : Form { public FormBase() { InitializeComponent(); this.Dock = DockStyle.Fill; this.TopLevel = false; //设置为非顶级窗体 × this.Resize += page_Resize; } public new void Show() { base.Show(); } public void Show(Control control) { base.Show(); } /// /// 窗体大小改变时事件 /// /// /// public virtual void page_Resize(object sender, EventArgs e) { } public bool IsCoordinateInRange(WordTabelPoints point, int RowIndex, int CellIndex) { if (RowIndex >= point.RowIndex && RowIndex < point.RowIndex + point.RowCount && CellIndex >= point.CellIndex && CellIndex <= point.CellIndex + 12) { return true; } return false; } } public class WordTabelPoints { public int CellIndex { get; set; } public int RowIndex { get; set; } public int RowCount { get; set; } public WordTabelPoints() { } public WordTabelPoints(int x, int y) { CellIndex = x; RowIndex = y; } } }