|
|
|
Plugins compiled for Centrafuse reference the CFPlugin dll, included in this SDK in the root directory. The CFPlugin dll provides the developer with all of the necessary interfaces and classes to create functional pieces to work in conjunction with Centrafuse software. For example, popular plugins that already exist are SkinBrowser, LogoDashboard, and FileSync. Satellite Radio is also implemented in CF as a plugin. Radio support is added through use of a plugin. Basically anything a developer can imagine can be added to CF.
A Visual Studio Solution file containing all projects in the SDK can be found in the root SDK directory. This solution file contains references to all plugin examples, all languages, and the Flash plugin project.
CFSetup also abides by this convention.
Static classes such as Win32 and CFTools are also part of the useable API.
| Content | Directory Location |
| Microsoft HTML Help Document | /SDKROOT/Doc |
| HTML Documentation | /SDKROOT/Doc/html |
| Examples | /SDKROOT/Examples |
| Example Source Code | /SDKROOT/Examples/Source |
| Example Compiled Binaries | /SDKROOT/Examples/Binary |
| 3rd Party Applications | /SDKROOT/3rdPartyApps |
| Flash/Shockwave Plugin SDK | /SDKROOT/Flash |
| Graphics Files and PSD's | /SDKROOT/Graphics |
The contents of the "Doc" folder contains 2 forms of documentation for the CF SDK, a microsoft help compiled chm file, and plain vanilla html documentation, located in the html subfolder.
The contents of the "Examples" folder are sample applications plugins written for Centrafuse. The goal of the Examples directory is to provide sample plugins in various languages. C#, VB, C++, and Delphi are target languages to provide examples for, although as of the initial release, only C# examples are included. Stay tuned for future releases for additional examples and using other languages other than C#.
The contents of the "Flash" folder is a simple SDK to develop flash movies that can communicate with Centrafuse. Already provided are working examples, flash project files, project files for the class library interface, and sample flash movies to use.
The contents of the "Graphics" folder are graphics files that can be used in creating plugins to match the default CF skin, Aura.
The contents of the "3rdPartyApps" folder are applications written by 3rd parties for use in developing CF plugins, and testing hardware that CF is compatible with. These applications are not supported by Flux Media, and should be used at your own discretion.
public HelloWorld() { // When set to true all system audio will be paused when the plugin is shown. The main title, // position,and status labels will be cleared and can be populated by the plugin. this.CF_pluginPauseAudioFlag = false; // The plugin name should have a matching section in the skin.xml file. this.CF_pluginName = "HELLOWORLD"; // Sets the plugin to be a GUI plugin. Only GUI plugins are available button actions. this.CF_pluginIsGUI = true; // Set Settings flags, show in basic settings and advanced settings this.CF_pluginHasSettings = true; this.CF_pluginHasBasicSettings = true; // Create XML Configuration if not exists AddConfigXml(); }
public override void CF_pluginInit() { CFTools.writeModuleLog("HelloWorld: CF_pluginInit", LogFilePath); try { // loads Settings LoadSettings(); // add event handlers for keyboard and power mode change this.CF_Event_powerModeChanged +=new Microsoft.Win32.PowerModeChangedEventHandler(HelloWorld_CF_Event_powerModeChanged); this.KeyDown += new KeyEventHandler(HelloWorld_KeyDown); } catch(Exception errmsg) { CFTools.writeError(errmsg.ToString()); } }
public override DialogResult CF_pluginShowSetup() { CFTools.writeModuleLog("HelloWorld: CF_pluginShowSetup", LogFilePath); // Return DialogResult.OK for the main application to update from plugin changes. DialogResult returnvalue = DialogResult.Cancel; try { // Creates a new plugin setup instance. If you create a CFDialog or CFSetup you must // set its MainForm property to the main plugins MainForm property. Setup setup = new Setup(); setup.MainForm = this.MainForm; setup.setupSection(); returnvalue = setup.ShowDialog(); if (returnvalue == DialogResult.OK) { // add code here for saving the modified settings // Reloads plugin configuration. LoadSettings(); } setup.Close(); setup = null; } catch(Exception errmsg) { CFTools.writeError(errmsg.ToString()); } return returnvalue; }
private void HelloWorld_BTN5_Click(object sender, MouseEventArgs e) { // The Button #5 has been clicked... CFTools.writeModuleLog("HelloWorld: BTN5 clicked.", LogFilePath); try { // Display a status box that will autohide this.CF_systemCommand(CF_Actions.SHOWINFO, "Status Info Text", "AUTOHIDE"); } catch (Exception errmsg) { CFTools.writeError(errmsg.ToString()); } }
The CF_systemCommand() function is also used in Plugin-to-Plugin communication to issue commands to any running Centrafuse Plugins.
| Copyright © 2008 Flux Media, Inc. (U.S. Copyright Registration Number: TXu-1-239-794) |
|