Example #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (FolderSelectDialog fsd = new FolderSelectDialog())
     {
         if (fsd.ShowDialog())
         {
             StickerPackInfo stickerPackInfo = new StickerPackInfo(fsd.FileName);
             Stickers.Add(stickerPackInfo);
             cbStickers.Items.Add(stickerPackInfo);
             cbStickers.SelectedIndex = cbStickers.Items.Count - 1;
         }
     }
 }
Example #2
0
        private void LoadImageFiles()
        {
            imageFiles = null;
            ilvStickers.Items.Clear();

            StickerPackInfo stickerPack = tscbStickers.SelectedItem as StickerPackInfo;

            if (stickerPack != null && !string.IsNullOrEmpty(stickerPack.FolderPath))
            {
                string folderPath = Helpers.GetAbsolutePath(stickerPack.FolderPath);

                if (Directory.Exists(folderPath))
                {
                    imageFiles = Directory.GetFiles(folderPath).Where(x => Helpers.IsImageFile(x)).ToArray();

                    UpdateImageFiles();
                }
            }
        }