//------------------------------------------ private void ChkCellData() { if (m_CellData == null) { m_CellData = new TS_CellData(); } }
//---------------------------------------------- public bool MoveRight(TS_CellData cd) { bool ret = false; if (m_LayerIndex < cd.LayerCount - 1) { ret = true; m_LayerIndex++; OnChangeSelectionEvent(new EventArgs()); } return(ret); }
//---------------------------------------------- public bool MoveLeft(TS_CellData cd) { bool ret = false; if (m_LayerIndex > 0) { ret = true; m_LayerIndex--; OnChangeSelectionEvent(new EventArgs()); } return(ret); }
//--------------------------------------- public void SetSize(Size sz, TS_CellData cd) { m_DispSize = sz; m_FrameCount = cd.FrameCount; m_LayerCount = cd.LayerCount; int ax = m_CellWidth * m_LayerCount - m_DispSize.Width; int ay = m_CellHeight * m_FrameCount - m_DispSize.Height; if (ax < 0) { ax = 0; } if (ay < 0) { ay = 0; } bool b = ((m_DispMax.X != ax) || (m_DispMax.Y != ay)); m_DispMax.X = ax; m_DispMax.Y = ay; bool b2 = false; if (m_Disp.X > m_DispMax.X) { m_Disp.X = m_DispMax.X; b2 = true; } if (m_Disp.Y > m_DispMax.Y) { m_Disp.Y = m_DispMax.Y; b2 = true; } ChkDisp(); if (b == true) { OnChangeDispMax(new EventArgs()); } if (b2 == true) { OnChangeDisp(new EventArgs()); } }
//------------------------------------------ private void ChkGrid() { if (m_grid == null) { m_CellData = null; m_GridSize = null; m_GridColor = null; } else { m_CellData = m_grid.CellData; m_GridSize = m_grid.GridSize; m_GridColor = m_grid.GridColor; } ChkGridSize(); ChkGridColor(); }
//---------------------------------------------- public bool MoveDown(TS_CellData cd) { bool ret = false; int st = m_StartIndex; int lt = m_StartIndex + m_Length; st += m_Length; lt += m_Length; if (st < cd.FrameCount - 1) { ret = true; m_StartIndex = st; m_LastIndex = m_StartIndex + m_Length; OnChangeSelectionEvent(new EventArgs()); } return(ret); }
//---------------------------------------------- public bool MoveUp(TS_CellData cd) { bool ret = false; int st = m_StartIndex; int lt = m_StartIndex + m_Length; st -= m_Length; lt -= m_Length; if (lt > 0) { ret = true; m_StartIndex = st; m_LastIndex = m_StartIndex + m_Length; OnChangeSelectionEvent(new EventArgs()); } return(ret); }
//-------------------------------------------- private void ChkGrid() { if (m_grid == null) { m_CellData = null; m_GridSize = null; m_GridColor = null; m_Selection = null; UseParm = false; } else { m_CellData = m_grid.CellData; m_GridSize = m_grid.GridSize; m_GridColor = m_grid.GridColor; m_Selection = m_grid.Selection; UseParm = true; } ChkCellData(); ChkSelection(); ChkGridColor(); ChkGridSize(); }