public NoUndoNetworkCommand(String name, CommandScope scope, bool active, Network net, NetworkCommandType comType) : base(name, scope, active) { commandType = comType; network = net; }
public QuitCommand(BaseApplication app, String name, CommandScope scope, bool active, String dialogTitle, String dialogQuestion) : base(name, scope, active, dialogTitle, dialogQuestion) { application = app; }
public CloseWindowCommand(String name, CommandScope scope, bool active, MainWindow window) : base(name, scope, active) { Debug.Assert(window != null); this.window = window; }
public NoUndoMWCmd(String name, CommandScope scope, bool active, MsgWin win, CmdType comType) : base(name, scope, active) { messageWindow = win; commandType = comType; }
public OpenCommand(String name, CommandScope scope, bool active, DXApplication app) : base(name, scope, active, "Save Confirmation", "Do you want to save the program?") { this.application = app; }
public SaveMacroCommand(String name, CommandScope scope, bool active, MacroDefinition md) : base(name, scope, active) { this.md = md; this.next = null; }
public UIComponentHelpCommand(String name, CommandScope scope, bool active, Control control) : base(name, scope, active) { Debug.Assert(control != null); this.control = control; }
public DisconnectFromServerCommand(String name, CommandScope scope, bool active) : base(name, scope, active, "Disconnect from Server", "Do you really want to disconnect from the server?") { }
public NoUndoDXAppCommand(String name, CommandScope scope, bool active, DXApplication app, DXApplication.CommandType comType) : base(name, scope, active) { this.commandType = comType; this.application = app; }
public NewCommand(String name, CommandScope scope, bool active, Network net, Form dialogParent) : base(name, scope, active, "Save Confirmation", "Do you want to save the program?", dialogParent) { network = net; }
public NoUndoJavaNetCommand(String name, CommandScope scope, bool active, JavaNet n, JavaNetCommandType comType) : base(name, scope, active) { commandType = comType; network = n; }
public ConfirmedQuitCommand(String name, CommandScope scope, bool active, DXApplication app) : base(name, scope, active, "Save Confirmation", "Do you want to save the program?") { application = app; command = null; }
protected PreActionCommand(String name, CommandScope scope, bool active, String dialogTitle, String dialogQuestion) : base(name, scope, active) { Debug.Assert(dialogTitle != null); Debug.Assert(dialogQuestion != null); this.dialogTitle = dialogTitle; this.dialogQuestion = dialogQuestion; }
protected ConfirmedCommand(String name, CommandScope scope, bool active, String dialogTitle, String dialogQuestion, Form parent) : base(name, scope, active) { Debug.Assert(dialogTitle != null); Debug.Assert(dialogQuestion != null); this.dialogTitle = dialogTitle; this.dialogQuestion = dialogQuestion; this.parent = parent; }
public Command(String name, CommandScope scope, bool active) { if (name == null) { StackFrame stackFrame = new StackFrame(); MethodBase methodBase = stackFrame.GetMethod(); throw new Exception(string.Format("{0}: invalid arg", methodBase)); } this.name = name; this.active = active; this.hasUndo = true; thisServer = new Server(); if (scope != null) { scopeList.Add(scope); } }
public bool registerScope(CommandScope scope) { if (scope == null) { StackFrame stackFrame = new StackFrame(); MethodBase methodBase = stackFrame.GetMethod(); throw new Exception(string.Format("{0}: invalid arg", methodBase)); } if (scopeList.Contains(scope)) { return false; } else { scopeList.Add(scope); } return true; }
public HelpMenuCommand(String name, CommandScope scope, bool active, HelpType comType) : base(name, scope, active) { commandType = comType; }
protected NoUndoCommand(String name, CommandScope scope, bool active) : base(name, scope, active) { hasUndo = false; }
protected OptionalPreActionCommand(String name, CommandScope scope, bool active, String dialogTitle, String dialogQuestion) : base(name, scope, active, dialogTitle, dialogQuestion) { }
public DXApplication(String s) : base(s) { theDXApplication = this; anchor = null; serverDisconnectScheduled = false; network = null; // Create the local command scope. commandScope = new CommandScope(); // Initialize the packet interface. serverInfo.packet = null; applicationPacket = null; messageWindow = null; genericHelpCmd = new HelpMenuCommand("genericAppHelp", null, true, HelpMenuCommand.HelpType.GenericHelp); helpTutorialCmd = new HelpMenuCommand("helpTutorial", null, true, HelpMenuCommand.HelpType.HelpTutorial); quitCmd = new ConfirmedQuitCommand("quit", commandScope, true, this); exitCmd = new ConfirmedExitCommand("exit", commandScope, true, this); openFileCmd = new OpenCommand("open", commandScope, true, this); messageWindowCmd = new NoUndoDXAppCommand("messageWindowCmd", commandScope, true, this, CommandType.OpenMessageWindow); openSequencerCmd = new NoUndoDXAppCommand("openSequencerCmd", commandScope, false, this, CommandType.OpenSequencer); openAllColormapCmd = new NoUndoDXAppCommand("openAllColormapCmd", commandScope, false, this, CommandType.OpenAllColormaps); loadMacroCmd = new NoUndoDXAppCommand("Load Macro Command", commandScope, true, this, CommandType.LoadMacro); executeOnceCmd = new NoUndoDXAppCommand("Execute Once", commandScope, false, this, CommandType.ExecuteOnce); executeOnChangeCmd = new NoUndoDXAppCommand("Execute On Change", commandScope, false, this, CommandType.ExecuteOnChange); endExecutionCmd = new NoUndoDXAppCommand("End Execution", commandScope, false, this, CommandType.EndExecution); connectedToServerCmd = new NoOpCommand("Connected To Server", commandScope, true); disconnectedFromServerCmd = new NoOpCommand("Disconnected From Server", commandScope, true); executingCmd = new NoOpCommand("executingCmd", commandScope, true); notExecutingCmd = new NoOpCommand("notExecutingCmd", commandScope, true); connectToServerCmd = new NoUndoDXAppCommand("Start Server", commandScope, true, this, CommandType.StartServer); resetServerCmd = new NoUndoDXAppCommand("Reset Server", commandScope, false, this, CommandType.ResetServer); disconnectFromServerCmd = new DisconnectFromServerCommand("disconnectFromServer", commandScope, false); loadMDFCmd = new NoUndoDXAppCommand("Load MDF...", commandScope, true, this, CommandType.LoadUserMDF); toggleInfoEnable = new NoUndoDXAppCommand("Enable Information", commandScope, true, this, CommandType.ToggleInfoEnabled); toggleWarningEnable = new NoUndoDXAppCommand("Enable Warnings", commandScope, true, this, CommandType.ToggleWarningEnabled); toggleErrorEnable = new NoUndoDXAppCommand("Enable Errors", commandScope, true, this, CommandType.ToggleErrorEnabled); assignProcessGroupCmd = new NoUndoDXAppCommand("assignProcessGroup", commandScope, true, this, CommandType.AssignProcessGroup); connectedToServerCmd.autoActivate(executeOnceCmd); connectedToServerCmd.autoActivate(executeOnChangeCmd); connectedToServerCmd.autoActivate(endExecutionCmd); connectedToServerCmd.autoActivate(disconnectedFromServerCmd); connectedToServerCmd.autoActivate(resetServerCmd); connectedToServerCmd.autoActivate(connectedToServerCmd); disconnectedFromServerCmd.autoActivate(connectedToServerCmd); disconnectedFromServerCmd.autoActivate(executeOnceCmd); disconnectedFromServerCmd.autoActivate(executeOnChangeCmd); disconnectedFromServerCmd.autoActivate(endExecutionCmd); disconnectedFromServerCmd.autoActivate(disconnectedFromServerCmd); disconnectedFromServerCmd.autoActivate(resetServerCmd); // // Once in execute on change don't allow it again until the user // does an endExecutionCmd // executeOnChangeCmd.autoDeactivate(executeOnChangeCmd); endExecutionCmd.autoActivate(executeOnChangeCmd); openFileCmd.autoActivate(executeOnChangeCmd); // // Set the automatic activation of any commands that depend on whether // or not we are currently executing. // executingCmd.autoDeactivate(openFileCmd); notExecutingCmd.autoActivate(openFileCmd); executingCmd.autoDeactivate(executeOnceCmd); notExecutingCmd.autoActivate(executeOnceCmd); // // Don't allow execute on change during an execute once. // executeOnceCmd.autoDeactivate(executeOnChangeCmd); notExecutingCmd.autoActivate(executeOnChangeCmd); NDAllocatorDictionary.theNDAllocatorDictionary = new NDAllocatorDictionary(); readFirstNetwork = false; }
public MWClearCmd(String name, CommandScope scope, bool active, MsgWin win) : base(name, scope, active) { messageWindow = win; }
private void CommonConstructor() { InitializeComponent(); workArea = null; commandArea = null; Text = ""; Visible = false; if (hasMenuBar) { commandScope = new CommandScope(); helpOnWindowCmd = new UIComponentHelpCommand("helpOnWindow", null, true, this); } else commandScope = null; Debug.Assert(MainProgram.theApplication != null); MainProgram.theApplication.thisServer.registerClient(this); Load += new EventHandler(MainWindow_Load); }
public bool unregisterScope(CommandScope scope) { if (!scopeList.Contains(scope)) { return false; } return scopeList.Remove(scope); }