private void Init() { Interactions.Where(_ => _.Value.Interaction == Interaction.Check && (bool?)_.Value.Value == true).Subscribe(_ => { Checked.Add(_.Key); if (Unchecked.Contains(_.Key)) { Unchecked.Remove(_.Key); } }); ChildSubject.Where(_ => _.Value.Interaction == Interaction.Check && (bool?)_.Value.Value == true).Subscribe(_ => { Checked.Add(_.Key); if (Unchecked.Contains(_.Key)) { Unchecked.Remove(_.Key); } }); Interactions.Where(_ => _.Value.Interaction == Interaction.Check && !((bool?)_.Value.Value == true)).Subscribe(_ => { Unchecked.Add(_.Key); if (Checked.Contains(_.Key)) { Checked.Remove(_.Key); } }); ChildSubject.Where(_ => _.Value.Interaction == Interaction.Check && !((bool?)_.Value.Value == true)).Subscribe(_ => { Unchecked.Add(_.Key); if (Checked.Contains(_.Key)) { Checked.Remove(_.Key); } }); }
public void OnFileCheckChanged() { foreach (var f in FileItems) { if (f.Check) { if (Unchecked.Contains(f.Fid)) { Unchecked.Remove(f.Fid); } } else if (!Unchecked.Contains(f.Fid)) { Unchecked.Add(f.Fid); } } if (QueryResults == null || QueryResults.Count == 0) { return; } HitItems.Clear(); ProcessQueryResults(); }