Exemplo n.º 1
0
        private void EnterOpenState()
        {
            _state = State.Open;

            _hadKeyboardFocus = HasKeyboardFocus;

            FocusObserver.KeyboardFocusedElementChanged += OnKeyboardFocusedElementChanged;
            AttachGlobalMouseEvents();

#if !SILVERLIGHT
            _foregroundSession = _foregroundSession.DisposeExchange(ForegroundSession.Enter(_popup, QueryCloseCoreImmediate));
            HwndMouseObserver.AddListener(this);
#endif
        }
Exemplo n.º 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    for (int i = 0, loopTo = Sessions.Length - 1; i <= loopTo; i++)
                    {
                        Sessions[i].Dispose();
                    }
                }
                ForegroundSession.Dispose();
            }

            disposedValue = true;
        }
Exemplo n.º 3
0
        public void FillCircle(Vertex vertex)
        {
            var index = Sessions.Length - 1 - vertex.LayerIndex;

            if (LastVertex != null && (LastVertex.Position - vertex.Position).LengthSquared() > 10000.0f)
            {
                LastVertex = null;
            }

            Sessions[index].DrawLine((LastVertex ?? vertex).Position, vertex.Position, vertex.Color.ToUIColor(), vertex.Size);
            //Sessions[index].FillCircle(vertex.Position, vertex.Size, vertex.Color.ToUIColor());
            //Sessions[index].FillRectangle(new Rect(vertex.Position.X, vertex.Position.Y, vertex.Size, vertex.Size), vertex.Color.ToUIColor());

            ForegroundSession.FillCircle(vertex.Position, vertex.Size / 5.0f, Colors.Black);

            LastVertex = vertex;
        }