Table of Contents

Method LoadCommands

Namespace
VectorDraw.Professional.vdCommandLine
Assembly
vdCommandLine.dll

LoadCommands(string, string)

Load all commands from a existing ASCII formated filename (ex. Commands.txt)

public bool LoadCommands(string path, string filename)

Parameters

path string

The full path for new commands description file.

filename string

The sigle filename with extension and without path.

Returns

bool

True if the selected file exist on the disk.

LoadCommands(StreamReader)

Load all commands from an existing System.IO.StreamReader stream.

public bool LoadCommands(StreamReader file)

Parameters

file StreamReader

The System.IO.StreamReader stream to load the commands from. This can be a project's resources file that is common to the commands.txt that we provide.

Returns

bool

True if the commands were succesfully loaded.

Examples

This code will Load the commands from a project's resources file.

stream = new MemoryStream();
writer = new StreamWriter(stream);
writer.Write(Resources.Commands);
writer.Flush();
stream.Position = 0;
StreamReader Commands = new StreamReader(stream);
vdFramedControl1.LoadCommands(Commands);