private void PopFrom(Layer RenderGroup) { if (!IsShowed) { throw new Exception("This object is not showed yet"); } if (Removing != null) { new Thread(() => { Removing.Invoke(this, null); RenderGroup.RenderGroup.Remove(this); IsShowed = false; Removed?.Invoke(this, null); }) { IsBackground = true }.Start(); return; } RenderGroup.RenderGroup.Remove(this); IsShowed = false; Removed?.Invoke(this, null); _father = null; }
public bool Remove(TKey key) { if (!ContainsKey(key)) { return(false); } Removing.Execute(key, this[key]); bool result = m_data.Remove(key); Modified.Execute(); return(result); }
public bool Remove(T item) { if (m_base.Contains(item)) { Removing.Execute(item); bool result = m_base.Remove(item); Modified.Execute(); return(result); } else { return(false); } }
public T this[int index] { get { return(m_base[index]); } set { Removing.Execute(m_base[index]); Inserting.Execute(value); m_base[index] = value; Inserted.Execute(value); Modified.Execute(); } }
public TValue this[TKey key] { get { return(m_data[key]); } set { if (ContainsKey(key)) { Removing.Execute(key, this[key]); m_data.Remove(key); } Inserting.Execute(key, value); m_data[key] = value; Modified.Execute(); } }
/// <summary> /// Event Handler for the Removing event /// </summary> /// <param name="e">The ListChangedEventArgs</param> protected void OnRemoving(ListChangedEventArgs e) { Removing?.Invoke(this, e); }
public Administrator() { addBehaviour = new Adding(); editBehaviour = new Editing(); removeBehaviour = new Removing(); }
/* ----------------------------------------------------------------- */ /// /// OnRemoving /// /// <summary> /// Removing イベントを発生させます。 /// </summary> /// /* ----------------------------------------------------------------- */ protected virtual void OnRemoving(ValueCancelEventArgs <int[]> e) => Removing?.Invoke(this, e);
/// <summary> /// Raises the Removing event. /// </summary> /// <param name="e">A TypedCollectionEventArgs instance containing event data.</param> protected virtual void OnRemoving(TypedCollectionEventArgs <T> e) { Removing?.Invoke(this, e); }
private void OnRemoving(T item) { // Note: This event cannot be blocked! Removing?.Invoke(item); }
public void Subscribe(Adding addMethod, Removing removeMethod) { AddEntityEvent += addMethod; RemoveEntityEvent += removeMethod; }
protected virtual void OnRemoving(EventArgs ea) => Removing?.Invoke(this, ea);
private void buttonRemoveCondition_Click(object sender, EventArgs e) { Removing?.Invoke(sender, this); }
private bool _RemoveCache(string name, bool immediately = false, bool force = false) { if (name == null || name == "") { return(false); } if (Config.Detail_Debug_Log()) { Debug.LogWarning("begin remove cache->" + name + "^" + immediately + "^" + force); } Request request; if (cache.TryGetValue(name, out request)) { try { if (!force) { request.referenceNum--; if (Config.Detail_Debug_Log()) { Debug.LogWarning("remove cache reference num->" + request.referenceNum); } if (request.referenceNum <= 0) { if (!immediately) { Removing rm = new Removing(); rm.request = request; rm.name = name; needUnLoad.Add(rm); } else { UnloadRequest(name, request); } } } else { if (!immediately && (request.asset == null && request.raf == null)) { return(false); } UnloadRequest(name, request); } } catch (System.Exception e) { //#if UNITY_EDITOR Debugger.LogError("remove load cache failed->" + e.ToString()); //#endif } return(true); } else { return(false); } }
/// <summary> /// Ensures this <see cref="Component"/> will be removed by the engine after Update returns. /// </summary> protected virtual void OnRemove() { IsRemoved = true; Removing?.Invoke(this); }
private void RaiseRemoving() { Removing?.Invoke(this, EventArgs.Empty); }
protected void FireRemoving(T item) => Removing?.Invoke(item);
/// <summary> /// Raises the Removing event. /// </summary> /// <param name="e">A NavButtonSpecEventArgs instance containing event data.</param> protected void OnRemoving(ButtonSpecEventArgs e) { e.ButtonSpec.Owner = null; Removing?.Invoke(this, e); }
public void RemoveAt(int index) { Removing.Execute(this[index]); m_base.RemoveAt(index); Modified.Execute(); }