示例#1
0
        private void OnHitsSubtracted(ResponseMessage r)
        {
            HitsSubtractedResponse response = (HitsSubtractedResponse)r;

            if (this.HitsSubtractedEvent != null)
            {
                this.HitsSubtractedEvent(response);
            }
        }
示例#2
0
        private void OnHitsSubtracted(HitsSubtractedResponse response)
        {
            foreach (Uri uri in response.Uris) {
                if (uri.Scheme != Uri.UriSchemeFile)
                    continue;

                string path = uri.LocalPath;
                Track track = trackHash[path] as Track;
                if (track != null) {
                    trackHash.Remove (path);
                    db.RemoveTrack (track);
                }
            }
        }
示例#3
0
	private static void OnHitsSubtracted (HitsSubtractedResponse response)
	{
		lastQueryTime = DateTime.Now;

		if (! display_hits)
			return;

		foreach (Uri uri in response.Uris) {
			Console.WriteLine ("Subtracted Uri '{0}'", uri);
			Console.WriteLine ();

			--count;
		}
	}
示例#4
0
		private void OnHitsSubtracted (HitsSubtractedResponse response)
		{
			root.Subtract (response.Uris);
			UpdatePage ();
		}
示例#5
0
			private void OnHitsSubtracted (HitsSubtractedResponse response)
			{
				mutex.WaitOne ();

				List<uint> removed = new List<uint>();

				Console.Error.WriteLine ("Removing some hits");
				foreach (KeyValuePair<uint, Xesam.Hit> kvp in hits) {
					foreach (Uri uri in response.Uris) {
						if (kvp.Value.Uri == uri) {
							Console.Error.WriteLine ("-Hit: {0}", uri);
							removed.Add (kvp.Key);
						}
					}
				}

				foreach (uint key in removed) {
					hits.Remove (key);
				}

				if (HitsRemovedHandler != null) {
					HitsRemovedHandler (id, removed.ToArray ());
				}
				mutex.ReleaseMutex ();
			}
示例#6
0
		private void OnHitsSubtracted (HitsSubtractedResponse response)
		{
			foreach (Uri uri in response.Uris)
				view.SubtractHit (uri);

			TotalMatches -= response.Uris.Count;

			CheckNoMatch ();
		}