예제 #1
0
        public override string ToString()
        {
            string desc = "";

            if (ForcedEntity != null)
            {
                desc += ForcedEntity.Description;
            }
            else if (AutoEntity != null)
            {
                desc += AutoEntity.Description;
            }
            else
            {
                desc = Description;
            }

            if (ForcedType != null)
            {
                desc += string.Format(" ({0})", ForcedType.Description);
            }
            else if (ForcedEntity != null)
            {
                desc += string.Format(" ({0})", ForcedEntity.Type.Description);
            }
            else if (AutoEntity != null)
            {
                desc += string.Format(" ({0})", AutoEntity.Type.Description);
            }

            return(string.Format("{0} ({1}) - {2}", OperationMove.ToString(), CurrentBalance.ToString(), desc));
        }
예제 #2
0
        public CtrlToolMove()
        {
            InitializeComponent();

            var roi = Program.FrmMain.ROI;

            Operation = new OperationMove(roi.IsEmpty ? Program.SlicerFile.LayerManager.BoundingRectangle : roi, (uint)Program.FrmMain.ActualLayerImage.Width,
                                          (uint)Program.FrmMain.ActualLayerImage.Height);
            SetOperation(Operation);

            radioButtons = new[]
            {
                rbAnchorTopLeft, rbAnchorTopCenter, rbAnchorTopRight,
                rbAnchorMiddleLeft, rbAnchorMiddleCenter, rbAnchorMiddleRight,
                rbAnchorBottomLeft, rbAnchorBottomCenter, rbAnchorBottomRight
            };

            cbMoveType.SelectedIndex = 0;
            ExtraActionCall(this);
        }
예제 #3
0
 public ToolMoveControl()
 {
     InitializeComponent();
     BaseOperation = Operation = new OperationMove();
     DataContext   = this;
 }