Example #1
0
 public void Dispatch(JSPosition position)
 {
     Debug.WriteLine("Calling Dispatch position with watch: {0} Count: {1}", _watch, _locationListeners.Count);
     if (_locationListeners == null || _locationListeners.Count == 0)
     {
         return;
     }
     _deleteIDList.Clear();
     _dispatching = true;
     foreach (KeyValuePair <int, PositionListener> pair in _locationListeners)
     {
         PositionListener listener = pair.Value;
         Debug.WriteLine("Calling listener ApplyOption!");
         if (listener.ApplyOption())
         {
             Debug.WriteLine("Calling listener Dispatch!");
             listener.Dispatch(position);
             if (!_watch)
             {
                 _deleteIDList.Add(pair.Key);
             }
         }
     }
     foreach (int id in _deleteIDList)
     {
         Debug.WriteLine("Removing position listener {0}!", id);
         _locationListeners.Remove(id);
     }
     _dispatching = false;
 }
Example #2
0
 public void Dispatch(JSPosition position)
 {
     _callFrame.PassedArgsCount = 1;
     _callFrame.Arg0.Set(position);
     _callFrame.This = HTMLRuntime.Instance.GlobalContext;
     _callFrame.Signature = new mdr.DFunctionSignature(ref _callFrame, 1);
     _callFrame.Function.Call(ref _callFrame);
 }
Example #3
0
 public void Dispatch(JSPosition position)
 {
     _callFrame.PassedArgsCount = 1;
     _callFrame.Arg0.Set(position);
     _callFrame.This      = HTMLRuntime.Instance.GlobalContext;
     _callFrame.Signature = new mdr.DFunctionSignature(ref _callFrame, 1);
     _callFrame.Function.Call(ref _callFrame);
 }
Example #4
0
 public void Dispatch(JSPosition position)
 {
     Debug.WriteLine("Calling Dispatch position with watch: {0} Count: {1}", _watch, _locationListeners.Count);
     if (_locationListeners == null || _locationListeners.Count == 0)
         return;
     _deleteIDList.Clear();
     _dispatching = true;
     foreach (KeyValuePair<int, PositionListener> pair in _locationListeners)
     {
         PositionListener listener = pair.Value;
         Debug.WriteLine("Calling listener ApplyOption!");
         if (listener.ApplyOption())
         {
             Debug.WriteLine("Calling listener Dispatch!");
             listener.Dispatch(position);
             if (!_watch){
                 _deleteIDList.Add(pair.Key);
             }
         }
     }
     foreach (int id in _deleteIDList)
     {
         Debug.WriteLine("Removing position listener {0}!", id);
         _locationListeners.Remove(id);
     }
     _dispatching = false;
 }