//version:1.0
//published by:Ghenadie
//company:http://netfxlive.com
//description:
//assembly:GetTraffic.dll
//namespace:TrafficActivities

function GetTraffic(element) {
	this.element = element
	element.innerHTML = "<table class='activitytable' height='100%'><tr><td valign='center'><img src='"+GetTraffic.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] = "Address"
this.RegisteredProperties[4] = "City"
this.RegisteredProperties[5] = "State"
this.RegisteredProperties[6] = "Result"

	this.BindableProperties = new Array()
	this.BindableProperties[0] = "Address"
this.BindableProperties[1] = "City"
this.BindableProperties[2] = "State"
this.BindableProperties[3] = "Result"
	
	this.ActWidth = 100
	this.BlockWidth = 100	
}

GetTraffic.GetToolboxIcon = function()
{
    return "http://netfxlive.com/images/traffic.GIF";
}

GetTraffic.prototype = {
    Initialize : function()
    {
                AddJacks(this);
    },
    
    Serialize : function()
    {
        var nsIndex = namespaces.length+1;
        namespaces[namespaces.length] = "xmlns:ns"+nsIndex+"=\"clr-namespace:TrafficActivities;Assembly=GetTraffic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\"";
        var activityFactory = Quanticks.activityFactory()
        var result = "";
        result += "<ns"+nsIndex+":GetTraffic "
        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
    }    
    
}



