Beispiel #1
0
        public override Item Clone()
        {
            ItemDateTime time = new ItemDateTime(this);

            time.Value = this.Value;
            return(time);
        }
Beispiel #2
0
 public void Show()
 {
     base.Visible = true;
     base.Focus();
     if (this.Style == RescoDateTimePickerStyle.Time)
     {
         this.m_DateTime.Hide();
         this.m_TimeCombo.Left         = 0;
         this.m_TimeCombo.Width        = base.Width;
         this.m_TimeCombo.CustomFormat = this.Format;
     }
     else
     {
         this.m_DateTime.Size = new Size(ItemDateTime.DTWidth, base.Height);
         this.m_DateTime.Show();
         this.m_TimeCombo.Left  = ItemDateTime.DTWidth;
         this.m_TimeCombo.Width = base.Width - ItemDateTime.DTWidth;
     }
     if (this.Style == RescoDateTimePickerStyle.Date)
     {
         this.m_TimeCombo.Hide();
         this.m_DateTime.Size = new Size(base.Width, base.Height);
         this.m_DateTime.Show();
         this.m_DateTime.Focus();
     }
     else
     {
         this.m_TimeCombo.Show();
     }
     if (this.Style == RescoDateTimePickerStyle.DateTime)
     {
         this.SetFormat(ItemDateTime.GetDateFormatPart(this.Format));
         this.m_TimeCombo.CustomFormat = ItemDateTime.GetTimeFormatPart(this.Format);
         this.m_DateTime.Focus();
     }
     else if (this.Style == RescoDateTimePickerStyle.Time)
     {
         this.m_TimeCombo.Focus();
     }
     this.m_DateTime.NoneText  = this.ParentItem.NoneText;
     this.m_TimeCombo.NoneText = this.ParentItem.NoneText;
 }
Beispiel #3
0
 public void Hide()
 {
     if (this.ParentItem != null)
     {
         this.ParentItem.DisableEvents = true;
         ItemDateTime parentItem = this.ParentItem;
         this.ValueChanged = (ItemEventHandler)Delegate.Remove(this.ValueChanged, new ItemEventHandler(parentItem.OnChanged));
         try
         {
             this.ParentItem.EditValue = this.GetDate();
         }
         catch
         {
         }
         this.ParentItem.DisableEvents = false;
     }
     base.Visible = false;
     this.m_DateTime.Hide();
     this.m_TimeCombo.Hide();
 }
Beispiel #4
0
 public void Show()
 {
     base.Visible = true;
     base.Focus();
     if (this.Style == RescoDateTimePickerStyle.Time)
     {
         this.m_DateTime.Hide();
         this.m_TimeCombo.Left  = 0;
         this.m_TimeCombo.Width = base.Width;
         DateTimePickerInterface.InvokeSetProperty(this.m_TimeCombo, "CustomFormat", this.Format);
     }
     else
     {
         this.m_DateTime.Size = new Size(ItemDateTime.DTWidth, base.Height);
         this.m_DateTime.Show();
         this.m_TimeCombo.Left  = ItemDateTime.DTWidth;
         this.m_TimeCombo.Width = base.Width - ItemDateTime.DTWidth;
     }
     if (this.Style == RescoDateTimePickerStyle.Date)
     {
         this.m_TimeCombo.Hide();
         this.m_DateTime.Size = new Size(base.Width, base.Height);
         this.m_DateTime.Show();
         this.m_DateTime.Focus();
     }
     else
     {
         this.m_TimeCombo.Show();
     }
     if (this.Style == RescoDateTimePickerStyle.DateTime)
     {
         this.SetFormat(ItemDateTime.GetDateFormatPart(this.Format));
         DateTimePickerInterface.InvokeSetProperty(this.m_TimeCombo, "CustomFormat", ItemDateTime.GetTimeFormatPart(this.Format));
         this.m_DateTime.Focus();
     }
     else if (this.Style == RescoDateTimePickerStyle.Time)
     {
         this.m_TimeCombo.Focus();
     }
 }
Beispiel #5
0
 public override Item Clone()
 {
     ItemDateTime time = new ItemDateTime(this);
     time.Value = this.Value;
     return time;
 }