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
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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