su_modernAlert 1.1.3
⚠️ DEPRECATED: This package has been replaced by ModernNotify.
Please migrate to ModernNotify package which is the new version of this package. All features are preserved and future updates will be available in ModernNotify.
Migration steps:
1. Uninstall this package: Uninstall-Package su_ModernAlert
2. Install the new package: Install-Package ModernNotify
3. Update your using statements from 'using su_ModernAlert;' to 'using ModernNotify;'
For detailed migration guide and documentation, visit: [NuGet package page of ModernNotify]
Note: This package will no longer receive updates or bug fixes. All future development will continue in ModernNotify.
dotnet add package su_modernAlert --version 1.1.3
NuGet\Install-Package su_modernAlert -Version 1.1.3
<PackageReference Include="su_modernAlert" Version="1.1.3" />
<PackageVersion Include="su_modernAlert" Version="1.1.3" />
<PackageReference Include="su_modernAlert" />
paket add su_modernAlert --version 1.1.3
#r "nuget: su_modernAlert, 1.1.3"
#:package su_modernAlert@1.1.3
#addin nuget:?package=su_modernAlert&version=1.1.3
#tool nuget:?package=su_modernAlert&version=1.1.3
Winform Modern MessageBox
A modern and customizable alert windows library for Windows Forms. It allows you to create animated, customizable, and easy-to-use alert windows.
Features
- Modern and elegant design
- Multiple animation options (Fade, Slide, Scale, Rainbow, Shake)
- Multi-language support (Turkish, English)
- Customizable icons
- Sound effects
- ProgressBar support
- Async and background working modes
- Customizable button styles
- Auto-close feature
- Default button selection and auto-click feature
- Automatic text translation with dynamic language support (tr-en)
Installation
From NuGet Package Manager Console:
Install-Package su_modernalert
or .NET CLI:
dotnet add package su_modernalert
Usage
ModernAlert Usage
// Modal usage (waits until alert closes)
DialogResult result = ModernAlert.Show(
"Title",
"Message",
AlertType.Info
);
// Async usage
async Task DoSomething()
{
DialogResult result = await ModernAlert.ShowAsync(
"Title",
"Message",
AlertType.Success
);
}
// Background alert
ModernAlert.ShowBackground(
"Information",
"Operation completed",
AlertType.Success,
autoCloseMilliseconds: 2000
);
// Customized alert
DialogResult result = ModernAlert.Show(
"Title",
"Message",
AlertType.Info,
autoCloseMilliseconds: 3000,
playSound: true,
customIcon: myIcon,
animationType: AnimationType.Rainbow,
progressBarStyle: ProgressBarStyle.Marquee
);
ModernQuestion Usage
// Basic usage
DialogResult result = ModernQuestion.ShowQuestion(
"Confirmation",
"Are you sure you want to do this?",
AnimationType.Fade,
null,
LanguageOption.en
);
// Async usage
async Task DoSomething()
{
DialogResult result = await ModernQuestion.ShowQuestionAsync(
"Confirmation",
"Are you sure you want to do this?",
AnimationType.Rainbow,
null,
LanguageOption.en
);
}
// Usage with default button and auto-click feature
DialogResult result = ModernQuestion.ShowQuestion(
"Confirmation",
"Are you sure you want to do this?",
AnimationType.Fade,
null,
LanguageOption.en,
ButtonStyle.Modern,
DialogResult.Yes, // Yes button selected as default
5 // Will auto-click after 5 seconds
);
// Async usage with default button and auto-click feature
async Task DoSomething()
{
DialogResult result = await ModernQuestion.ShowQuestionAsync(
"Confirmation",
"Are you sure you want to do this?",
AnimationType.Fade,
null,
LanguageOption.en,
ButtonStyle.Modern,
DialogResult.No, // No button selected as default
10 // Will auto-click after 10 seconds
);
}
// Customized question
DialogResult result = ModernQuestion.ShowQuestion(
"Confirmation",
"Are you sure you want to do this?",
AnimationType.Rainbow,
customIcon: myIcon,
language: LanguageOption.en,
buttonStyle: ButtonStyle.Modern,
defaultButton: DialogResult.Yes,
autoClickDelay: 5
);
Animation Types
Fade: Smooth fade transition effectSlide: Sliding animationScale: Scaling animationRainbow: Arc movement and drop effectShake: Shake animation
Alert Types
Info: Information message (Blue)Success: Success message (Green)Warning: Warning message (Yellow)Error: Error message (Red)
Language Options
en: Englishtr: Turkish
ProgressBar Styles
Blocks: Blocked viewContinuous: Continuous viewMarquee: Scrolling bar view
Button Styles
Default: Default styleModern: Modern, flat designClassic: Classic Windows styleRounded: Rounded corner button styleGradient: Gradient (color transition) button style
Default Button Properties
DialogResult.Yes: Yes button is selected by defaultDialogResult.No: No button is selected by defaultDialogResult.None: No default button is selected
Important Notes
- When a default button is selected, the auto-click delay (autoClickDelay) must be greater than 0
- Default button can only take DialogResult.Yes or DialogResult.No values
- In async usage, UI thread is not blocked and animations work more smoothly
- Title and message texts are automatically translated according to the language option
- Button texts are automatically updated according to the selected language
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- System.Windows.Forms (>= 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
İyileştirmeler:
- Scale animasyonu ile açılan formlarda uzun metinlerin görünürlük sorunu giderildi
- Form boyutlandırması mesaj metninin tamamının görüneceği şekilde optimize edildi