Exemple #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ttt ttt = new ttt();

            if (ttt.ShowDialog() == true)
            {
                Txt.Items.Add(ttt.Name.Text.ToString());

                dt = new DateTime(ttt.Calendar.SelectedDate.Value.Year, ttt.Calendar.SelectedDate.Value.Month, ttt.Calendar.SelectedDate.Value.Day, int.Parse(ttt.Hours.Text), int.Parse(ttt.Minutes.Text), int.Parse(ttt.Seconds.Text));
                list.Add(ttt.Name.Text, dt);
            }
            else
            {
            }
        }
Exemple #2
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            if (Txt.SelectedIndex > -1)
            {
                gg = list[Txt.SelectedValue.ToString()].Date;
                td = list[Txt.SelectedValue.ToString()];
                ttt ttt = new ttt(Txt.SelectedValue.ToString(), td.Hour, td.Second, td.Minute, gg, list[Txt.SelectedValue.ToString()]);

                if (ttt.ShowDialog() == true)
                {
                    dt = new DateTime(ttt.Calendar.SelectedDate.Value.Year, ttt.Calendar.SelectedDate.Value.Month, ttt.Calendar.SelectedDate.Value.Day, int.Parse(ttt.Hours.Text), int.Parse(ttt.Minutes.Text), int.Parse(ttt.Seconds.Text));

                    //list.Remove(ttt.Name.Text.ToString());

                    list[ttt.Name.Text] = dt;
                }
                else
                {
                }
            }
        }