public override void Unload()
 {
     if (subscription != null)
     {
         subscription.Dispose();
         subscription = null;
         visualizer   = null;
         polylines    = null;
         points       = null;
     }
 }
        public override void Load(IServiceProvider provider)
        {
            points     = new Queue <Point>(1);
            polylines  = new Queue <Queue <Point> >(1);
            visualizer = (IplImageVisualizer)provider.GetService(typeof(DialogMashupVisualizer));
            MouseEventHandler mouseHandler = (sender, e) =>
            {
                if (e.Button == MouseButtons.Left)
                {
                    if (++tracking > TrackingMode.Fixed)
                    {
                        tracking = TrackingMode.None;
                    }
                }
            };

            visualizer.VisualizerCanvas.Canvas.MouseClick += mouseHandler;
            subscription = Disposable.Create(() => visualizer.VisualizerCanvas.Canvas.MouseClick -= mouseHandler);
        }
Exemple #3
0
 public override void Load(IServiceProvider provider)
 {
     visualizer = (IplImageVisualizer)provider.GetService(typeof(DialogMashupVisualizer));
 }