Convert Php Class File To .net

Convert Php Class File To .net
I have a PHP class file that is about 316 lines long that I need to have converted to ASP.NET 2.0 C#. It MUST be ASP.NET 2.0 C# — I have run into too many instances of getting the wrong .NET version or codebehind language when posting files on here, so PLEASE be sure you understand what I am asking for.

Basically, in PHP, this script loads an XML file – loops through the nodes of that XML file to get the proper imagery and pdf file names – copies those files to a directory – outputs the information into a command line so that a Flex compiler can create a SWF file.

I need this to be turned around fairly quicky – early next week if possible…I don’t think it should take too much time for someone familiar with both Object Oriented PHP and ASP.NET C#.

Here is a snippet of the code (the first 100 lines) for you to place bids against(certain necessary characters have been stripped to not violate Scriptlance’s terms and conditions)…

/**
* Class file for generating the compiled SWF file from the SlideShowModule Flex project
* that is used for the AIR application.
*/

/*
* Define constants for the script to use in compiling the slide show modules.
* The double slashes (\\) are only an escaping feature of PHP…other scripting
* languages may not need this.
*/
define(‘SDK_PATH’, ‘C:\\Flex\\sdks\\3.4.0’);
// compiler command.
define(‘COMPILER_EXE’, SDK_PATH . ‘\\bin\\mxmlc.exe’);
// The passed Customer Number do we can get the directory
define(‘CUSTOMER_NUM’, $_GET[‘custnum’]);
// Where the project itself lives.
define(‘PROJECT_PATH’, ‘C:\Inetpub\wwwroot\dev.com\web\Wizard’);
// Where all of the images and other embedded assets will be copied to before compiling.
define(‘PROJECT_ASSET_DIR’, PROJECT_PATH . ‘\\PresoFiles\\’ . CUSTOMER_NUM . ‘\\assets’);
// This is the file that will be built before the module is compiled so we can dynamically (sort of anyway) embed the assets.
define(‘CLASS_FILE’, PROJECT_PATH . ‘\\SlideShowModules\\src\\net\\slideshow\\EmbeddedAssets.as’);
// This is the directory where the images and agreement PDF file are stored after the wizard creates them.
define(‘ASSET_DIR’, PROJECT_PATH . ‘\\PresoFiles\\’ . CUSTOMER_NUM . ‘\\compiled’);
// Where we will put the completed SWF module for download by the user.
define(‘OUTPUT_PATH’, ‘C:\\temp\\Release Builds’);

class SlideShowCreator
{
// Filename that will be used in the Actionscript Embed statement and to process all of the files
private $_xmlFile;

// The file name for the media agreement PDF file.
private $_agreementFile;

// Array to hold any errors that are encountered during the creation of the slide show so it can be reported/logged. This is read-only
// This is a read-only var accessed via the getErrors() function
private $_errors = array();

// SimpleXML object containing the slide elements.
private $_slides = array();

// Holds the text used in the Actionscript EmbeddedAssets file.
private $_asClass;

private $_outputFile;

/**
* Constructor
*
* param string $xmlFile XML file containing the slide show data.
*/
public function __construct($xmlFile)
{
$this->_xmlFile = $xmlFile;
$this->_load();
}

Leave a Reply

Your email address will not be published. Required fields are marked *