示例#1
0
        private void OnMouseUp()
        {
            isMoving        = false;
            sizingDirection = SizingDirection.None;

            Point topLeft = PointToScreen(new Point(control.Left, control.Top));

            topLeft = Parent.PointToClient(topLeft);

            wixFiles.UndoManager.BeginNewCommandRange();

            AssignIfChanged(xmlNode.Attributes["Width"], DialogGenerator.PixelsToDialogUnitsWidth(control.Width));
            AssignIfChanged(xmlNode.Attributes["X"], DialogGenerator.PixelsToDialogUnitsWidth(topLeft.X));
            AssignIfChanged(xmlNode.Attributes["Height"], DialogGenerator.PixelsToDialogUnitsHeight(control.Height));
            AssignIfChanged(xmlNode.Attributes["Y"], DialogGenerator.PixelsToDialogUnitsHeight(topLeft.Y));

            if (ItemChanged != null)
            {
                ItemChanged(xmlNode);
            }
        }