public void UpdateEventsInMainDataBase() { for (int i = FootData.Count - 1; i >= 0; i--) { if (!Leagues[Leagues.FindIndex(j => j.Name == FootData[i].League)].State) { FootData.RemoveAt(i); } } }
public void RemoveLiveMatches() { for (int i = FootData.Count - 1; i >= 0; i--) { FData item = FootData[i]; if (item.time < DateTime.Now) { FootData.RemoveAt(i); } } UpdateComboboxLeagues(); }
private void LWDataContextMenu_RemoveSelected(object sender, RoutedEventArgs e) { if (LWData.SelectedItems.Count < 1) { return; } ListViewData lw = (ListViewData)LWData.SelectedItems[0]; for (int i = FootData.Count - 1; i >= 0; i--) { FData item = FootData[i]; if (lw.Team1 == item.Team1 && item.Team2 == lw.Team2) { FootData.RemoveAt(i); } } WriteDataTotable(ComboBoxEvents.Items[ComboBoxEvents.SelectedIndex].ToString()); }
private void MenuItem_Click_Removeitem(object sender, RoutedEventArgs e) { if (LWHedge.Items.Count < 1) { return; } ListViewHedgeData lw = LWHedge.SelectedItems[0] as ListViewHedgeData; for (int i = FootData.Count - 1; i >= 0; i--) { FData item = FootData[i]; if (lw.Match == item.Team1 + " - " + item.Team2) { FootData.RemoveAt(i); } } UpdateHedgeDataInListview(); }