Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- datetimepicker/*: added early date timepicker sample

svn path=/trunk/winforms/; revision=39836
  • Loading branch information...
commit 092f3221172a9c3764c5fa64d645c08c4081681b 1 parent c7dbe17
John BouAntoun authored
Showing with 74 additions and 0 deletions.
  1. +10 −0 datetimepicker/Makefile
  2. +64 −0 datetimepicker/swf-datetimepicker.cs
View
10 datetimepicker/Makefile
@@ -0,0 +1,10 @@
+all: mono
+
+mono: swf-datetimepicker.cs
+ mcs swf-datetimepicker.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+
+dotnet: swf-panels.cs
+ csc swf-datetimepicker.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+
+clean:
+ rm swf-datetimepicker.exe -r -f
View
64 datetimepicker/swf-datetimepicker.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace MyFormProject
+{
+ public class MainForm : System.Windows.Forms.Form
+ {
+ // datetimepicker
+ private System.Windows.Forms.DateTimePicker dtp1;
+ private System.Windows.Forms.DateTimePicker dtp2;
+
+ private System.Windows.Forms.Label label1;
+
+ public MainForm()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+
+
+ this.label1.Location = new System.Drawing.Point(0, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(128, 23);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "DateTimePicker";
+
+ //
+ // MainForm
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(472, 382);
+
+ this.dtp1 = new System.Windows.Forms.DateTimePicker();
+ this.dtp1.Location = new System.Drawing.Point(10, 50);
+ this.dtp1.Name = "dtp1";
+ this.dtp1.TabIndex = 1;
+
+ this.dtp2 = new System.Windows.Forms.DateTimePicker();
+ this.dtp2.Location = new System.Drawing.Point(10, 150);
+ this.dtp2.Name = "dtp2";
+ this.dtp2.DropDownAlign = LeftRightAlignment.Right;
+ this.dtp2.TabIndex = 2;
+
+ this.Controls.Add(this.dtp1);
+ this.Controls.Add(this.dtp2);
+ this.Controls.Add(this.label1);
+
+
+ this.Name = "MainForm";
+ this.Text = "SWF-DateTimePicker";
+ }
+
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new MainForm());
+ MessageBox.Show("hello world");
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.