public ST_PIN_POS GetPosition() { ST_PIN_POS PinPos = new ST_PIN_POS(0); PinPos.dXPos = m_dXPos; PinPos.dYPos = m_dYPos; return(PinPos); }
//--------------------------------------------------------------------------- public void fn_UpdateMap(ref Label[,] label, bool withpos = false, bool showkind = false) { // if (label == null) { return; } if (m_nMaxRow > MAX_STORAGE_R) { return; } if (m_nMaxCol > MAX_STORAGE_C) { return; } int iMaxX = m_nMaxCol; int iMaxY = m_nMaxRow; int iMinX = 0; int iMinY = 0; ST_PIN_POS pos = new ST_PIN_POS(0); string sContent = string.Empty; //Label Name, Color Setting for (int r = iMinY; r < iMaxY; r++) { for (int c = iMinX; c < iMaxX; c++) { label[r, c].Background = PINS[r, c].GetPinColor_B(m_nType); sContent = string.Format($"{r * iMaxX + c + 1}"); if (withpos) { pos = PINS[r, c].GetPosition(); sContent = sContent + string.Format($"\n {pos.dXPos:F4},{pos.dYPos:F4}"); label[r, c].ToolTip = sContent; } if (showkind && PINS[r, c].IsExist()) { //sContent = sContent + string.Format($"\n [{PINS[r, c].GetPinKind()}]"); int ntype = PINS[r, c].GetPinKind(); if (ntype >= 0) { sContent = sContent + string.Format($"\n [{FM.m_stSystemOpt.sToolType[ntype]}]"); } else { sContent = sContent + string.Format("\n [-1]"); } } label[r, c].Content = sContent; } } }
//--------------------------------------------------------------------------- //Get Pin Position Data public ST_PIN_POS GetPinPos(int r, int c) { ST_PIN_POS Pos = new ST_PIN_POS(-1); if (r < 0 || r > MAX_STORAGE_R) { return(Pos); } if (c < 0 || c > MAX_STORAGE_C) { return(Pos); } Pos = PINS[r, c].GetPosition(); return(Pos); }
public void SetPosition(ST_PIN_POS Pos) { m_dXPos = Pos.dXPos; m_dYPos = Pos.dYPos; }