﻿//version:1.0
//published by:Microsoft
//company:http://www.microsoft.com
//description:OOB Suspend Activity
//assembly:System.Workflow.Activities.dll

function SuspendActivity(element) {
	this.element = element
	element.innerHTML = "<table class='activitytable' height='100%'><tr><td valign='center'><img src='"+SuspendActivity.GetToolboxIcon()+"'></td><td valign='center'><DIV id='"+element.id+"_id' class='idlabel'>"+element.id+"</DIV></td><td align='right' class='jacks'></td></tr></table>"	
	this.group = Quanticks.drag().createSimpleActivity(element)
	this.Properties = new Array()
	this.RegisteredProperties = new Array()
	this.RegisteredProperties[0] = "Name"
	this.RegisteredProperties[1] = "Description"
	this.RegisteredProperties[2] = "Enabled"	
	this.RegisteredProperties[3] = "Error"
	this.BindableProperties = new Array()
	this.BindableProperties[0] = "Error"	
	this.ActWidth = 100
	this.BlockWidth = 100	
}

SuspendActivity.GetToolboxIcon = function()
{
    return "http://netfxlive.com/images/suspend.GIF";
}

SuspendActivity.prototype = {
    Initialize : function()
    {
            AddJacks(this);    
    },
    
    Serialize : function()
    {
        var activityFactory = Quanticks.activityFactory()
        var result = "";
        result += "<SuspendActivity "
        for (var propi = 0;propi<this.RegisteredProperties.length;propi++)
        {
            if (this.RegisteredProperties[propi]=="Name")
                result += "x:";
            if (typeof this.Properties[this.RegisteredProperties[propi]] != "undefined" && this.Properties[this.RegisteredProperties[propi]]!="")
                result += this.RegisteredProperties[propi]+"=\""+this.Properties[this.RegisteredProperties[propi]]+"\" ";
        }
        result += "/>\n"            
        return result
    }    
    
}




