Ejemplo n.º 1
0
        private void propetiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ViewProperties vp = new ViewProperties(axPXV_Control1);
            vp.workspace_ob = workspace_ob;
            vp.ShowDialog();
            workspace_ob = vp.workspace_ob;

            if (workspace_ob.field_ex.width > 20)
            {
                hScrollBar1.Visible = true;
                hScrollBar1.Minimum = 1;
                hScrollBar1.Maximum = (workspace_ob.field_ex.width - 18) * 5;
            }
            else
                hScrollBar1.Visible = false;

            if (workspace_ob.field_ex.heigth > 20)
            {
                vScrollBar1.Visible = true;
                vScrollBar1.Minimum = 1;
                vScrollBar1.Maximum = (workspace_ob.field_ex.heigth - 18) * 5;
            }
            else
                vScrollBar1.Visible = false;

            if (workspace_ob.field_ex.width <= 20 && workspace_ob.field_ex.heigth > workspace_ob.field_ex.width)
            {
                vScrollBar1.Visible = true;
                vScrollBar1.Minimum = 1;
                vScrollBar1.Maximum = (workspace_ob.field_ex.heigth - workspace_ob.field_ex.width + 2) * 5;
            }
            Refresh();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ViewProperties vp = new ViewProperties(axPXV_Control1, true);
            vp.workspace_ob = workspace_ob;
            
            vp.ShowDialog();
            workspace_ob = vp.workspace_ob;

            if (workspace_ob.field_ex.width > 20)
            {
                hScrollBar1.Visible = true;
                hScrollBar1.Minimum = 1;
                hScrollBar1.Maximum = (workspace_ob.field_ex.width - 18) * 5;
            }
            else
                hScrollBar1.Visible = false;

            if (workspace_ob.field_ex.heigth > 20)
            {
                vScrollBar1.Visible = true;
                vScrollBar1.Minimum = 1;
                vScrollBar1.Maximum = (workspace_ob.field_ex.heigth - 18) * 5;
            }
            else
                vScrollBar1.Visible = false;

            if (workspace_ob.field_ex.width <= 20 && workspace_ob.field_ex.heigth > workspace_ob.field_ex.width)
            {
                vScrollBar1.Visible = true;
                vScrollBar1.Minimum = 1;
                vScrollBar1.Maximum = (workspace_ob.field_ex.heigth - workspace_ob.field_ex.width + 2) * 5;
            }
            if (workspace_ob.activationKey != "")
                groupBox_demo.Visible = false;
            Refresh();
        }