/usr/share/gtk-sharp2-examples/CalendarApp.cs is in gtk-sharp2-examples 2.12.40-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | // CalendarApp.cs - Gtk.Calendar class Test implementation
//
// Author: Lee Mallabone <gnome@fonicmonkey.net>
//
// (c) 2003 Lee Mallabone
namespace GtkSamples {
using Gtk;
using System;
public class CalendarApp {
public static Calendar CreateCalendar ()
{
Calendar cal = new Calendar();
cal.DisplayOptions = CalendarDisplayOptions.ShowHeading |
CalendarDisplayOptions.ShowDayNames |
CalendarDisplayOptions.ShowWeekNumbers;
return cal;
}
public static int Main (string[] args)
{
Application.Init ();
Window win = new Window ("Calendar Tester");
win.DefaultWidth = 200;
win.DefaultHeight = 150;
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
Calendar cal = CreateCalendar();
cal.DaySelected += new EventHandler (DaySelected);
win.Add (cal);
win.ShowAll ();
Application.Run ();
return 0;
}
static void DaySelected (object obj, EventArgs args)
{
Calendar activatedCalendar = (Calendar) obj;
Console.WriteLine (activatedCalendar.GetDate ().ToString ("yyyy/MM/dd"));
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
}
}
|