Table of Contents

Interface ICadRemoteHost

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

What a CadRemoteServer needs of the app it serves: the drawings open, the one the user works in, and the ways to open, make, show and save one and to type on a drawing's command line. The app's window implements it over its view model; a test implements it over a few documents and no window. Every member is called on the thread of the ICadRemoteDispatcher the server was given, never from the pipe's own thread.

public interface ICadRemoteHost

Properties

ActiveDocument

Gets the drawing the user works in, or null when none is open.

Documents

Gets the drawings open now.

Title

Gets the title of the app's window, as A-101.dwg - OpenCAD2D.

Methods

Activate(CadDocument)

Shows a drawing open in the app, as clicking its entry in the list does.

Close(CadDocument)

Closes a drawing without asking and without saving, as the x of its row does once the question is answered Don't save: it leaves Documents, and the next one is shown, or the start screen where it was the last. The server has checked already that its changes are to be thrown away and that nothing runs in it, so the host asks the user nothing and shows no dialog.

New(string)

Starts a new drawing and shows it.

Open(string)

Opens a drawing from a file and shows it, or shows it where it is open already.

Save(CadDocument)

Saves a drawing to its file.

SaveAs(CadDocument, string, string)

Saves a drawing to a file, which it is known by afterwards.

SessionOf(CadDocument)

Gets the command session of a drawing: its command line, the commands running in it and what they wrote.

Type(CadDocument, string)

Types a line on the command line of the drawing, as the user does: a command's name or the answer to its prompt, words parted by spaces going in one by one, an empty line being Enter.