コード例 #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (HASP_Lock.IsProfessional_StructuralVersion())
     {
         this.Close();
     }
 }
コード例 #2
0
        private void toolStrip_deign_Click(object sender, EventArgs e)
        {
            vdDocument VD = VDoc;

            //if (tc4.SelectedIndex == 1) VD = defDoc;
            //if (tc4.SelectedIndex == 1) VD = defDoc;

            ToolStripButton tsb = sender as ToolStripButton;

            if (tsb.Name.EndsWith("3D_rotate"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_Vrot(VD);
            }
            else if (tsb.Name.EndsWith("VTop"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VTop(VD);
            }
            else if (tsb.Name.EndsWith("VBot"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VBottom(VD);
            }
            else if (tsb.Name.EndsWith("VLeft"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VLeft(VD);
            }
            else if (tsb.Name.EndsWith("VRight"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VRight(VD);
            }
            else if (tsb.Name.EndsWith("VFront"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VFront(VD);
            }
            else if (tsb.Name.EndsWith("VBack"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VBack(VD);
            }
            else if (tsb.Name.EndsWith("VNE"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VINE(VD);
            }
            else if (tsb.Name.EndsWith("VNW"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VINW(VD);
            }
            else if (tsb.Name.EndsWith("VSE"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VISE(VD);
            }
            else if (tsb.Name.EndsWith("VSW"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VISW(VD);
            }
            else if (tsb.Name.EndsWith("ZoomA"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomA_Ex(VD);
            }
            else if (tsb.Name.EndsWith("ZoomE"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomE_Ex(VD);
            }
            else if (tsb.Name.EndsWith("ZoomP"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomP_Ex(VD);
            }

            else if (tsb.Name.EndsWith("ZoomW"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomW_Ex(VD);
            }

            else if (tsb.Name.EndsWith("ZoomIn"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomIn_Ex(VD);
            }
            else if (tsb.Name.EndsWith("ZoomOut"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomOut_Ex(VD);
            }

            else if (tsb.Name.EndsWith("Pan"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.PanEx(VD);
            }
            else if (tsb.Name.EndsWith("ShadeOn"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_ShadeOn(VD);
            }
            else if (tsb.Name.EndsWith("Wire"))
            {
                VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_Wire(VD);
            }
            else if (tsb.Name.EndsWith("Save"))
            {
                using (SaveFileDialog sfd = new SaveFileDialog())
                {
                    sfd.Filter = "VDML File (*.vdml)|*.vdml|DXF File (*.dxf)|*.dxf|DWG File (*.dwg)|*.dwg";
                    if (sfd.ShowDialog() != DialogResult.Cancel)
                    {
                        if (!HASP_Lock.IsProfessional_StructuralVersion_19())
                        {
                            MessageBox.Show("This function is not available in Demo version.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                        else
                        {
                            if (VD.SaveAs(sfd.FileName))
                            {
                                MessageBox.Show("File Saved successfully.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                        }
                    }
                }
            }
        }