Exemple #1
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2430:
                Name = (string)e.GetValue(undo);
                break;

            case 2431:
                Label = (GoGeneralNodePortLabel)e.GetValue(undo);
                break;

            case 2432:
                SideIndex = e.GetInt(undo);
                break;

            case 2433:
                LeftSide = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #2
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2000:
                UserFlags = e.GetInt(undo);
                break;

            case 2001:
                UserObject = e.GetValue(undo);
                break;

            case 2002:
                ToolTipText = (string)e.GetValue(undo);
                break;

            case 2003:
                PropertiesDelegatedToSelectionObject = (bool)e.GetValue(undo);
                break;

            case 2004:
                PartID = e.GetInt(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #3
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2101:
                LabelSpot = e.GetInt(undo);
                break;

            case 2102:
                Shape = (GoShape)e.GetValue(undo);
                break;

            case 2103:
                Label = (GoText)e.GetValue(undo);
                break;

            case 2104:
                Port = (GoPort)e.GetValue(undo);
                break;

            case 2105:
                MiddleLabelMargin = e.GetSize(undo);
                break;

            case 2106:
                AutoResizes = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #4
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1481:
                MinorRadius = e.GetFloat(undo);
                break;

            case 1482:
                Orientation = (Orientation)e.GetValue(undo);
                break;

            case 1483:
                Perspective = (GoPerspective)e.GetValue(undo);
                break;

            case 1484:
                ResizableRadius = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                ResetPath();
                break;
            }
        }
Exemple #5
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2301:
                TopLeftMargin = e.GetSize(undo);
                break;

            case 2302:
                BottomRightMargin = e.GetSize(undo);
                break;

            case 2303:
                PartID = e.GetInt(undo);
                break;

            case 2304:
                Background = (GoObject)e.GetValue(undo);
                break;

            case 2305:
                Label = (GoText)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #6
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2651:
                DraggableLabel = (bool)e.GetValue(undo);
                break;

            case 2652:
                Icon = (GoObject)e.GetValue(undo);
                break;

            case 2653:
                Label = (GoText)e.GetValue(undo);
                break;

            case 2654:
                Port = (GoPort)e.GetValue(undo);
                break;

            case 2655:
                LabelOffset = e.GetSize(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #7
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2601:
                Text = (string)e.GetValue(undo);
                break;

            case 2602:
                Icon = (GoObject)e.GetValue(undo);
                break;

            case 2603:
                Label = (GoText)e.GetValue(undo);
                break;

            case 2604:
                InPort = (GoPort)e.GetValue(undo);
                break;

            case 2605:
                OutPort = (GoPort)e.GetValue(undo);
                break;

            case 2606:
                Orientation = (Orientation)e.GetInt(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #8
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1451:
                StartAngle = e.GetFloat(undo);
                break;

            case 1452:
                SweepAngle = e.GetFloat(undo);
                break;

            case 1453:
                ResizableStartAngle = (bool)e.GetValue(undo);
                break;

            case 1454:
                ResizableEndAngle = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #9
0
        /// <summary>
        /// Perform the usual undo and redo changes.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2310:
                Anchor = (GoObject)e.GetValue(undo);
                break;

            case 2311:
                Corner = e.GetSize(undo);
                break;

            case 2312:
                BaseWidth = e.GetFloat(undo);
                break;

            case 2313:
                UnanchoredOffset = e.GetSize(undo);
                break;

            case 2314:
                Reanchorable = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #10
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" />
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1001:
            {
                base.ChangeValue(e, undo);
                RectangleF rect  = e.GetRect(!undo);
                RectangleF rect2 = e.GetRect(undo);
                if (rect.Width == rect2.Width && rect.Height == rect2.Height)
                {
                    float dx = rect2.X - rect.X;
                    float dy = rect2.Y - rect.Y;
                    GoStroke.TranslatePoints(myPoints, dx, dy);
                }
                break;
            }

            case 1460:
                A = e.GetPoint(undo);
                break;

            case 1461:
                B = e.GetPoint(undo);
                break;

            case 1462:
                C = e.GetPoint(undo);
                break;

            case 1463:
                D = e.GetPoint(undo);
                break;

            case 1464:
            {
                PointF[] array = (PointF[])e.GetValue(undo);
                if (array != null)
                {
                    SetPoints(array);
                }
                break;
            }

            case 1465:
                Orientation = (Orientation)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #11
0
        /// <summary>
        /// Implement undo and redo support.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 3101:
                TopLeftMargin = e.GetSize(undo);
                break;

            case 3102:
                BottomRightMargin = e.GetSize(undo);
                break;

            case 3103:
                BackgroundImageSpot = e.GetInt(undo);
                break;

            case 3104:
                ShowsMargins = (bool)e.GetValue(undo);
                break;

            case 3105:
                MarginColor = (Color)e.GetValue(undo);
                break;

            case 3110:
                Paper = (GoGrid)e.GetValue(undo);
                break;

            case 3111:
                BackgroundImage = (GoImage)e.GetValue(undo);
                break;

            case 3112:
                Grid = (GoGrid)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #12
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1491:
                Depth = e.GetSize(undo);
                break;

            case 1492:
                Perspective = (GoPerspective)e.GetValue(undo);
                break;

            case 1493:
                ReshapableDepth = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #13
0
        /// <summary>
        /// Perform changes to the body or port margin for undo.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2201:
                Body = (GoObject)e.GetValue(undo);
                break;

            case 2202:
                PortBorderMargin = e.GetSize(undo);
                break;

            case 2203:
                Port = (GoPort)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #14
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" />
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            int subHint = e.SubHint;

            if (subHint == 1901)
            {
                ControlType = (Type)e.GetValue(undo);
            }
            else
            {
                base.ChangeValue(e, undo);
            }
        }
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1466:
                Skew = e.GetSize(undo);
                break;

            case 1467:
                ReshapableSkew = (bool)e.GetValue(undo);
                break;

            case 1468:
                Direction = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                ResetPath();
                break;
            }
        }
Exemple #16
0
        /// <summary>
        /// Handle undo and redo changes.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2901:
                Background = (GoObject)e.GetValue(undo);
                break;

            case 2902:
                Icon = (GoObject)e.GetValue(undo);
                break;

            case 2903:
                Label = (GoText)e.GetValue(undo);
                break;

            case 2904:
                TopLeftMargin = e.GetSize(undo);
                break;

            case 2905:
                BottomRightMargin = e.GetSize(undo);
                break;

            case 2906:
                ActionEnabled = (bool)e.GetValue(undo);
                break;

            case 2907:
                AutoRepeating = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #17
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" />
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1001:
            {
                base.ChangeValue(e, undo);
                RectangleF rect  = e.GetRect(!undo);
                RectangleF rect2 = e.GetRect(undo);
                if (rect.Width == rect2.Width && rect.Height == rect2.Height)
                {
                    float dx = rect2.X - rect.X;
                    float dy = rect2.Y - rect.Y;
                    GoStroke.TranslatePoints(myPoints, dx, dy);
                }
                break;
            }

            case 1431:
                A = e.GetPoint(undo);
                break;

            case 1432:
                B = e.GetPoint(undo);
                break;

            case 1433:
                C = e.GetPoint(undo);
                break;

            case 1434:
            {
                PointF[] array = (PointF[])e.GetValue(undo);
                if (array != null)
                {
                    ResetPath();
                    myPoints = array;
                }
                break;
            }

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #18
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1469:
                Corner = e.GetSize(undo);
                break;

            case 1470:
                ReshapableCorner = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2950:
                Style = (GoCollapsibleHandleStyle)e.GetInt(undo);
                break;

            case 2951:
                Bordered = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #20
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" />
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1601:
                Image = (Image)e.GetValue(undo);
                break;

            case 1602:
                ResourceManager = (ResourceManager)e.GetValue(undo);
                break;

            case 1603:
                Name = (string)e.GetValue(undo);
                break;

            case 1604:
                Alignment = e.GetInt(undo);
                break;

            case 1605:
                AutoResizes = (bool)e.GetValue(undo);
                break;

            case 1606:
                ImageList = (ImageList)e.GetValue(undo);
                break;

            case 1607:
                Index = e.GetInt(undo);
                break;

            case 1608:
                ThrowsExceptions = (bool)e.GetValue(undo);
                break;

            case 1609:
                NameIsUri = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #21
0
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2801:
                Label = (GoText)e.GetValue(undo);
                break;

            case 2802:
                Background = (GoObject)e.GetValue(undo);
                break;

            case 2803:
                TopPort = (GoPort)e.GetValue(undo);
                break;

            case 2804:
                RightPort = (GoPort)e.GetValue(undo);
                break;

            case 2805:
                BottomPort = (GoPort)e.GetValue(undo);
                break;

            case 2806:
                LeftPort = (GoPort)e.GetValue(undo);
                break;

            case 2807:
                TopLeftMargin = e.GetSize(undo);
                break;

            case 2808:
                BottomRightMargin = e.GetSize(undo);
                break;

            case 2809:
                AutoResizes = (bool)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #22
0
        /// <summary>
        /// Handle undo and redo changes.
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 2211:
                LinkPointsSpread = (bool)e.GetValue(undo);
                break;

            case 2212:
                FromSides = e.GetInt(undo);
                break;

            case 2213:
                ToSides = e.GetInt(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
        /// <summary>
        /// Handle this class's property changes for undo and redo
        /// </summary>
        /// <param name="e"></param>
        /// <param name="undo"></param>
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 3001:
            {
                int      newInt    = e.NewInt;
                GoObject goObject2 = (GoObject)e.GetValue(undo);
                if (!undo)
                {
                    myLeftPorts.Insert(newInt, goObject2);
                    Add(goObject2);
                }
                break;
            }

            case 3002:
            {
                int      newInt2   = e.NewInt;
                GoObject goObject4 = (GoObject)e.GetValue(undo);
                if (!undo)
                {
                    myRightPorts.Insert(newInt2, goObject4);
                    Add(goObject4);
                }
                break;
            }

            case 3003:
            {
                int      oldInt2  = e.OldInt;
                GoObject goObject = (GoObject)e.GetValue(undo);
                if (undo)
                {
                    myLeftPorts.Insert(oldInt2, goObject);
                    Add(goObject);
                }
                break;
            }

            case 3004:
            {
                int      oldInt3   = e.OldInt;
                GoObject goObject3 = (GoObject)e.GetValue(undo);
                if (undo)
                {
                    myRightPorts.Insert(oldInt3, goObject3);
                    Add(goObject3);
                }
                break;
            }

            case 3005:
            {
                int oldInt = e.OldInt;
                if (oldInt < 0)
                {
                    oldInt = checked (-oldInt - 1);
                    SetLeftPort(oldInt, (GoObject)e.GetValue(undo));
                }
                else
                {
                    SetRightPort(oldInt, (GoObject)e.GetValue(undo));
                }
                break;
            }

            case 3006:
                TopPort = (GoObject)e.GetValue(undo);
                break;

            case 3007:
                BottomPort = (GoObject)e.GetValue(undo);
                break;

            case 3008:
                ItemWidth = e.GetFloat(undo);
                break;

            case 3009:
                FromEndSegmentLengthStep = e.GetFloat(undo);
                break;

            case 3010:
                ToEndSegmentLengthStep = e.GetFloat(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }
Exemple #24
0
        /// <summary>
        /// Performs changes for undo and redo.
        /// </summary>
        /// <seealso cref="M:Northwoods.Go.GoObject.ChangeValue(Northwoods.Go.GoChangedEventArgs,System.Boolean)" />
        public override void ChangeValue(GoChangedEventArgs e, bool undo)
        {
            switch (e.SubHint)
            {
            case 1001:
            {
                base.ChangeValue(e, undo);
                RectangleF rect  = e.GetRect(!undo);
                RectangleF rect2 = e.GetRect(undo);
                if (rect.Width == rect2.Width && rect.Height == rect2.Height)
                {
                    float dx = rect2.X - rect.X;
                    float dy = rect2.Y - rect.Y;
                    GoStroke.TranslatePoints(myPoints, dx, dy);
                }
                break;
            }

            case 1401:
                if (undo)
                {
                    InternalRemovePoint(e.OldInt);
                }
                else
                {
                    InternalInsertPoint(e.OldInt, new PointF(e.NewRect.X, e.NewRect.Y));
                }
                break;

            case 1402:
                if (undo)
                {
                    InternalInsertPoint(e.OldInt, new PointF(e.OldRect.X, e.OldRect.Y));
                }
                else
                {
                    InternalRemovePoint(e.OldInt);
                }
                break;

            case 1403:
                if (undo)
                {
                    InternalSetPoint(e.OldInt, new PointF(e.OldRect.X, e.OldRect.Y));
                }
                else
                {
                    InternalSetPoint(e.OldInt, new PointF(e.NewRect.X, e.NewRect.Y));
                }
                break;

            case 1412:
            {
                PointF[] points = (PointF[])e.GetValue(undo);
                SetPoints(points);
                break;
            }

            case 1414:
                Style = (GoPolygonStyle)e.GetValue(undo);
                break;

            default:
                base.ChangeValue(e, undo);
                break;
            }
        }