예제 #1
0
 private void ClearSlot(NotifyWidget n)
 {
     var index = slots.IndexOf(n);
     if (index != -1)
     {
         parentForm.Controls.Remove(n);
         slots[index] = null;
     }
 }
예제 #2
0
        private void ClearSlot(NotifyWidget n)
        {
            var index = slots.IndexOf(n);

            if (index != -1)
            {
                parentForm.Controls.Remove(n);
                slots[index] = null;
            }
        }
예제 #3
0
        private void Show(NotifyWidget n)
        {
            if (appConfigManager.Config.DisableSaveNotifications)
            {
                return;
            }

            int slot = FillNextSlot(n);

            n.Location = GetPosition(n, slot);
            n.BringToFront();
            n.HideNotify += (sender, args) => ClearSlot(n);
            n.ShowNotify();
        }
예제 #4
0
 private int FillNextSlot(NotifyWidget n)
 {
     var index = slots.IndexOf(null);
     if (index == -1)
     {
         index = slots.Count;
         slots.Add(n);
     }
     else
     {
         slots[index] = n;
     }
     parentForm.Controls.Add(n);
     return index;
 }
예제 #5
0
        private int FillNextSlot(NotifyWidget n)
        {
            var index = slots.IndexOf(null);

            if (index == -1)
            {
                index = slots.Count;
                slots.Add(n);
            }
            else
            {
                slots[index] = n;
            }
            parentForm.Controls.Add(n);
            return(index);
        }
예제 #6
0
 private Point GetPosition(NotifyWidget n, int slot)
 {
     return(new Point(parentForm.ClientSize.Width - n.Width - PADDING_X,
                      parentForm.ClientSize.Height - n.Height - PADDING_Y - (n.Height + SPACING_Y) * slot));
 }
예제 #7
0
        private void Show(NotifyWidget n)
        {
            if (appConfigManager.Config.DisableSaveNotifications)
            {
                return;
            }

            int slot = FillNextSlot(n);
            n.Location = GetPosition(n, slot);
            n.BringToFront();
            n.HideNotify += (sender, args) => ClearSlot(n);
            n.ShowNotify();
        }
예제 #8
0
 private Point GetPosition(NotifyWidget n, int slot)
 {
     return new Point(parentForm.ClientSize.Width - n.Width - PADDING_X,
         parentForm.ClientSize.Height - n.Height - PADDING_Y - (n.Height + SPACING_Y) * slot);
 }