Before sending data to Tanuden TIMS API, your application will need to register itself before the Tanuden Console is initialized before the connection code is submitted.
Registration
For C# console applications, it is recommended that you run this method once your application is executed.
For Windows forms and applications with a UI, you may run this method when the application is executed or when a button is pressed.
varpluginMetadata=newTanuden.Common.PluginMeta(){Uid="tanuden.tims.api.testconsoleapp",Name="Test Console App",Version="1.0.0",Author="Haruyuki Tanukiji",Description="This is a demo plugin that connects with Tanuden TIMS API"};TanudenTIMSAPI.Init(pluginMetadata);
You should change the properties in the PluginMeta class accordingly.
The Uid variable must all be lowercase and cannot contain any special characters other than underscore.
This method must be successfully executed before the Tanuden Console passes the connection code screen. Otherwise, registration will fail.
Wait for API
There may be situations where the user may execute your application before starting the Tanuden Console. You may use the following method to pause the execution flow of your application and wait for the Tanuden Console to be started.
Take note that this function will forever halt your application execution flow if it is unable to connect to the Tanuden Console.