示例#1
0
        protected override void HandleNotification(Notification notification, string displayName)
        {
            bool replace = false;
            if (!String.IsNullOrEmpty(notification.CoalescingGroup))
            {
                foreach (NotificationWindow nw in this.ActiveWindows)
                {
                    if (nw.CoalescingGroup == notification.CoalescingGroup)
                    {
                        ((MeterWindow)nw).Replace(notification);
                        replace = true;
                        break;
                    }
                }
            }

            if (!replace)
            {
                MeterWindow win = new MeterWindow();
                win.Tag = this;
                win.SetNotification(notification);
                win.SetDisplayLocation(GetLocationFromSetting());
                this.Show(win);
            }
        }
示例#2
0
        protected override LayoutManager GetLayoutManager(NotificationWindow nw)

        {
            MeterWindow win = (MeterWindow)nw;

            switch (win.DisplayLocation)

            {
            case Location.TopLeft:

                return(tllm);

            case Location.BottomLeft:

                return(bllm);

            case Location.TopRight:

                return(trlm);

            default:

                return(brlm);
            }
        }
示例#3
0
        protected override void HandleNotification(Notification notification, string displayName)
        {
            bool replace = false;

            if (!String.IsNullOrEmpty(notification.CoalescingGroup))
            {
                foreach (NotificationWindow nw in this.ActiveWindows)
                {
                    if (nw.CoalescingGroup == notification.CoalescingGroup)
                    {
                        ((MeterWindow)nw).Replace(notification);
                        replace = true;
                        break;
                    }
                }
            }

            if (!replace)
            {
                MeterWindow win = new MeterWindow();
                win.Tag = this;
                win.SetNotification(notification);
                win.SetDisplayLocation(GetLocationFromSetting());
                this.Show(win);
            }
        }