using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using XTransMobile;

namespace iTripLog.Date
{
    public partial class DateForm : XTransMobile.XTForm
    {
        public DateForm()
        {
            InitializeComponent();
        }

        private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
        {
            this.button1.Visible = true;
            this.textBox1.Visible = true;
            this.textBox2.Visible = true;
            this.label1.Visible = true;
            this.textBox2.Text = this.monthCalendar1.SelectionStart.ToString(); 
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            this.textBox1.Visible = false;
            this.textBox2.Visible = false;
            this.label1.Visible = false;
            this.button1.Visible = false;
            TextBox T=new TextBox();
            T.Text=this.textBox2.Text+":"+this.textBox1.Text;
            this.listBox1.Items.Add(this.textBox2.Text + ":" + this.textBox1.Text);
            this.listBox1.Visible = true;

        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.listBox1.Visible = false;
            this.listBox1.SelectedItem.ToString();
            this.textBox2.Text = listBox1.SelectedItem.ToString();
            this.textBox1.Text = "";
            this.textBox1.Visible = true;
            this.textBox2.Visible = true;
            this.label1.Visible = true;
            this.button1.Visible = true;
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            this.listBox1.Visible = false;
            this.listBox1.SelectedItem.ToString();
            this.textBox2.Text = listBox1.SelectedItem.ToString();
            this.textBox1.Text = "";
            this.textBox1.Visible = true;
            this.textBox2.Visible = true;
            this.label1.Visible = true;
            this.button1.Visible = true;
        }

        private void DateForm_Load(object sender, EventArgs e)
        {

        }

    }
}