Beispiel #1
0
 private void bSortByTime_Click(object sender, EventArgs e)
 {
     // sort List by thisArrival nullable field, if there object has no value, get thisDeparture nullable field to compare
     // but Parser must check that thisArrival or thisDeparture has value
     try
     {
         Logic_Parser.SortByTime();
         timetableView.Refresh();
     }
     catch (InvalidOperationException ex)
     {
         MessageBox.Show(ex.Message, "Sorting problem", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Beispiel #2
0
        private void btDuplicate_Click(object sender, EventArgs e)
        {
            int count      = Convert.ToInt32(tbDuplicateCount.Text);
            int firstIndex = timetableView.CurrentCell.RowIndex;

            for (int i = 0; i < count; i++)
            {
                Logic_Parser.Trains.Insert(firstIndex + i + 1, Logic_Parser.DuplicateAndInterval(Convert.ToDouble(tbInterval.Text), Logic_Parser.Trains.ElementAt(firstIndex + i)));
            }

            timetableView.DataSource = null;
            timetableView.DataSource = Logic_Parser.Trains;
            timetableView.Refresh();
        }
Beispiel #3
0
 private void ValidationBeforeSave()
 {
     Logic_Parser.FindPreviousInCycle();
 }