Option Compare Text
Imports Microsoft.VisualBasic
Imports System
Imports System.IO
Imports System.Collections.Generic
Imports System.Data

Imports JF.PlmJobManager.JobServer
Imports JF.Tools 


'' Information for developer:
'' All Lines with mark "##" should be edit by the developer

'' # ---------------------------------------------------------------------------------------
'' # Documentation:
'' # Description  : ## please add the description for this script in this line
'' # Parameters   : ## /Para1=MyPara1 /Para2=MyPara2  

'' # History:
'' # Date         Person        ChangeInfo
'' # ##12.04.2007 ##Developer   createt
'' # ---------------------------------------------------------------------------------------

Namespace Scripting
    Public Class ScriptingEngineClass

        Public Function ScriptMain(ByVal JS_ScriptingInterface As ScriptingInterface.Methodes) As JF_Return_cls

            ' Required class for returning script results
            Dim MyScriptReturn As New JF_Return_cls
            Dim MyCallReturn As New JF_Return_cls
            Dim TextStr As String = ""
            Dim I As Integer
			Dim I2 As Integer
			
            ' Example: using "standard form" for printing script informations 
            Dim MyScriptOutput_frm As JobServer_ScriptRun_frm
            MyScriptOutput_frm = New JobServer_ScriptRun_frm(JS_ScriptingInterface.ScriptDef)
            MyScriptOutput_frm.Show()

			' Example: handling Exeptions
			Try
		
				' Example: for printing Informations to the header textbox 
				MyScriptOutput_frm.InfoSysHeader.PrintInfoLine("Step - 1 Script started")
				MyScriptOutput_frm.InfoSysHeader.PrintInfoLine("Step - 2 ObjectsSetStatus_Via_List_lcls ausführen")
				
				Dim ObjectsSetStatus_Via_List_lcls As New ObjectsSetStatus_Via_List_cls( _
					MyScriptOutput_frm.InfoSysProtocol , _
					"TCENG", _
					"02")
	
				' ausführen import der Site Listen
				If ObjectsSetStatus_Via_List_lcls.FuncReturn.ReturnBol = True Then
					ObjectsSetStatus_Via_List_lcls.ObjectsSetStatus_Import()
				End If
				ObjectsSetStatus_Via_List_lcls = Nothing
	
					
				MyScriptOutput_frm.Pause("click me and script will continue")
	
			Catch ex As Exception
				MyScriptReturn.Ex = ex
				MyScriptReturn.ExMsg = "ScriptTemplate"
				MyScriptOutput_frm.InfoSysProtocol.PrintEx(ex, MyScriptReturn.ExMsg)
			End Try


			' Example: closing the ScriptRun form 
			MyScriptOutput_frm.Close()
			MyScriptOutput_frm.Dispose()

			Return MyScriptReturn
		End Function
	End Class
End Namespace
