using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace customDialog { /// /// Summary description for Birthday. /// public class Birthday : System.Windows.Forms.Form { private System.Windows.Forms.Button OKButton; private System.Windows.Forms.Button cancelButon; private System.Windows.Forms.ComboBox zodiacCombo; private System.Windows.Forms.MonthCalendar monthCalendar1; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Birthday() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.OKButton = new System.Windows.Forms.Button(); this.cancelButon = new System.Windows.Forms.Button(); this.zodiacCombo = new System.Windows.Forms.ComboBox(); this.monthCalendar1 = new System.Windows.Forms.MonthCalendar(); this.SuspendLayout(); // // OKButton // this.OKButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKButton.Location = new System.Drawing.Point(96, 176); this.OKButton.Name = "OKButton"; this.OKButton.TabIndex = 1; this.OKButton.Text = "OK"; // // cancelButon // this.cancelButon.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButon.Location = new System.Drawing.Point(200, 176); this.cancelButon.Name = "cancelButon"; this.cancelButon.TabIndex = 2; this.cancelButon.Text = "cancel"; // // zodiacCombo // this.zodiacCombo.Items.AddRange(new object[] { "Capricorn", "Aquarius", "Pisces", "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius"}); this.zodiacCombo.Location = new System.Drawing.Point(232, 8); this.zodiacCombo.MaxDropDownItems = 12; this.zodiacCombo.Name = "zodiacCombo"; this.zodiacCombo.Size = new System.Drawing.Size(121, 21); this.zodiacCombo.TabIndex = 3; this.zodiacCombo.Text = "Select Your Sign"; // // monthCalendar1 // this.monthCalendar1.Location = new System.Drawing.Point(8, 8); this.monthCalendar1.Name = "monthCalendar1"; this.monthCalendar1.TabIndex = 4; // // Birthday // this.AcceptButton = this.OKButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.cancelButon; this.ClientSize = new System.Drawing.Size(368, 210); this.ControlBox = false; this.Controls.Add(this.monthCalendar1); this.Controls.Add(this.zodiacCombo); this.Controls.Add(this.cancelButon); this.Controls.Add(this.OKButton); this.Name = "Birthday"; this.Text = "Birthday"; this.ResumeLayout(false); } #endregion /// /// Define dialog's properties /// public string Sign { get { return zodiacCombo.SelectedItem.ToString();}} public DateTime DateAndTime { get { return monthCalendar1.SelectionEnd; }} public DateTime Today { get { return monthCalendar1.TodayDate; }} } }