RegisterAllStepFlow.prototype._SaveRegisterToOpcuaSaveProject_ = function(that)
{
	var xotree = new XML.ObjTree();
	var OpcUaLocalServerXml = xotree.writeXML(Global_OpcUaLocalServer);

	var Result_1={"Input":null}, Result_2={"Input":null};

	var Class_1 = new Transmission();
	Class_1.TransmissionArray("SaveOpcUaLocalServer", new Array(OpcUaLocalServerXml), Result_1);

	var Class_2 = new RegisterModuleFirstPage();
	Class_2.SaveDataLayerAndServiceLayerVariables(Result_2);

	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true && Result_2["Input"]==true)
		{
			Class_1 = null;  delete Class_1;
			Class_2 = null;  delete Class_2;
			RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllXmlFile_(that);
			clearInterval(SetInterval);
		}
	},500);
};
/*RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllXmlFile_ = function(that)
{
	var Class = new ControllerServiceSetting();
	var Result_1={"Input":null};
	Class.SaveServiceXml(Result_1);
	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true)
		{
			Class = null;  delete Class;
			$(that).closest('.Row').find(".BigLoading").hide();
			var StepFlowClass = new StepFlow();
			StepFlowClass.UnLockAllUi();
			clearInterval(SetInterval);
		}
	},500);
};
*/



RegisterAllStepFlow.prototype._ClickRegisterModule_ = function(that)
{
	var Class = new StepFlow();
	var TopMenuId="Top-Menu-ModuleSetting", LeftListId="Left-List-Register";
	StepFlow.prototype._ClickElement_(that, TopMenuId, LeftListId);
	StepFlow.prototype._DisableElement_(TopMenuId, LeftListId);
};




RegisterAllStepFlow.prototype._SaveRegisterToOpcua_ = function(that)
{
	$(that).closest('.Row').find(".BigLoading").show();
	var Class = new StepFlow();
	Class.LockAllUi();
	var Result_1={"Input":null};
	RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllJsonFile_(Result_1);
 	var SetInterval = setInterval(function()
 	{
 		if(Result_1["Input"]==true)
 		{
 			RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllXmlFile_(that);
			clearInterval(SetInterval);
 		}
	},500);
};
RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllJsonFile_ = function(Result)
{
	var Result_1={"Input":null};
	var Class = new RegisterModuleFirstPage();
	Class.SaveDataLayerAndServiceLayerVariables(Result_1);
	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true)
		{
			Class_1 = null;  delete Class_1;
			Class_2 = null;  delete Class_2;
			Result["Input"] = true;
			clearInterval(SetInterval);
		}
	},500);
}
RegisterAllStepFlow.prototype._ClickRegisterToOpcua_ = function(that)
{
	var Class = new StepFlow();
	var TopMenuId="Top-Menu-ConvertTransmission", LeftListId="Left-List-RegisterToOpcua";
	StepFlow.prototype._ClickElement_(that, TopMenuId, LeftListId);
	StepFlow.prototype._DisableElement_(TopMenuId, LeftListId);
};
RegisterAllStepFlow.prototype._SaveRegisterToOpcuaAllXmlFile_ = function(that)
{
	var xotree = new XML.ObjTree();
	var OpcUaLocalServerXml = xotree.writeXML(Global_OpcUaLocalServer);
	var Class = new JsonTransformXml();
	var UAServerDataXml = Class.TransformUAServerDataXml();
	var VariableXml = Class.TransformVariableXml();
	//Class = new EipJsonTransformXml();
	//var EipDir = Class.ICPDASEIPDri();

	var Result_1={"Input":null}, Result_2={"Input":null}, Result_3={"Input":null}, Result_4={"Input":null};
	var Result_5={"Input":null};
	Class = new Transmission();
	Class.TransmissionArray("SaveOpcUaLocalServer", new Array(OpcUaLocalServerXml), Result_1);
	Class.TransmissionString("SaveUAServerDataXml", UAServerDataXml, Result_2);
	Class.TransmissionString("SaveVariableTableXml", VariableXml, Result_3);
	//Class.TransmissionString("SaveEipDri", EipDir, Result_4);
	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true && Result_2["Input"]==true && Result_3["Input"]==true)
		{
			$(that).closest('.Row').find(".BigLoading").hide();
			var Class = new StepFlow();
			Class.UnLockAllUi();
			clearInterval(SetInterval);
		}
	},500);
}















































EipAllStepFlow.prototype._ClickEipToMqtt_ = function(that)
{
	var Class = new StepFlow();
	var TopMenuId="Top-Menu-ConvertTransmission", LeftListId="Left-List-EipToMqtt";
	StepFlow.prototype._ClickElement_(that, TopMenuId, LeftListId);
	StepFlow.prototype._DisableElement_(TopMenuId, LeftListId);
};
//Eip To Mqtt
EipAllStepFlow.prototype._SaveEipToMqtt_ = function(that)
{
	$(that).closest('.Row').find(".BigLoading").show();
	var Class = new StepFlow();
	Class.LockAllUi();
	var Result_1={"Input":null};
	EipAllStepFlow.prototype._SaveEipToMqttAllJsonFile_(Result_1);
 	var SetInterval = setInterval(function()
 	{
 		if(Result_1["Input"]==true)
 		{
			EipAllStepFlow.prototype._SaveEipToMqttAllXmlFile_(that);
			clearInterval(SetInterval);
 		}
	},500);
};

EipAllStepFlow.prototype._SaveEipToMqttAllJsonFile_ = function(Result)
{
	var Result_1={"Input":null}, Result_2={"Input":null}, Result_3={"Input":null};
	var Class_1 = new Transmission();
	Class_1.TransmissionArray("SaveLocalBrokerSetting", Global_LocalBroker, Result_1);
	Class_1.TransmissionArray("SaveRemoteBrokerSetting", new Array(Global_RemoteBroker), Result_2);
	var Class_2 = new EipModuleFirstPage();
	Class_2.SaveDataLayerAndServiceLayerVariables(Result_3);
	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true && Result_2["Input"]==true && Result_3["Input"]==true)
		{
			Class_1 = null;  delete Class_1;
			Class_2 = null;  delete Class_2;
			Result["Input"] = true;
			clearInterval(SetInterval);
		}
	},500);
}

EipAllStepFlow.prototype._SaveEipToMqttAllXmlFile_ = function(that)
{
	var Class = new JsonTransformXml();
	var VariableXml = Class.TransformVariableXml();
	var MqttServiceXml = Class.TransformMqttServiceXml();
	Class = new EipJsonTransformXml();
	var EipDir = Class.ICPDASEIPDri();

	var Result_1={"Input":null}, Result_2={"Input":null}, Result_3={"Input":null};
	Class = new Transmission();

	Class.TransmissionString("SaveVariableTableXml", VariableXml, Result_1);
	Class.TransmissionString("SaveMQTTServiceXml", MqttServiceXml, Result_2);
	Class.TransmissionString("SaveEipDri", EipDir, Result_3);
	var SetInterval = setInterval(function()
	{
		if(Result_1["Input"]==true && Result_2["Input"]==true && Result_3["Input"]==true)
		{
			$(that).closest('.Row').find(".BigLoading").hide();
			var Class = new StepFlow();
			Class.UnLockAllUi();
			clearInterval(SetInterval);
		}
	},500);
}
//Eip To Opcua




