Esempio n. 1
0
        public CustomImage UpdateImage(CustomImage customImage)
        {
            var width              = customImage.Image.Width;
            var height             = customImage.Image.Height;
            var category           = customImage.Category;
            var name               = customImage.Name;
            var newImageCollection = new List <CustomImage>();

            var popUp = new TimedPopUp();

            popUp.Set("Обновляю изображение...");
            popUp.Show(autoHide: false);

            Image image = imageProvider.SetDefaultSize(width, height).GetImageByCategory(category);

            popUp.HideForm();

            var newImage = new CustomImage
            {
                Name        = $"{name}",
                Category    = category,
                AllowUpdate = true,
                Image       = image
            };

            libManager.RemoveImageFromCollection(customImage);
            newImageCollection.Add(newImage);
            newImageCollection.Add(newImage);
            libManager.InitializeNewCollection(newImageCollection);
            return(newImage);
        }
Esempio n. 2
0
 public void UpdateStatusMessage(string updateMessage)
 {
     messageBar?.HideForm();
     messageBar?.Set(updateMessage, FormStartPosition.CenterScreen);
     messageBar?.Show(autoHide: false);
 }