public Boolean AddState(State tState) { if ((!this.Available) || (!m_DynamicMode && IsActive)) { return(false); } else if (null == tState) { return(false); } else if (!tState.Available) { return(false); } lock (m_Locker) { if (null != m_ActiveFSMSet.Find(tState.ID)) { return(true); } if (null != m_ActiveStateSet.Find(tState.ID)) { return(true); } m_FreeStateSet.Add(tState); } RefreshState(); return(true); }
private void lvMemory_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) { do { if (null == this.Image) { break; } UInt32 tStartAddress = (UInt32)e.ItemIndex * this.LineSize; ListViewCacheLine tCacheLineItem = m_ListViewCache.Find(tStartAddress.ToString("X8")); if (null == tCacheLineItem) { //! a cache miss Byte[] tBuffer = new Byte[this.LineSize]; this.Image.Read(tStartAddress, tBuffer); ListViewItem tItem = new ListViewItem(tStartAddress.ToString("X8")); tItem.SubItems.Add(HEX.HEXBuilder.ByteArrayToHEXString(tBuffer)); tItem.SubItems.Add(BuildDisplayString(tBuffer)); tCacheLineItem = new ListViewCacheLine(tStartAddress, tItem); m_ListViewCache.Add(tCacheLineItem); } e.Item = tCacheLineItem.Tag; } while (false); }
public Boolean RemoveState(SafeID tID) { if ((!this.Available) || ((!m_DynamicMode && IsActive))) { return(false); } lock (m_Locker) { State tTarget = m_FreeStateSet.Find(tID); if (null == tTarget) { return(false); } m_FreeStateSet.Remove(tID); } RefreshState(); return(true); }
public static Namespace Find(String tID) { return(s_NameSpaceSet.Find(tID)); }
public TType Find(SafeID tID) { return(m_ComponentSet.Find(tID)); }