• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
      • Introduction to Data Entry
      • Data Entry Application
      • Data Entry Editing
      • CAPI Data Entry
        • Introduction to CAPI
        • CAPI Features
        • Capture Types
        • Questions
        • Multimedia
        • CAPI Strategies
        • How to ...
          • Create a New CAPI Application
          • Organize Forms
          • Add Resources
          • Structure Movement
          • Show Values for Selection
          • Handle Multiple Answers
          • Choose Topic Sections
          • Create General Helps
          • Test Application
      • Network Data Entry
      • Android Data Entry
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Resources

Overview
There may be times, when deploying an application, especially to a mobile device, that you will want to include some auxiliary files that the application uses. Such files might include lookup files or value set images. To simplify the deployment of such an application, these files can be packaged in with the data entry .pen file. The files will be compressed in the .pen file and then decompressed when the user opens the application. CSPro will recreate the directory structure that existed on the device that created the .pen file. Files that already exist on the device will be overwritten only if the timestamp of the .pen file is newer than the timestamp of the file on the device.
When decompressing data on mobile devices, files will only be saved in the csentry directory or in any of its subdirectories.
To add a resource directory or file, open the File menu and select Manage Application Files. You can add a resource by selecting Add File and then selecting Resource (Directory) or Resource (File). Your application may have more than one resource. If you want to remove a resource, select the resource and select Remove File.
By default, all files in a resource directory, and its subdirectories, will be included in the .pen file, so it is important to think about how to structure your data entry application so that only relevant files are bundled together in the .pen file. You might, for example, have an Images directory where you put all the value set images that your application uses.
Resource Properties
Resource properties include:
Include Resource(s) in the Compiled Application
When true, the resources are built into the compiled application (.pen). This facilitates the deployment of an application to another computer or a mobile device. The default value is true.
Includes Files in Directory and Subdirectories (Recursive)
This property, which applies only to resource directories, indicates that in addition to the files in the directory, that files in subdirectories should also be treated as resources. The default value is true.
Filename Filter(s)
This property, which applies only to resource directories, specifies a wildcard filter that will be used when determining what files in the directory are treated as resources. The default value is blank, which means all files. When set, the filter does not apply to a path's directory but only its name component. For example, "*.csdb" would include only the paths of CSPro DB data sources. You can specify multiple wildcard filters by separating each filter with a semicolon. The filter "*.jpg;*.jpeg;*.bmp" would include both JPEG and BMP files. In addition to standard wildcard filters, you can use a predefined wildcard expression, specified with the "|" prefix:
  • "|FileType.Audio": Files that the Audio object can read and write.
  • "|FileType.Geometry": Files that the Geometry object can read and write.
  • "|FileType.Image": Files that the Image object can read and write.
By clicking on the Calculate Resource Files button when viewing a resource directory, you can see what files will be treated as resources based on the recursive and filter properties.
See also: Lookup Files, Value Set Images, Manage Application Files