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 }
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; }
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; }