NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

want to validate the user before sending the command to test eninge when user click the TS user control(like Pause/Restart-ActiveX)

Hi all
 
I need one small clarification, I am using teststand user controls for my operator interface.
 
(i.e application manager, sequence manager, activeX buttons etc.,)
 
In the execution window if the user click any of the buttons(pause/resume/terminate/abort etc.,) it should do the corresponding operations immediately instead it should ask for the user name and password ,and validate the user then only it can perform the user clicked operation.
(ie. if the user click pause button . it should first show the login window , if the user correctly entered the login then the pause operation can be performed else it should not do pause operation. )
 
i have i tried it by putting the following code in the acvieX click event

private

void axTerminateRestartButton_ClickEvent(object sender, EventArgs e)

{

//code for showing the login window and user validation

// if the user name and pass word is execute the terminate command

//else do nothing

}

it shows the login window but it always execute the terminate command.
 
hope i clear my position.
 
or is there any event for activeX button that will trigger before it sending the command to test engine or how can i stop the command sending the test engine if login fails
 
(note::: loging window we use our own login module instead of teststand login)
 
Thanks in Advance
Srini
 
 
0 Kudos
Message 1 of 2
(3,067 Views)

Try handling the ApplicationMgr.PreCommandExecute event.

You can check the Kind property of the Command parameter to identify the command. You can use the Cancel output parameter to prevent the command from executing.

This event fires whether the command was initiated by a button, a menu item, or by an explicit Command.Execute call.

0 Kudos
Message 2 of 2
(3,059 Views)