/// <summary> /// Add an item built from text to the item list /// </summary> /// <param name="p_sText">New item text</param> /// <param name="p_pLocation">Initial position of the new item</param> /// <param name="p_dDirection">Direction of the new item</param> /// <param name="p_sSpeed">Speed of the new item</param> /// <returns>Item Id</returns> public int AddTextItem(string p_sText, Point p_pLocation, ItemDirection p_dDirection, ItemSpeed p_sSpeed) { // Updates Id counting m_iItemIdCount++; // New item LedMatrixItem lmiMyNewItem = new LedMatrixItem(m_iItemIdCount, GetLedOnFromString(p_sText), p_pLocation, p_dDirection, p_sSpeed); // Add the item to the list m_lItemList.Add(lmiMyNewItem); // Return item Id return(m_iItemIdCount); }
/// <summary> /// Add an item to the item list /// </summary> /// <param name="p_bMasterLedOn">Led On definition of the new item</param> /// <param name="p_pLocation">Initial position of the new item</param> /// <param name="p_dDirection">Direction of the new item</param> /// <param name="p_sSpeed">Speed of the new item</param> /// <returns>Item Id</returns> public int AddItem(bool[,] p_bMasterLedOn, Point p_pLocation, ItemDirection p_dDirection, ItemSpeed p_sSpeed) { // Updates Id counting m_iItemIdCount++; // New item LedMatrixItem lmiMyNewItem = new LedMatrixItem(m_iItemIdCount, p_bMasterLedOn, p_pLocation, p_dDirection, p_sSpeed); // Add the item to the list m_lItemList.Add(lmiMyNewItem); // Return item Id return(m_iItemIdCount); }