64 lines
1.5 KiB
C#
64 lines
1.5 KiB
C#
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();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 窗体大小改变时事件
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
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;
|
||
}
|
||
}
|
||
} |