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;
        }
 /// <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);
 }
 /// <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);
 }
Esempio n. 4
0
 private void RaiseRemoving()
 {
     Removing?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 5
0
 /// <summary>
 /// Event Handler for the Removing event
 /// </summary>
 /// <param name="e">The ListChangedEventArgs</param>
 protected void OnRemoving(ListChangedEventArgs e)
 {
     Removing?.Invoke(this, e);
 }
Esempio n. 6
0
 /* ----------------------------------------------------------------- */
 ///
 /// OnRemoving
 ///
 /// <summary>
 /// Removing イベントを発生させます。
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 protected virtual void OnRemoving(ValueCancelEventArgs <int[]> e)
 => Removing?.Invoke(this, e);
Esempio n. 7
0
 protected void FireRemoving(T item) => Removing?.Invoke(item);
Esempio n. 8
0
 /// <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);
 }
Esempio n. 9
0
 private void OnRemoving(T item)
 {
     // Note: This event cannot be blocked!
     Removing?.Invoke(item);
 }
Esempio n. 10
0
 protected virtual void OnRemoving(EventArgs ea) => Removing?.Invoke(this, ea);
 private void buttonRemoveCondition_Click(object sender, EventArgs e)
 {
     Removing?.Invoke(sender, this);
 }