~indicator-applet-developers/notify-osd/trunk

303 by Mirco Müller
added examples form development-guidelines
1
////////////////////////////////////////////////////////////////////////////////
2
//3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3
//      10        20        30        40        50        60        70        80
4
//
5
// Info: 
6
//    Example of how to use libnotify correctly and at the same time comply to
7
//    the new jaunty notification spec (read: visual guidelines)
8
//
9
// Compile and run:
304 by Mirco Müller
use new utility class in all C#-examples
10
//    gmcs -pkg:notify-sharp example-util.cs summary-only.cs \
11
//    -out:summary-only.exe
303 by Mirco Müller
added examples form development-guidelines
12
//    mono summary-only.exe
13
//
14
// Copyright 2009 Canonical Ltd.
15
//
16
// Author:
17
//    Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
18
//
19
// This program is free software: you can redistribute it and/or modify it
20
// under the terms of the GNU General Public License version 3, as published
21
// by the Free Software Foundation.
22
//
23
// This program is distributed in the hope that it will be useful, but
24
// WITHOUT ANY WARRANTY; without even the implied warranties of
25
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
26
// PURPOSE.  See the GNU General Public License for more details.
27
//
28
// You should have received a copy of the GNU General Public License along
29
// with this program.  If not, see <http://www.gnu.org/licenses/>.
30
//
31
////////////////////////////////////////////////////////////////////////////////
32
33
using System;
34
using Notifications;
35
36
public class SummaryOnly
37
{
38
	public static void Main ()
39
	{
40
		// call this so we can savely use the m_capabilities array later
304 by Mirco Müller
use new utility class in all C#-examples
41
		ExampleUtil.InitCaps ();
303 by Mirco Müller
added examples form development-guidelines
42
43
		// show what's supported
304 by Mirco Müller
use new utility class in all C#-examples
44
		ExampleUtil.PrintCaps ();
303 by Mirco Müller
added examples form development-guidelines
45
46
		// try the summary-only case
47
		Notification n = new Notification ("Summary-only", "");
48
		n.Show ();
49
	}
50
}