//切割小屏 public void SmallScreenDivision(UInt16 bigScreenIndex, UInt16 x, UInt16 y) { if (x == 0 || y == 0) { return; } if (x == 1 && y == 1) { return; } BigScreen bigScreen = m_bigScreenDict[bigScreenIndex]; bigScreen.IsDivision = true; List <UInt16> list = m_stationIndexDict[bigScreenIndex]; list.Clear(); int smallScreenCount = x * y; for (UInt16 i = 0; i < smallScreenCount; ++i) { ScreenBindData data = new ScreenBindData(); bigScreen.AddSmallScreenBindData(i, data); list.Add(9999); //起到给List扩容的作用, 目前对大屏含小屏的情况,有x*y个元素 } }
//切割大屏 public void ScreenDivision(UInt16 x, UInt16 y) { if (x == 0 || y == 0) { return; } m_cctvScreen.XCount = x; m_cctvScreen.YCount = y; m_bigScreenDict.Clear(); m_stationIndexDict.Clear(); int bigScreenCount = x * y; List <UInt16> list = null; for (UInt16 i = 0; i < bigScreenCount; ++i) { BigScreen bigScreen = new BigScreen(); m_bigScreenDict.Add(i, bigScreen); list = new List <UInt16>(); list.Add(9999); //起到扩容的作用, 目前针对大屏只含有一个元素 m_stationIndexDict.Add(i, list); } }