Beispiel #1
0
        private void placementChangedNoticeClicked(object sender, EventArgs e)
        {
            NotifyIcon   notifyIcon = sender as NotifyIcon;
            List <Offer> offers     = OfferHandler.LoadOffers();

            foreach (Offer offer in offers)
            {
                if (offer.name == notifyIcon.Tag.ToString())
                {
                    offer.closedPlacementChangedNotice = true;
                    OfferHandler.SaveOffers(offers);
                    notifyIcon.Visible = false;
                    // notifyIcon.Dispose(); // Don't dispose, because this might be reused.
                    tabControl.SelectTab(activeOffersTabPage);
                    ShowOrActivate();
                    break;
                }
            }
        }
Beispiel #2
0
        private void activeChangedNoticeClicked(object sender, EventArgs e)
        {
            NotifyIcon   notifyIcon = sender as NotifyIcon;
            List <Offer> offers     = OfferHandler.LoadOffers();

            foreach (Offer offer in offers)
            {
                if (offer.name == notifyIcon.Tag.ToString())
                {
                    offer.closedActiveChangedNotice = true;
                    OfferHandler.SaveOffers(offers);
                    notifyIcon.Visible = false;
                    notifyIcon.Dispose();
                    tabControl.SelectTab(inactiveOffersTabPage);
                    ShowOrActivate();
                    break;
                }
            }
        }