Beispiel #1
0
        void WfIniUcPanel(ady_tb pAdyModel)
        {
            UcTransparentPanel panel = new UcTransparentPanel();

            panel.Name        = pAdyModel.ady03.ToString(); //以adg03 程式代號做識別
            panel.BorderStyle = BorderStyle.None;

            panel.Location    = new Point(pAdyModel.ady04, pAdyModel.ady05);
            panel.Size        = new Size(pAdyModel.ady06, pAdyModel.ady07);
            panel.MouseLeave += panel_MouseLeave;
            panel.MouseEnter += panel_MouseEnter;
            panel.MouseClick += panel_MouseClick;
            panel.Cursor      = Cursors.Hand;
            panel.AllowResize = false;

            //Label label = new Label();
            //label.Text = panel.Name;
            //label.BackColor = Color.White;
            //label.AutoSize = true;

            //panel.Controls.Add(label);
            pnlFlow.Controls.Add(panel);
            panel.BringToFront();

            panel.Refresh();
        }
Beispiel #2
0
        void WfIniUcPanel(vw_admi611s pDetailModel)
        {
            UcTransparentPanel panel = new UcTransparentPanel();

            panel.Name        = pDetailModel.ady02.ToString(); //以序號做識別
            panel.BorderStyle = BorderStyle.Fixed3D;
            panel.BorderColor = Color.White;
            panel.Location    = new Point(pDetailModel.ady04, pDetailModel.ady05);
            panel.Size        = new Size(pDetailModel.ady06, pDetailModel.ady07);

            panel.MouseDown        += panel_MouseDown;
            panel.MouseMove        += panel_MouseMove;
            panel.MouseUp          += panel_MouseUp;
            panel.MouseDoubleClick += panel_MouseDoubleClick;
            panel.Resize           += panel_Resize;
            panel.MouseHover       += panel_MouseHover;
            panel.MouseLeave       += panel_MouseLeave;
            panel.AllowResize       = true;

            Label label = new Label();

            label.Text      = panel.Name;
            label.BackColor = Color.White;
            label.AutoSize  = true;

            panel.Controls.Add(label);
            pnl_adx03.Controls.Add(panel);
            panel.BringToFront();

            panel.Refresh();
        }