Exemple #1
0
        public void OpenFile(string fileName)
        {
            int nID = Inst.Str2ID("op.openDoc", false);

            PDFXEdit.IOperation Op     = Inst.CreateOp(nID);
            PDFXEdit.IAFS_Inst  fsInst = (PDFXEdit.IAFS_Inst)Inst.GetExtension("AFS");
            PDFXEdit.IAFS_Name  name   = fsInst.DefaultFileSys.StringToName(fileName);
            var input = Op.Params.Root["Input"];

            input.v = name;
            PDFXEdit.ICabNode options = Op.Params.Root["Options"];
            options["NativeOnly"].v = true;
            Op.Do();

            m_doc?.Close();
            m_doc = null;
            m_doc = (PDFXEdit.IPXC_Document)Op.Params.Root["Output"].v;
            OpenFile(m_doc);
        }
Exemple #2
0
        public void LoadInst(IPXV_Inst inst)
        {
            Inst = inst;

            IUIX_Inst uiInst = (IUIX_Inst)Inst.GetExtension("UIX");
            Rectangle rcCl   = ClientRectangle;
            tagRECT   rc;

            rc.left   = rcCl.Left;
            rc.top    = rcCl.Top;
            rc.right  = rcCl.Right;
            rc.bottom = rcCl.Bottom;

            UIX_CreateObjParams cp = new UIX_CreateObjParams();

            cp.nStdClass  = (int)UIX_StdClasses.UIX_StdClass_Blank;
            cp.hWndParent = (uint)Handle.ToInt32();
            cp.rc         = rc;
            parentBase    = uiInst.CreateObj(ref cp);

            pagesPreviewCtl = Inst.CreatePagesPreviewCtl(parentBase, rc, "ctrl.01",
                                                         (long)PXV_PagesPreviewStyleFlags.PXV_PagesPreviewStyle_NoHandTool | (long)PXV_PagesPreviewStyleFlags.PXV_PagesPreviewStyle_NonInertialHand | (long)PXV_PagesPreviewStyleFlags.PXV_PagesPreviewStyle_InteractiveLayout,
                                                         (long)UIX_ScrollStyleFlags.UIX_ScrollStyle_Horz | (long)UIX_ScrollStyleFlags.UIX_ScrollStyle_Vert);
        }
Exemple #3
0
 public CmdBarTree(IPXV_Inst Inst, ref MyTreeView Tree)
 {
     m_Inst   = Inst;
     m_uiInst = (IUIX_Inst)Inst.GetExtension("UIX");
     m_Tree   = Tree;
 }