// Token: 0x06006D2B RID: 27947 RVA: 0x001F5A50 File Offset: 0x001F3C50
        internal void UpdateEditingState(bool inverted)
        {
            if (inverted != this._stylusIsInverted)
            {
                return;
            }
            EditingBehavior activeEditingBehavior = this.ActiveEditingBehavior;
            EditingBehavior behavior = this.GetBehavior(this.ActiveEditingMode);

            if (this.UserIsEditing)
            {
                if (this.IsInMidStroke)
                {
                    ((StylusEditingBehavior)activeEditingBehavior).SwitchToMode(this.ActiveEditingMode);
                }
                else
                {
                    if (activeEditingBehavior == this.SelectionEditingBehavior)
                    {
                        activeEditingBehavior.Commit(true);
                    }
                    this.ChangeEditingBehavior(behavior);
                }
            }
            else if (this.IsInMidStroke)
            {
                ((StylusEditingBehavior)activeEditingBehavior).SwitchToMode(this.ActiveEditingMode);
            }
            else
            {
                this.ChangeEditingBehavior(behavior);
            }
            this._inkCanvas.UpdateCursor();
        }
 // Token: 0x06006D57 RID: 27991 RVA: 0x001F6520 File Offset: 0x001F4720
 private EditingCoordinator.BehaviorValidFlag GetBehaviorTransformFlag(EditingBehavior behavior)
 {
     EditingCoordinator.BehaviorValidFlag result = (EditingCoordinator.BehaviorValidFlag) 0;
     if (behavior == this.InkCollectionBehavior)
     {
         result = EditingCoordinator.BehaviorValidFlag.InkCollectionBehaviorTransformValid;
     }
     else if (behavior == this.EraserBehavior)
     {
         result = EditingCoordinator.BehaviorValidFlag.EraserBehaviorTransformValid;
     }
     else if (behavior == this.LassoSelectionBehavior)
     {
         result = EditingCoordinator.BehaviorValidFlag.LassoSelectionBehaviorTransformValid;
     }
     else if (behavior == this.SelectionEditingBehavior)
     {
         result = EditingCoordinator.BehaviorValidFlag.SelectionEditingBehaviorTransformValid;
     }
     else if (behavior == this.SelectionEditor)
     {
         result = EditingCoordinator.BehaviorValidFlag.SelectionEditorTransformValid;
     }
     return(result);
 }
        // Token: 0x06006D44 RID: 27972 RVA: 0x001F5DC4 File Offset: 0x001F3FC4
        private void PushEditingBehavior(EditingBehavior newEditingBehavior)
        {
            EditingBehavior activeEditingBehavior = this.ActiveEditingBehavior;

            if (activeEditingBehavior != null)
            {
                activeEditingBehavior.Deactivate();
            }
            this._activationStack.Push(newEditingBehavior);
            newEditingBehavior.Activate();
        }
 // Token: 0x06006D2E RID: 27950 RVA: 0x001F5B17 File Offset: 0x001F3D17
 internal void InvalidateBehaviorCursor(EditingBehavior behavior)
 {
     this.SetCursorValid(behavior, false);
     if (!this.GetTransformValid(behavior))
     {
         behavior.UpdateTransform();
         this.SetTransformValid(behavior, true);
     }
     if (behavior == this.ActiveEditingBehavior)
     {
         this._inkCanvas.UpdateCursor();
     }
 }
        // Token: 0x06006D45 RID: 27973 RVA: 0x001F5DF4 File Offset: 0x001F3FF4
        private void PopEditingBehavior()
        {
            EditingBehavior activeEditingBehavior = this.ActiveEditingBehavior;

            if (activeEditingBehavior != null)
            {
                activeEditingBehavior.Deactivate();
                this._activationStack.Pop();
                activeEditingBehavior = this.ActiveEditingBehavior;
                if (this.ActiveEditingBehavior != null)
                {
                    activeEditingBehavior.Activate();
                }
            }
        }
        // Token: 0x06006D4F RID: 27983 RVA: 0x001F63F0 File Offset: 0x001F45F0
        internal Cursor GetActiveBehaviorCursor()
        {
            EditingBehavior activeEditingBehavior = this.ActiveEditingBehavior;

            if (activeEditingBehavior == null)
            {
                return(Cursors.Arrow);
            }
            Cursor cursor = activeEditingBehavior.Cursor;

            if (!this.GetCursorValid(activeEditingBehavior))
            {
                this.SetCursorValid(activeEditingBehavior, true);
            }
            return(cursor);
        }
 // Token: 0x06006D58 RID: 27992 RVA: 0x001F6580 File Offset: 0x001F4780
 private void ChangeEditingBehavior(EditingBehavior newBehavior)
 {
     try
     {
         this._inkCanvas.ClearSelection(true);
     }
     finally
     {
         if (this.ActiveEditingBehavior != null)
         {
             this.PopEditingBehavior();
         }
         if (newBehavior != null)
         {
             this.PushEditingBehavior(newBehavior);
         }
         this._inkCanvas.RaiseActiveEditingModeChanged(new RoutedEventArgs(InkCanvas.ActiveEditingModeChangedEvent, this._inkCanvas));
     }
 }
 internal void ActivateDynamicBehavior(EditingBehavior dynamicBehavior, InputDevice inputDevice)
 {
     this.PushEditingBehavior(dynamicBehavior);
     if (dynamicBehavior == this.LassoSelectionBehavior)
     {
         bool flag = false;
         try
         {
             this.InitializeCapture(inputDevice, (IStylusEditing)dynamicBehavior, true, false);
             flag = true;
         }
         finally
         {
             if (!flag)
             {
                 this.ActiveEditingBehavior.Commit(false);
                 this.ReleaseCapture(true);
             }
         }
     }
     this._inkCanvas.RaiseActiveEditingModeChanged(new RoutedEventArgs(InkCanvas.ActiveEditingModeChangedEvent, this._inkCanvas));
 }
 // Token: 0x06006D31 RID: 27953 RVA: 0x001F5B60 File Offset: 0x001F3D60
 internal IStylusEditing ChangeStylusEditingMode(StylusEditingBehavior sourceBehavior, InkCanvasEditingMode newMode)
 {
     if (this.IsInMidStroke && ((sourceBehavior != this.LassoSelectionBehavior && sourceBehavior == this.ActiveEditingBehavior) || (sourceBehavior == this.LassoSelectionBehavior && this.SelectionEditor == this.ActiveEditingBehavior)))
     {
         this.PopEditingBehavior();
         EditingBehavior behavior = this.GetBehavior(this.ActiveEditingMode);
         if (behavior != null)
         {
             this.PushEditingBehavior(behavior);
             if (newMode == InkCanvasEditingMode.Select && behavior == this.SelectionEditor)
             {
                 this.PushEditingBehavior(this.LassoSelectionBehavior);
             }
         }
         else
         {
             this.ReleaseCapture(true);
         }
         this._inkCanvas.RaiseActiveEditingModeChanged(new RoutedEventArgs(InkCanvas.ActiveEditingModeChangedEvent, this._inkCanvas));
         return(this.ActiveEditingBehavior as IStylusEditing);
     }
     return(null);
 }
 // Token: 0x06006D30 RID: 27952 RVA: 0x001F5B55 File Offset: 0x001F3D55
 internal bool IsTransformValid(EditingBehavior behavior)
 {
     return(this.GetTransformValid(behavior));
 }
 // Token: 0x06006D53 RID: 27987 RVA: 0x001F6480 File Offset: 0x001F4680
 private void SetTransformValid(EditingBehavior behavior, bool isValid)
 {
     EditingCoordinator.BehaviorValidFlag behaviorTransformFlag = this.GetBehaviorTransformFlag(behavior);
     this.SetBitFlag(behaviorTransformFlag, isValid);
 }
 // Token: 0x06006D52 RID: 27986 RVA: 0x001F6464 File Offset: 0x001F4664
 private bool GetTransformValid(EditingBehavior behavior)
 {
     EditingCoordinator.BehaviorValidFlag behaviorTransformFlag = this.GetBehaviorTransformFlag(behavior);
     return(this.GetBitFlag(behaviorTransformFlag));
 }
 // Token: 0x06006D51 RID: 27985 RVA: 0x001F6444 File Offset: 0x001F4644
 private void SetCursorValid(EditingBehavior behavior, bool isValid)
 {
     EditingCoordinator.BehaviorValidFlag behaviorCursorFlag = this.GetBehaviorCursorFlag(behavior);
     this.SetBitFlag(behaviorCursorFlag, isValid);
 }
 // Token: 0x06006D50 RID: 27984 RVA: 0x001F6428 File Offset: 0x001F4628
 private bool GetCursorValid(EditingBehavior behavior)
 {
     EditingCoordinator.BehaviorValidFlag behaviorCursorFlag = this.GetBehaviorCursorFlag(behavior);
     return(this.GetBitFlag(behaviorCursorFlag));
 }
 // Token: 0x06006D2F RID: 27951 RVA: 0x001F5B4C File Offset: 0x001F3D4C
 internal bool IsCursorValid(EditingBehavior behavior)
 {
     return(this.GetCursorValid(behavior));
 }
 internal void DebugCheckActiveBehavior(EditingBehavior behavior)
 {
 }
 private void DebugCheckNonDynamicBehavior(EditingBehavior behavior)
 {
 }