Introduction
YouTube
Modds is drag and drop programming language. Modds C# is a drag-and-drop application development environment based in C#. In this environment, any and all existing compiled .NET code can be used as building blocks to develop new applications. Unlike the command base of decision logic programming languages, modds is data-driven. Input data flows like water through the program’s structure, and in the process is converted to output data.
modds Designer (C#) will automatically wrap functions or objects from existing .NET DLL. The wrapper then also becomes known as an object element in the modds interface. One object element can only communicate with other object elements through data-driven Connectors. Each Connector coming out of one object element is linked to another wrapped object, or a function’s input/output parameters. When the receiving end of a triggering Connector receives its necessary data, it will trigger the execution of the wrapped object or function at its end. The element’s output will then trigger other elements to execute. This cascading effect allows each element to operate as soon as its necessary data becomes available, and will continue until it reaches the end of the program’s structure.
In this article, I will walk through a command line “Hello World
” program:
Running modds C#
In order to run modds C#, you need Microsoft Windows 7 or above, and .NET Framework 4.5.2 or above installed.
First, download modds C# at www.modds.org.
Creating a "Hello World" Project
Creating a “Hello World” Project
Start modds C# and click File->New Project.
From New Project dialog:
- Select Console Application
- Given Project the name “
Hello World
”
- Browse Project Path
- Press OK
Executing the Program
In the solution panel, right-click “Hello World
” and select Execute.
Program Walkthrough
In the solution panel, expand Schema and double click “Main.xaml” to open.
For more information about each Element, click on Element’s icon to online help.
When the program first executes, “Main.xaml” will load and be used to build a modds object. Each Element above will become object Element of the main object. After the object is built, the program will look for the Start Trigger Element and trigger it. The trigger order will follow the trigger index number on Start Trigger Element.
Start Trigger 0 will trigger the Hello World Element to send out “Hello World!!
”. The string
message will trigger Function WriteLine
and print out “Hello World!!
”.
Start Trigger 1 will trigger Function ReadLine
and the “Hello World!!
” window will not close until the user presses a key.
The Element Control
You can find the Start Trigger Element by dragging it out from:
- Control Toolbox ->modds Common Control ->Start Trigger
The Primitive Type Element HelloWorld
is dragged out from:
- .NET DLL Toolbox ->
CSharpCommonLibrary
->Primitive Type ->String
(or open Microsoft mscorlib.dll)
Function WriteLine
and ReadLine
are dragged out from “mscorlib.dll”. The following steps show how to find these methods:
- On the .NET DLL Toolbox panel, click the Add DLL button (top-left corner of the panel).
- In the File Open dialog, select “mscorlib.dll” and click Open.
- Expand Common Language Runtime Library ->Class ->Console
- In the “
Hello World
” project, we are using functions ReadLine()
and WriteLine(String)
.
Project EXE File
The project EXE program file shows up under your project directory.
Hello World ->Build ->Release ->Hello World.exe
modds Drag and Drop Programming for C# Sample Stock Chart (Part 2)