コード例 #1
0
        /// <summary>
        /// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
        /// </summary>
        /// <param name="e">An object containing data describing the specific state change.</param>
        protected override void OnStateChanged(GraphicStateChangedEventArgs e)
        {
            base.OnStateChanged(e);

            if (typeof(InactiveGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterInactiveState(e.MouseInformation);
            }
            else if (typeof(FocussedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterFocusState(e.MouseInformation);
            }
            else if (typeof(SelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterSelectedState(e.MouseInformation);
            }
            else if (typeof(FocussedSelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterFocusSelectedState(e.MouseInformation);
            }
        }
コード例 #2
0
        /// <summary>
        /// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
        /// </summary>
        /// <param name="e">An object containing data describing the specific state change.</param>
        protected override void OnStateChanged(GraphicStateChangedEventArgs e)
        {
            base.OnStateChanged(e);

            var state = e.NewState;

            if (state is InactiveGraphicState)
            {
                OnEnterInactiveState(e.MouseInformation);
            }
            else if (state is FocussedGraphicState)
            {
                OnEnterFocusState(e.MouseInformation);
            }
            else if (state is SelectedGraphicState)
            {
                OnEnterSelectedState(e.MouseInformation);
            }
            else if (state is FocussedSelectedGraphicState)
            {
                OnEnterFocusSelectedState(e.MouseInformation);
            }
        }
コード例 #3
0
ファイル: RoiGraphic.cs プロジェクト: UIKit0/ClearCanvas
		/// <summary>
		/// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
		/// </summary>
		/// <param name="e">An object containing data describing the specific state change.</param>
		protected override void OnStateChanged(GraphicStateChangedEventArgs e)
		{
			base.OnStateChanged(e);

			OnDelayedRoiChanged();
		}
コード例 #4
0
		/// <summary>
		/// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
		/// </summary>
		/// <param name="e">An object containing data describing the specific state change.</param>
		protected override void OnStateChanged(GraphicStateChangedEventArgs e)
		{
			base.OnStateChanged(e);

			var state = e.NewState;
			if (state is InactiveGraphicState)
				OnEnterInactiveState(e.MouseInformation);
			else if (state is FocussedGraphicState)
				OnEnterFocusState(e.MouseInformation);
			else if (state is SelectedGraphicState)
				OnEnterSelectedState(e.MouseInformation);
			else if (state is FocussedSelectedGraphicState)
				OnEnterFocusSelectedState(e.MouseInformation);
		}
コード例 #5
0
 /// <summary>
 /// Called when the value of <see cref="State"/> changes.
 /// </summary>
 /// <param name="e">An object containing data describing the specific state change.</param>
 protected virtual void OnStateChanged(GraphicStateChangedEventArgs e)
 {
 }
コード例 #6
0
		/// <summary>
		/// Called when the value of <see cref="State"/> changes.
		/// </summary>
		/// <param name="e">An object containing data describing the specific state change.</param>
		protected virtual void OnStateChanged(GraphicStateChangedEventArgs e) {}
コード例 #7
0
		/// <summary>
		/// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
		/// </summary>
		/// <param name="e">An object containing data describing the specific state change.</param>
		protected override void OnStateChanged(GraphicStateChangedEventArgs e)
		{
			base.OnStateChanged(e);

			if (typeof (InactiveGraphicState).IsAssignableFrom(e.NewState.GetType()))
				OnEnterInactiveState(e.MouseInformation);
			else if (typeof (FocussedGraphicState).IsAssignableFrom(e.NewState.GetType()))
				OnEnterFocusState(e.MouseInformation);
			else if (typeof (SelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
				OnEnterSelectedState(e.MouseInformation);
			else if (typeof (FocussedSelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
				OnEnterFocusSelectedState(e.MouseInformation);
		}