public AnnouncementDialog(AnnouncementItem item)
        {
            InitializeComponent();

            try
            {
                this.item = item;
                int titleHeight = RectangleToScreen(ClientRectangle).Top - Top;

                var image = item.Image;
                Height = image.Height + pnlFooter.Height + titleHeight;
                Width  = image.Width;

                pbImage.Image    = image;
                pbImage.SizeMode = PictureBoxSizeMode.StretchImage;

                if (AnnouncementSettings.Instance.LastShown.Contains(item.Id))
                {
                    AnnouncementSettings.Instance.LastShown.Remove(item.Id);
                }

                AnnouncementSettings.Instance.LastShown.Add(item.Id);
            }
            catch
            {
                IsInvalid = true;
            }
        }
        public static void Display(AnnouncementItem item)
        {
            if (item == null)
            {
                return;
            }

            var dialog = new AnnouncementDialog(item);

            if (!dialog.IsInvalid)
            {
                dialog.Show();
            }
        }