实现了简单的监控视屏分屏浏览技术//////计算视频面板位置和面积/////////总面积和坐标///privateIListCalcPanelRectangle(intchannelCount,SizeTotalArea){IListresult=newList();//模数intmodulo;if(channelCount64)modulo=8;elsemodulo=(int)Math.Ceiling(Math.Sqrt(channelCount));//平方根intwidth,height;//单个画面大小width=(TotalArea.Width-modulo*1)/modulo;height=(TotalArea.Height-modulo*1)/modulo;for(inti=0;i<channelCount;i++){Rectanglerect=newRectangle();//AxDICOMax.AxDICOMXrect=newAxDICOMax.AxDICOMX();rect.Width=width;rect.Height=height;if(i%modulo==0){rect.X=1;if(i==0)rect.Y=1;elserect.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);}returnresult;}
1