Exemplo n.º 1
0
 private void Clear()
 {
     if (ClearEvent != null)
     {
         ClearEvent.Invoke(this, EventArgs.Empty);
     }
 }
Exemplo n.º 2
0
 protected override void ClearItems()
 {
     if (ClearEvent != null)
     {
         if (!ClearEvent.Invoke())
         {
             return;
         }
     }
     base.ClearItems();
 }
    /// <summary>
    /// Nettoyage de la stack
    /// </summary>
    public new void Clear()
    {
        // Appelle Clear sur la classe mère
        base.Clear();

        // S'il existe un abonnement à cet évènement
        if (ClearEvent != null)
        {
            // Déclenchement de l'évènement nettoyage de la stack d'un emplacement
            ClearEvent.Invoke();
        }
    }
Exemplo n.º 4
0
        /// <summary>
        /// Top menu
        /// </summary>
        private void FileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!(sender is ToolStripMenuItem topMenuItem))
            {
                return;
            }

            switch (topMenuItem.Name)
            {
            case "newFile":
                if (fieldDraw != null)
                {
                    Field.Dispose();
                }

                FileOperations.NewFile(this, out fieldDraw);

                LockLeftMenu();
                fieldDraw.FormClosed += Ff_FormClosed;
                break;

            case "openFile":
                fieldDraw = FileOperations.OpenFile(this);
                if (fieldDraw == null)
                {
                    return;
                }

                LockLeftMenu();
                fieldDraw.FormClosed += Ff_FormClosed;
                break;

            case "saveFile":
                FileOperations.SaveFile(ref fieldDraw);
                break;

            case "clearField":
                ClearEvent?.Invoke();
                break;

            case "invertPic":
                InvertEvent?.Invoke();

                break;

            case "aboutAs":
                MessageBox.Show("The young programmer.\nWho wants to work for you.\nThank you for verified TZ.\n" +
                                "Aleksandr Hryhorenko 03.09.2018", "About Me )");
                break;
            }
        }
Exemplo n.º 5
0
 public void Clear()
 {
     if (_head < _tail)
     {
         Array.Clear(_array, _head, Count);
     }
     else
     {
         Array.Clear(_array, _head, _array.Length - _head);
         Array.Clear(_array, 0, _tail);
     }
     _head = 0;
     _tail = 0;
     Count = 0;
     _version++;
     ClearEvent?.Invoke(this, new MyQueueEventArgs <T>("Event from clear!"));
 }
Exemplo n.º 6
0
 public void Clear() => WaitExecute(() => ClearEvent?.Invoke());
Exemplo n.º 7
0
 public void OnClear(object sender, CollectionChangeEventArgs e)
 {
     ClearEvent?.Invoke(sender, e);
 }
Exemplo n.º 8
0
 public void InvokeClearEvent()
 {
     clearEvent.Invoke();
 }
Exemplo n.º 9
0
 protected virtual void OnClearEvent(EventArgs e) => ClearEvent?.Invoke(this, e);
Exemplo n.º 10
0
        /// <summary>
        /// Removes all items from the ObservableList.
        /// </summary>
        /// <returns>void</returns>
        public void Clear()
        {
            _items.Clear();

            ClearEvent?.Invoke();
        }
 public void RaiseClearEvent()
 {
     ClearEvent?.Invoke();
 }
Exemplo n.º 12
0
 public void Clear()
 {
     ClearEvent?.Invoke(this, null);
 }