C# Класс Bloom.MiscUI.ToastNotifier

Like a notification ballon, but more reliable "toast" because it slowly goes up, then down. Subscribe to the Click event to know if the user clicked on it. Note: currently clicking on the image or text invoke the click event, not just the action link. Note: don't use a lot of these. They hang around off-screen. (See comment in GoDownTimerTick.) It's primarily intended for something like "updates are available" that happens once per run of the program. Usage: var notifier = new ToastNotifier(); notifier.Image.Image = {some small Image, about 32x32}; notifier.ToastClicked += (sender, args) => {do something}; notifier.Show("You should know this", "Something you might do about it", {some # of seconds}); You should NOT dispose of the notifier, since we haven't found a safe time to even close it.
Наследование: System.Windows.Forms.Form
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Image System.Windows.Forms.PictureBox
WarningBitmap Image

Открытые методы

Метод Описание
Show ( string message, string callToAction, int seconds ) : void

Show the toast

ToastNotifier ( ) : System

constructor

UpdateMessage ( string newMessage ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnLoad ( EventArgs e ) : void

Приватные методы

Метод Описание
CloseThisLater ( object sender, EventArgs e ) : void
GoDownTimerTick ( object sender, EventArgs e ) : void
GoUpTimerTick ( object sender, EventArgs e ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

PauseTimerTick ( object sender, EventArgs e ) : void
ToastNotifier_Click ( object sender, EventArgs e ) : void
callToAction_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void

Описание методов

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

OnLoad() защищенный Метод

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
Результат void

Show() публичный Метод

Show the toast
public Show ( string message, string callToAction, int seconds ) : void
message string
callToAction string Text of the hyperlink
seconds int How long to show before it goes back down
Результат void

ToastNotifier() публичный Метод

constructor
public ToastNotifier ( ) : System
Результат System

UpdateMessage() публичный Метод

public UpdateMessage ( string newMessage ) : void
newMessage string
Результат void

Описание свойств

Image публичное свойство

Image of your app
public System.Windows.Forms.PictureBox Image
Результат System.Windows.Forms.PictureBox

WarningBitmap публичное статическое свойство

public static Image WarningBitmap
Результат Image