private void generateStickers() { progressBar.Value = MIN_PROGRESS; if (saveToPath == null || saveToPath.Equals("")) { MyDialog.info("Please choose folder to save file"); return; } try { List <StickerData> stickerData = getStickerData(); if (stickerData.Count == 0) { MyDialog.info("Sticker Data Cannot be NULL"); return; } Generator Generator = new Generator(institution, saveToPath, progressBar); progressBar.Value = 10; Generator.generateSticker(stickerData); } catch (Exception e) { } finally { } progressBar.Value = MAX_PROGRESS; progressBar.Hide(); }