Beispiel #1
0
        protected void OnAdd(object obj, NotifierEventArgs e)
        {
            if (!string.IsNullOrEmpty(e.DisplayRecord.character) && e.DisplayRecord.character.Equals("engage") && CanShow(e.DisplayRecord))
            {
                if (mostRecentQueue.Count >= 10)
                {
                    VmosoTileDisplayRecord recentDisplayRecord;
                    mostRecentQueue.TryDequeue(out recentDisplayRecord);
                }

                mostRecentQueue.Enqueue(e.DisplayRecord);
            }

            if (currentNotifier == null)
            {
                VmosoNotifierTile ui = new VmosoNotifierTile(top, e.DisplayRecord, expectedSize, Session);
                currentNotifier    = ui;
                ui.OnShownStatus  += new EventHandler(OnShownHandler);
                ui.OnHiddenStatus += new EventHandler(OnHiddenStatus);
                VmosoTileDisplayRecord immediateDisplayRecord;
                notifierQueue.TryDequeue(out immediateDisplayRecord);
                notifierCounter++;
                ui.ShowMessage();
            }
        }
Beispiel #2
0
 protected void OnDisappearingHandler(object obj, EventArgs e)
 {
     if (notifierQueue.Count > 0)
     {
         top.Y -= realBarHeight;
         VmosoTileDisplayRecord displayRecord;
         notifierQueue.TryDequeue(out displayRecord);
         VmosoNotifierTile ui = new VmosoNotifierTile(top, displayRecord, expectedSize, Session);
         currentNotifier          = ui;
         ui.OnShownStatus        += new EventHandler(OnShownHandler);
         ui.OnHiddenStatus       += new EventHandler(OnHiddenStatus);
         ui.OnDisappearingStatus += new EventHandler(OnDisappearingHandler);
         notifierCounter++;
         ui.ShowMessage();
     }
 }
Beispiel #3
0
 protected void OnHiddenStatus(object obj, EventArgs e)
 {
     if (notifierQueue.Count > 0)
     {
         top.Y -= realBarHeight;
         VmosoTileDisplayRecord displayRecord;
         notifierQueue.TryDequeue(out displayRecord);
         VmosoNotifierTile ui = new VmosoNotifierTile(top, displayRecord, expectedSize, Session);
         currentNotifier    = ui;
         ui.OnShownStatus  += new EventHandler(OnShownHandler);
         ui.OnHiddenStatus += new EventHandler(OnHiddenStatus);
         notifierCounter++;
         ui.ShowMessage();
     }
     notifierCounter--;
     if (notifierQueue.Count == 0 && IsLastNotifier())
     {
         top.Y           = workingArea.Y + workingArea.Height;
         currentNotifier = null;
     }
 }