예제 #1
0
 public static ActionClass Instance()
 {
     if (instance == null)
     {
         lock (_lock_this)
         {
             instance = new ActionClass();
         }
     }
     return(instance);
 }
예제 #2
0
        /*
         * public DrawLine(int i)
         * {
         *          Graphics g;
         *
         *          g = pbDesign.CreateGraphics();
         *
         *          Pen myPen = new Pen(Color.Red);
         *          myPen.Width = 4;
         *          myPen.StartCap = System.Drawing.Drawing2D.LineCap.Round;
         *          myPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
         *          g.DrawLine(myPen, ob_s.Location.X, ob_s.Location.Y,ob_e.Location.X, ob_e.Location.Y);
         * }
         */
        private void hotSpot1_Click(object sender, EventArgs e)
        {
            ActionClass.Instance().Clear();

            Point absoff = new Point
            {
                X = 0,
                Y = 32  // Location plus Fenstertitelrand
            };


            UIDesignTableClass tc = new UIDesignTableClass(pbDesign, "test");

            ActTable = tc;
        }
예제 #3
0
        /*
         * public DrawLine(int i)
         * {
         *          Graphics g;
         *
         *          g = pbDesign.CreateGraphics();
         *
         *          Pen myPen = new Pen(Color.Red);
         *          myPen.Width = 4;
         *          myPen.StartCap = System.Drawing.Drawing2D.LineCap.Round;
         *          myPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
         *          g.DrawLine(myPen, ob_s.Location.X, ob_s.Location.Y,ob_e.Location.X, ob_e.Location.Y);
         * }
         */
        private void hotSpot1_Click(object sender, EventArgs e)
        {
            ActionClass.Instance().Clear();


            int offsetx = this.Left;
            int offsety = this.Top;

            Point absoff = new Point();

            absoff.X = 0;
            absoff.Y = 32;  // Location plus Fenstertitelrand


            DesignTableClass tc = new DesignTableClass(pbDesign, "test");

            ActTable = tc;
        }
예제 #4
0
        public UIDesignTableClass(Control frm, string name, bool show = true, int x = 50, int y = 50)
        {
            Location = new Point(x, y);
            Name     = name;
            _action  = new ActionClass {
                parent = frm
            };
            _action.SetAbsoluteOffset(_absoluteOffset);

            _action.action   = eAction.None;
            PForm            = frm;
            PForm.MouseMove += Form_MouseMove;
            PForm.MouseUp   += Form_MouseUp;

            InitializeComponent();
            _pnlTableBottomRight.MouseUp    += Form_MouseUp;
            _pnlTableBottomRight.MouseMove  += Table_MouseMove;
            _pnlTableBottomRight.MouseClick += PnlTableBottom_MouseClick;
            _pnlTableBottomRight.MouseDown  += PnlTableBottom_MouseDown;
            _action.hotspot   = _pnlTableBottomRight;
            _action.mainctrl  = _gbTable;
            _tsmiMinimize.Tag = eTableType.Autosize;
            _gbTable.Left     = x;
            _gbTable.Top      = y;
            _gbTable.Text     = "";
            _txtCaption.Text  = name;

            _action.last_local_position   = _gbTable.Location;
            _action.last_local_dimensions = _gbTable.Size;
            _action.DrawLastMove();

            if (show)
            {
                _action.Show();
            }
            else
            {
                _action.Hide();
            }
            _pnlTableBottom.Height = 14;
            _gbTable.Refresh();
        }