C#分屏技术,可以实现监控分屏
实现了简单的监控视屏分屏浏览技术 ///
/// 计算视频面板位置和面积 ///
///
///
总面积和坐标 ///
private IList
CalcPanelRectangle(int channelCount, Size TotalArea) { IList
result = new List
(); //模数 int modulo; if (channelCount 64) m odulo = 8; else modulo = (int)Math.Ceiling(Math.Sqrt(channelCount)); //平方根 int width, height; //单个画面大小 width = (TotalArea.Width - modulo * 1) / modulo; height = (TotalArea.Height - modulo * 1) / modulo; for (int i = 0; i < channelCount; i++) { Rectangle rect = new Rectangle(); //AxDICOMax.AxDICOMX rect = new AxDICOMax.AxDICOMX(); rect.Width = width; rect.Height = height; if (i % modulo == 0) { rect.X = 1; if (i == 0) rect.Y = 1; else rect.Y = result[i - modulo].Y + height + 1; } else { rect.X = result[i - 1].X + width + 1; rect.Y = result[i - 1].Y; } result.Add(rect); } return result; }
文件列表
FenPing2010-5-25.rar
(预估有个22文件)
FenPing
FenPing
Form1.cs
2KB
bin
Debug
FenPing.pdb
24KB
FenPing.vshost.exe.manifest
490B
FenPing.exe
9KB
FenPing.vshost.exe
14KB
obj
用户评论