Compartilhar via


Creating a Custom Resource File

Applies To: System Center 2012 - Orchestrator, System Center 2012 R2 Orchestrator, System Center 2012 SP1 - Orchestrator

One key to a professional-looking Integration Pack is a set of customized icons for the IP category and its activities. Icons in an Integration Pack are provided through a custom resource assembly that can be created using the following process.

Creating Icon Graphics

To create icons, you start with a set of bitmap (.BMP) files representing the icons you want. Each icon needed for the IP and activities needs to be supplied in two sizes: 16x16 and 32x32. You can use your favorite graphics editor to create the icons, just follow these guidelines:

  • The transparency color for Orchestrator icons is black (0,0,0). If your icons contain black that is not intended to be transparent, you should change those areas to near-black (15,15,15). Visually, these will still appear to be black but will not be rendered as transparent. This is a key difference between Orchestrator and other products that typically use magenta as their transparency color.

  • You should not use a colored background (white or otherwise). Colored backgrounds may reproduce well with one certain desktop color, but may not reproduce well on other backgrounds. Your icon needs to be “portable” across different aspects of the product, so transparent backgrounds are better.

  • Do not use text in an icon, since your IP may be used in many different locales, and putting words in graphics prevents localization.

  • Try to utilize the same “verb” and “noun” graphics that other activities use for the same type of actions. Consistency across activities is a key customer benefit and helps them understand what your activities do just by looking at them.

  • If your activities represent a theme, or perform actions with a specific product, it’s ok to have a “theme” for your icons. That may be a consistent “noun” icon that represents the product, or it might be a product logo (make sure you have rights to use it and it displays well at 32x32 and 16x16), or it might be a colored base icon (see the new generic activity icons in the Integration Toolkit for examples).

  • Be sure to check out how your icons look once they’ve been implemented to check for any fuzziness (which can happen around shading and transparency edges), and fine tune them as needed.

Creating the Resource Assembly

The assembly used for icons is a C++ Win32 assembly. To create the assembly, you create a new Win32 project using Visual Studio.

To create the assembly:

  1. In Visual Studio, click File > New > Project. This opens the New Project dialog.

  2. Select the Visual C++ > Win32 template category in the left pane. Select Win32 Project as the project type in the center pane, and set the .NET Framework version to .NET Framework 4.

  3. Provide a project name and path and click OK. The Win32 Application Wizard launches.

  4. Click Next on the first page of the Wizard.

  5. On the Application Settings page, select DLL under Application Type, then click Finish. The C++ project is created.

  6. Using Windows Explorer, add a folder named Resources under the project directory and copy into that folder all of the BMP files you want to use as icons.

  7. In Visual Studio, within Solution Explorer, right-click the Resource Files folder of the project and select Add > Resource.

  8. Select Bitmap and then click the Import button.

  9. Browse to the Resources folder you created in step 6, select all of the BMP files and click Open. The bitmap files are added to the Resource Files folder in the project.

  10. Right-click the <project name>.rc file located in the Resource Files folder and select View code. The .rc file opens.

  11. Modify the identifiers of all the bitmaps so that they end in “_16” or “_32” corresponding to the bitmap sizes. The content should appear similar to the section shown below.

    GenericActivity_16   BITMAP      "Resources\\GenericActivity_16.bmp"
    GenericActivity_32   BITMAP      "Resources\\GenericActivity_16.bmp"
    Add_16               BITMAP      "Resources\\GenericActivity_Add_16.bmp"
    Add_32               BITMAP      "Resources\\GenericActivity_Add_32.bmp"
    Alert_16             BITMAP      "Resources\\GenericActivity_Alert_16.bmp"
    Alert_32             BITMAP      "Resources\\GenericActivity_Alert_32.bmp"
    Approve_16           BITMAP      "Resources\\GenericActivity_Approve_16.bmp"
    Approve_32           BITMAP      "Resources\\GenericActivity_Approve_32.bmp"
    Cancel_16            BITMAP      "Resources\\GenericActivity_Cancel_16.bmp"
    Cancel_32            BITMAP      "Resources\\GenericActivity_Cancel_32.bmp"
    Categorize_16        BITMAP      "Resources\\GenericActivity_Categorize_16.bmp"
    Categorize_32        BITMAP      "Resources\\GenericActivity_Categorize_32.bmp"
    Configure_16         BITMAP      "Resources\\GenericActivity_Configure_16.bmp"
    Configure_32         BITMAP      "Resources\\GenericActivity_Configure_32.bmp"
    Connect_16           BITMAP      "Resources\\GenericActivity_Connect_16.bmp"
    Connect_32           BITMAP      "Resources\\GenericActivity_Connect_32.bmp"
    Copy_16              BITMAP      "Resources\\GenericActivity_Copy_16.bmp"
    Copy_32              BITMAP      "Resources\\GenericActivity_Copy_32.bmp"
    Critical_16          BITMAP      "Resources\\GenericActivity_Critical_16.bmp"
    Critical_32          BITMAP      "Resources\\GenericActivity_Critical_32.bmp"
    

    Important

    You must rename the identifiers this way or the icons will not be found and displayed by Orchestrator.

  12. Save your changes to the project and build it. The .DLL file created can now be used as a replacement resource file for your Integration Pack. Just specify your new assembly and you’ll have access to the custom icons.

Using this process, you can create unique, custom icons for your Integration Packs and make them look more professional and stand out from other activities. To help you in creating custom activity icons, we have a library of “icon building blocks” that you can use to create custom icons using standard “verb” icons with base graphics and just add your own “noun” graphics. The graphics library is located on the Orchestrator CodePlex site.