Skip to content

Modern, animated, and customizable WinForms alerts/message boxes with async APIs, multi-language (en/tr), custom icons/sounds, progress bar, auto-close, and modern button styles (.NET Framework 4.8).

License

Notifications You must be signed in to change notification settings

SehilUN/ModernNotify

Repository files navigation

🔔 ModernNotify — Modern WinForms Alerts & MessageBox

NuGet Version NuGet Downloads .NET Framework 4.8 License MIT

Modern, animasyonlu ve özelleştirilebilir WinForms uyarıları ve onay pencereleri ✨


A modern, animated, and customizable alert/confirmation library for Windows Forms (.NET Framework 4.8). Create elegant alerts and questions with fade/slide/scale/rainbow/shake animations, custom icons, sounds, auto-close, progress bars, async APIs, and multi-language support (en/tr).

✨ Features

  • ✨ Modern, elegant UI
  • 🎞️ Multiple animations: Fade, Slide, Scale, Rainbow, Shake
  • 🌐 Multi-language: English (en), Turkish (tr)
  • 🖼️ Custom icons + 🔊 sound effects
  • 📊 ProgressBar support for auto-close
  • 🧵 Modal, async, and background modes
  • 🎛️ Customizable button styles (Default, Modern, Classic, Rounded, Gradient)
  • ⏱️ Auto-close, default button and auto-click for questions
  • 🧠 Automatic text defaults based on selected language

🧩 Requirements

  • .NET Framework 4.8
  • Windows Forms application

📦 Installation

NuGet Package Manager Console:

Install-Package ModernNotify

.NET CLI:

dotnet add package ModernNotify

⚡ Quick Start

// Modal info alert
DialogResult result = ModernAlert.Show(
    "Title",
    "Message",
    ModernAlert.AlertType.Info
);

// Async success alert
DialogResult res = await ModernAlert.ShowAsync(
    "Saved",
    "Your changes have been saved.",
    ModernAlert.AlertType.Success,
    autoCloseMilliseconds: 1500,
    animationType: AnimationType.Fade,
    progressBarStyle: ProgressBarStyle.Marquee
);

// Fire-and-forget background alert
ModernAlert.ShowBackground(
    "Working",
    "Processing in the background...",
    ModernAlert.AlertType.Info,
    autoCloseMilliseconds: 2000
);

🔔 ModernAlert Usage

// Customized alert
DialogResult result = ModernAlert.Show(
    "Custom",
    "This is a customizable alert",
    ModernAlert.AlertType.Info,
    autoCloseMilliseconds: 3000,
    playSound: true,
    customIcon: myIcon,
    animationType: AnimationType.Rainbow,
    progressBarStyle: ProgressBarStyle.Marquee
);

❓ ModernQuestion Usage

// Basic confirmation (modal)
DialogResult result = ModernQuestion.ShowQuestion(
    "Confirmation",
    "Are you sure you want to do this?",
    AnimationType.Fade,
    null,
    LanguageOption.en
);

// Async confirmation
DialogResult asyncResult = await ModernQuestion.ShowQuestionAsync(
    "Delete",
    "Permanently delete this item?",
    AnimationType.Rainbow,
    null,
    LanguageOption.en
);

// Default button with auto-click (modal)
DialogResult timed = ModernQuestion.ShowQuestion(
    "Confirm",
    "Proceed with the operation?",
    AnimationType.Fade,
    null,
    LanguageOption.en,
    ButtonStyle.Modern,
    DialogResult.Yes, // default button
    5 // auto-click after 5 seconds
);

// Customized question (async)
DialogResult q = await ModernQuestion.ShowQuestionAsync(
    "Question",
    "Choose wisely",
    AnimationType.Scale,
    customIcon: myIcon,
    language: LanguageOption.tr,
    buttonStyle: ButtonStyle.Rounded,
    defaultButton: DialogResult.No,
    autoClickDelay: 10
);

🎞️ Animation Types

  • Fade: Smooth fade transition ✨
  • Slide: Slide in/out 👉
  • Scale: Grow/Shrink 🔍
  • Rainbow: Arc movement with drop 🌈
  • Shake: Shake then fade 💥

🚦 Alert Types (ModernAlert.AlertType)

  • Info ℹ️: Information (Blue)
  • Success ✅: Success (Green)
  • Warning ⚠️: Warning (Yellow)
  • Error ❌: Error (Red)

🌐 Language Options

  • en 🇬🇧: English
  • tr 🇹🇷: Turkish

📊 ProgressBar Styles

  • Blocks: Blocked view
  • Continuous: Continuous view
  • Marquee: Scrolling bar view

🎛️ Button Styles

  • Default: Standard Windows style
  • Modern: Flat, accent colors
  • Classic: Classic Windows style
  • Rounded: Rounded corners
  • Gradient: Horizontal gradient fill

✅ Default Button (questions)

  • DialogResult.Yes: Yes selected by default
  • DialogResult.No: No selected by default
  • DialogResult.None: No default selected

ℹ️ Notes

  • When a default button is used, autoClickDelay must be greater than 0.
  • Default button can only be DialogResult.Yes or DialogResult.No.
  • Async APIs do not block the UI thread; animations run smoother.
  • Title and message fall back to language-specific defaults when null.
  • Button texts update automatically based on the selected language.

🛠️ Build From Source

  • Open ModernNotify.csproj in Visual Studio (or build with MSBuild) targeting .NET Framework 4.8.
  • Outputs ModernNotify.dll and XML docs under bin/Release.

📄 License

Licensed under the MIT License. See LICENSE for details.

About

Modern, animated, and customizable WinForms alerts/message boxes with async APIs, multi-language (en/tr), custom icons/sounds, progress bar, auto-close, and modern button styles (.NET Framework 4.8).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages