public void Save() { if (buffered) { DataGridCollection.CopyTo(SaveCollection); } }
private void addButton_Click(object sender, System.Windows.RoutedEventArgs e) { if (DataGridCollection.Count == 0) { DataGridCollection.Add(new Task() { Number = 1 }); } else { DataGridCollection.Add(new Task() { Number = DataGridCollection.Last().Number + 1 }); } }
private void addButton_Click(object sender, System.Windows.RoutedEventArgs e) { Pilot newPilot = null; if (DataGridCollection.Count == 0) { newPilot = new Pilot() { Number = 1 } } ; else { DataGridCollection.Sort(p => p.Number); newPilot = new Pilot() { Number = DataGridCollection.Max(p => p.Number) + 1 }; } DataGridCollection.Add(newPilot); }
private void menuRemove_Click(object sender, RoutedEventArgs e) { var pilot = ((MenuItem)sender).Tag as Pilot; DataGridCollection.Remove(pilot); }
private void addButton_Click(object sender, System.Windows.RoutedEventArgs e) { DataGridCollection.Add(new Competition()); }
private void menuRemove_Click(object sender, System.Windows.RoutedEventArgs e) { var competition = ((MenuItem)sender).Tag as Competition; DataGridCollection.Remove(competition); }
private void menuRemove_Click(object sender, RoutedEventArgs e) { var task = ((MenuItem)sender).Tag as Task; DataGridCollection.Remove(task); }
private void GotoLastPage() { DataGridCollection.MoveToLastPage(); NotifyPropertyChanged(); }
private void GotoPreviousPage() { DataGridCollection.MoveToPreviousPage(); NotifyPropertyChanged(); }