public void AddToFavorites(Image image, string defaultName)
		{
			using (var form = new FormAddFavoriteImage(image, defaultName, _manager.Images.Select(i => i.Name.ToLower())))
			{
				form.Text = "Add Image to Favorites";
				form.laTitle.Text = "Save this Image in your Favorites folder for future presentations";
				if (form.ShowDialog() != DialogResult.OK) return;
				_manager.SaveImage(image, form.ImageName);
			}
		}
Exemplo n.º 2
0
 public void AddToFavorites(Image image, string defaultName)
 {
     using (var form = new FormAddFavoriteImage(image, defaultName, _manager.Images.Select(i => i.Name.ToLower())))
     {
         form.Text = "Add Image to Favorites";
         form.simpleLabelItemTitle.Text = "Save this Image in your Favorites folder for future<br>presentations";
         if (form.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         _manager.SaveImage(image, form.ImageName);
     }
 }
Exemplo n.º 3
0
        private void OnMenuItemRenameClick(object sender, EventArgs e)
        {
            if (!(imageListView.Items[_menuHitInfo.ItemIndex].Tag is ImageSource imageSource))
            {
                return;
            }
            var image = imageSource.BigImage.Clone() as Image;

            using (var form = new FormAddFavoriteImage(image, null, _manager.Images.Select(i => i.Name.ToLower())))
            {
                form.Text = "Rename Favorite Image";
                form.simpleLabelItemTitle.Text = "Set new name for your Favorite Image";
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                _manager.DeleteImage(imageSource);
                _manager.SaveImage(image, form.ImageName);
            }
            _menuHitInfo = null;
        }
Exemplo n.º 4
0
		private void toolStripMenuItemFavorites_Click(object sender, EventArgs e)
		{
			var imageSource = imageListView.Items[_menuHitInfo.ItemIndex].Tag as ImageSource;
			if (imageSource == null) return;
			var imageName = imageSource.Name;
			using (var form = new FormAddFavoriteImage(imageSource.BigImage, imageName, FavoriteImagesManager.Instance.Images.Select(i => i.Name.ToLower())))
			{
				form.Text = "Add Image to Favorites";
				form.laTitle.Text = "Save this Image in your Favorites folder for future presentations";
				if (form.ShowDialog() != DialogResult.OK) return;
				imageName = form.ImageName;
			}
			FavoriteImagesManager.Instance.SaveImage(imageSource.BigImage, imageName);
			PopupMessageHelper.Instance.ShowInformation("Image successfully added to Favorites");
			_menuHitInfo = null;
		}
		private void toolStripMenuItemRename_Click(object sender, EventArgs e)
		{
			var imageSource = imageListView.Items[_menuHitInfo.ItemIndex].Tag as ImageSource;
			if (imageSource == null) return;
			var image = imageSource.BigImage.Clone() as Image;
			using (var form = new FormAddFavoriteImage(image, null, _manager.Images.Select(i => i.Name.ToLower())))
			{
				form.Text = "Rename Favorite Image";
				form.laTitle.Text = "Set new name for your Favorite Image";
				if (form.ShowDialog() != DialogResult.OK) return;
				_manager.DeleteImage(imageSource);
				_manager.SaveImage(image, form.ImageName);
			}
			_menuHitInfo = null;
		}
Exemplo n.º 6
0
		private void AddToFavorites(Image image, string defaultName)
		{
			var imageName = defaultName;
			using (var form = new FormAddFavoriteImage(image, defaultName, FavoriteImagesManager.Instance.Images.Select(i => i.Name.ToLower())))
			{
				form.Text = "Add Image to Favorites";
				form.laTitle.Text = "Save this Image in your Favorites folder for future presentations";
				if (form.ShowDialog() != DialogResult.OK) return;
				imageName = form.ImageName;
			}
			FavoriteImagesManager.Instance.SaveImage(image, imageName);
			PopupMessageHelper.Instance.ShowInformation("Image successfully added to Favorites");
		}