DeviceManager/DeviceRepairAndOptimization/Pages/FormBase.cs
2024-05-28 22:36:38 +08:00

64 lines
1.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}