PDA

View Full Version : Desktop notification


JokerMartini
04-12-2012, 10:20 PM
I've been on search for quite some time on this topic. I'm not sure where else to look or go so here is my next stop.

I'd like to create a desktop notification similar to skype or aim but it sends a notification when a render is complete.

Is this something easy to do or create using c#? I really have no clue on how this would be done and I'd love to learn how to do create this. I'm not expecting someone to come right out with a solution or answer from day one, but for someone to help me along figure this out.

Even if its as simple as just make a notification tool that you just ran as a test and it showed a simple message for testing purposes. Something simple like the posted image.

http://forums.cgsociety.org/attachment.php?attachmentid=167317&stc=1

lo
04-13-2012, 11:16 AM
To show a notification you must show a system tray notification icon.

You can start from this code:

fn closeIcon s e = s.dispose()

a = dotnetobject "notifyicon"
a.visible = true
a.icon = (dotnetclass "system.drawing.systemIcons").information
dotnet.addEventHandler a "BalloonTipClosed" closeIcon
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info

jonadb
04-13-2012, 11:59 AM
You can also checkout http://www.prowlapp.com/api.php and http://www.growlforwindows.com/gfw/developers.aspx

JokerMartini
04-13-2012, 08:51 PM
Alright this is a great start.
Thanks guys.

JokerMartini
04-13-2012, 11:15 PM
Hey low, how would I make a click state for the tooltip that displays in the task bar to open the local c:\ in explorer?

I tried to replace the closeIcon s e with "shelllaunch @"c:\windows\" but that didn't work.

lo
04-13-2012, 11:41 PM
use the balloonTipClicked event.
Also, shelllaunch requires two arguments: filename and arguments string.

fn closeIcon s e = s.dispose()

fn balloonClicked s e = shelllaunch @"c:\windows\" ""

a = dotnetobject "notifyicon"
a.visible = true
a.icon = (dotnetclass "system.drawing.systemIcons").information
dotnet.addEventHandler a "BalloonTipClosed" closeIcon
dotnet.addEventHandler a "BalloonTipClicked" balloonClicked
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info

CGTalk Moderation
04-13-2012, 11:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.