Exemplo n.º 1
0
		public MainWindow(ShellForms parent) {
			this.parent = parent;
			this.Title = "Alarm Clock";

			base.Add (new Label (2, 2) { Text = "Wake-up time: " });

			var txtWakeupTime = new Textbox (16, 2, 5);
			txtWakeupTime.Text = DateTime.Now.AddMinutes (1).ToString ("HH:mm");
			base.Add (txtWakeupTime);

			var btnStartStop = new Button (22, 2, "Start");
			base.Add (btnStartStop);

			this.lblTime = new Label (2, 4, 8);
			base.Add (this.lblTime);
		}
Exemplo n.º 2
0
		public static void Main (string[] args)
		{
			var sf = new ShellForms ();

			// build
			var ui = new MainWindow (sf);
			var clock = new Clock ();

			// bind
			clock.OnClockTick += ui.Display_time;

			// run
			using (clock) {
				clock.Start ();
				sf.Run (ui);
			};
		}
Exemplo n.º 3
0
		public static void Main (string[] args)
		{
			// build
			var dlg = new MainDlg ();
			var cmd = new CommandlineProvider ();
			var txt = new TextfileProvider ();
			var pager = new Pager ();
			var formatter = new Formatter ();
			var ep = new Entrypoints (cmd, txt, pager, formatter);
			var app = new App (dlg, ep);

			// run
			app.Start ();

			var sf = new ShellForms ();
			sf.Run (dlg);
		}