Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit 10.0.1-prerelease.1

Prefix Reserved
This is a prerelease version of Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit --version 10.0.1-prerelease.1                
NuGet\Install-Package Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit -Version 10.0.1-prerelease.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit" Version="10.0.1-prerelease.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit --version 10.0.1-prerelease.1                
#r "nuget: Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit, 10.0.1-prerelease.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit as a Cake Addin
#addin nuget:?package=Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit&version=10.0.1-prerelease.1&prerelease

// Install Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit as a Cake Tool
#tool nuget:?package=Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit&version=10.0.1-prerelease.1&prerelease                

Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit

About

Quickly develop interactive automation scripts for DataMiner. This version is compatible with DataMiner 10.4.12 and up. This package provides an API that more closely resembles other desktop graphical user interface libraries. It builds upon the features available in Skyline.DataMiner.Automation and makes them easier to use.

using System;

using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Utils.InteractiveAutomationScript;

/// <summary>
///     DataMiner Script Class.
/// </summary>
public class Script
{
	/// <summary>
	///     The Script entry point.
	/// </summary>
	/// <param name="engine">Link with SLScripting process.</param>
	public void Run(Engine engine)
	{
		// DO NOT REMOVE THE COMMENTED OUT CODE BELOW OR THE SCRIPT WONT RUN!
		// Interactive scripts need to be launched differently.
		// This is determined by a simple string search looking for "engine.ShowUI" in the source code.
		// However, due to the NuGet package, this string can no longer be detected.
		// This comment is here as a temporary workaround until it has been fixed.
		//// engine.ShowUI(

		try
		{
			// Controls the event loop and switch between dialogs
			var controller = new InteractiveController(engine);

			// Create an instance of the dialog you wish to show.
			var helloWorldDialog = new HelloWorldDialog(engine);

			// Starts the event loop and shows the first dialog.
			controller.Run(helloWorldDialog);
		}
		catch (ScriptAbortException)
		{
			throw;
		}
		catch (ScriptForceAbortException)
		{
			throw;
		}
		catch (ScriptTimeoutException)
		{
			throw;
		}
		catch (InteractiveUserDetachedException)
		{
			throw;
		}
		catch (Exception e)
		{
			engine.ExitFail(e.ToString());
		}
	}
}

// You can define your dialogs by inheriting from the Dialog class
public class HelloWorldDialog : Dialog
{
	public HelloWorldDialog(IEngine engine) : base(engine)
	{
		// Create a label widget
		var label = new Label("Hello, World!") { Style = TextStyle.Title };

		// Add it to the dialog grid at position 0,0
		AddWidget(label, 0, 0);

		// Create a button widget
		var button = new Button("OK");

		// Add it to the dialog just below the label
		AddWidget(button, 1, 0);

		// Add an action to be performed whenever the button is clicked
		button.Pressed += (sender, args) => engine.ExitSuccess("Done");
	}
}

If you have questions, you can post them to our DataMiner community platform. Or have a look at the guides and video courses listed below.

Courses and guides

Known Issue

When you use this NuGet package, it is possible you get the following error when launching the script: DataMinerException: Show UI Failed: 0x800402F5 (Interactive UI can only be used in interactive mode. ) This is due to a DataMiner software issue causing the script to be launched in the wrong mode. The DataMiner software performs a simple string search to detect if the script should be launched in interactive mode. It is looking for the following string "engine.ShowUI" which is normally always present in the source code of the script. This method call is now handled by the NuGet package, so the string can no longer be found in the script source code, causing the issue. We are currently working on a fix which will be available in one of our upcoming DataMiner releases.

Workaround

Add the following comment to your script.

// engine.ShowUI(

Location of the comment does not matter as long as it is visible in the C# code block view of the DataMiner Automation Script UI.

About DataMiner

DataMiner is a transformational platform that provides vendor-independent control and monitoring of devices and services. Out of the box and by design, it addresses key challenges such as security, complexity, multi-cloud, and much more. It has a pronounced open architecture and powerful capabilities enabling users to evolve easily and continuously.

The foundation of DataMiner is its powerful and versatile data acquisition and control layer. With DataMiner, there are no restrictions to what data users can access. Data sources may reside on premises, in the cloud, or in a hybrid setup.

A unique catalog of 7000+ connectors already exist. In addition, you can leverage DataMiner Development Packages to build you own connectors (also known as "protocols" or "drivers").

Note See also: About DataMiner.

About Skyline Communications

At Skyline Communications, we deal in world-class solutions that are deployed by leading companies around the globe. Check out our proven track record and see how we make our customers' lives easier by empowering them to take their operations to the next level.

Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
10.0.3 373 12/13/2024
10.0.2 365 12/10/2024
10.0.1 84 12/10/2024
10.0.1-prerelease.3 44 12/10/2024
10.0.1-prerelease.2 42 12/9/2024
10.0.1-prerelease.1 47 12/5/2024
9.0.5 132 12/13/2024
9.0.4 173 12/9/2024
9.0.4-prerelease.5 43 12/9/2024
9.0.4-prerelease.4 43 12/9/2024
9.0.4-prerelease.3 44 12/9/2024
9.0.4-prerelease.2 38 12/9/2024
9.0.4-prerelease.1 44 12/9/2024
9.0.3 4,555 10/8/2024
9.0.3-prerelease.3 97 6/21/2024
9.0.3-prerelease.2 296 10/2/2024
9.0.3-prerelease.1 52 10/2/2024
9.0.2 3,802 7/16/2024
9.0.2-prerelease.3 51 7/15/2024
9.0.2-prerelease.2 52 7/15/2024
9.0.2-prerelease.1 50 7/15/2024
9.0.1 4,589 6/21/2024
9.0.1-prerelease.2 894 6/10/2024
9.0.1-prerelease.1 65 6/10/2024
8.0.4 4,911 5/7/2024
8.0.3 5,371 2/29/2024
8.0.2 2,306 2/20/2024
8.0.1 873 2/14/2024
8.0.1-prerelease-3 302 1/30/2024
8.0.1-prerelease.4 129 2/2/2024
8.0.1-prerelease.2 60 1/30/2024
8.0.1-prerelease.1 79 1/26/2024
7.0.5 350 5/7/2024
7.0.5-prerelease.1 66 5/7/2024
7.0.4 401 2/20/2024
7.0.3 329 2/14/2024
7.0.2 7,605 11/17/2023
7.0.1 3,772 10/10/2023
6.1.0 8,531 4/13/2023
6.0.6 427 5/7/2024
6.0.5 248 2/20/2024
6.0.4 264 2/14/2024
6.0.3 397 11/17/2023
6.0.2 719 4/5/2023
6.0.1 670 4/4/2023
6.0.0 736 3/20/2023
5.0.2 176 5/7/2024
5.0.1 465 2/14/2024
5.0.0 915 3/20/2023
4.0.1 240 2/14/2024
4.0.0 924 3/20/2023
3.0.1 260 2/14/2024
3.0.0 645 3/20/2023
2.0.1 251 2/14/2024
2.0.0 691 3/20/2023
1.0.1 267 2/14/2024
1.0.0 681 3/20/2023