Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
Questionproject on voice control Pin
adamas.alok13-Apr-07 3:36
adamas.alok13-Apr-07 3:36 
AnswerRe: project on voice control Pin
Software_Specialist13-Apr-07 3:58
Software_Specialist13-Apr-07 3:58 
AnswerRe: project on voice control Pin
Judah Gabriel Himango13-Apr-07 4:20
sponsorJudah Gabriel Himango13-Apr-07 4:20 
QuestionStar rating Pin
APHerman13-Apr-07 3:33
APHerman13-Apr-07 3:33 
AnswerRe: Star rating Pin
Judah Gabriel Himango13-Apr-07 4:18
sponsorJudah Gabriel Himango13-Apr-07 4:18 
QuestionMultiple search perameter Pin
jayvaishnav8213-Apr-07 3:20
jayvaishnav8213-Apr-07 3:20 
AnswerRe: Multiple search perameter Pin
Judah Gabriel Himango13-Apr-07 4:14
sponsorJudah Gabriel Himango13-Apr-07 4:14 
QuestionJava to C#.NET pause button code ? [modified] Pin
Software_Specialist13-Apr-07 3:13
Software_Specialist13-Apr-07 3:13 
Hi all,
I am creating an application to control the execution over the remote machines using STAF tool.
Well at the moment i can start the exe over remote machine but i want to now control it like pause, continue and all. So below piece of code is in JAVA. could any one help me out in converting it to C#.NET. Well i have recieved no help from googles for STAF(Software Testing Automation Framework). So if any one could help me out in this then it woould be gr8.

Thanks a lot

if you click on the "Pause" button, the application will Pause. If you then click on the
"Continue" button, the application will resume. Let's take a look at how this code is implemented.
STAFDemoController.java
691: fPause.addActionListener(new ActionListener() {
692: public void actionPerformed(ActionEvent event)
693: {
694: STAFResult stafResult =
695: STAFDemoController.handle.submit2(
696: fMachine, "SEM", "RESET EVENT STAFDemo/Handle/" +
697: fHandle + "/Continue");
698:
699: if (stafResult.rc != 0)
700: System.out.println("Error pausing process RC: " +
701: stafResult.rc + " Result: " + stafResult.result);
702: }
703: });
On line 695 there is a call to the Semaphore service on the machine where the application is running. This call will reset the event semaphore which is uniquely identified by the application's handle.

Now let's look at how the application uses this semaphore":
STAFProcess.java
156: String continue_semaphore = new String(
157: "wait event STAFDemo/Handle/"+h+"/Continue");
196: // block if semaphore is reset, fall through if posted (or
197: // if error!!!)
198: semaphore = handle.submit2(machine, "SEM", continue_semaphore);
In STAFProcess, on line 198 there is a call to the local Semaphore service. The variable continue_semaphore is defined
on line 156.
This call to submit2 will cause application to wait for the event semaphore uniquely identified by its handle. Thus,
whenever STAFDemoController resets the event semaphore, the application will then wait for the event semaphore,
effectively pausing the application's execution.


-- modified at 9:32 Friday 13th April, 2007
AnswerRe: Java to C#.NET pause button code ? Pin
Judah Gabriel Himango13-Apr-07 4:12
sponsorJudah Gabriel Himango13-Apr-07 4:12 
GeneralRe: Java to C#.NET pause button code ? Pin
Software_Specialist13-Apr-07 5:09
Software_Specialist13-Apr-07 5:09 
GeneralRe: Java to C#.NET pause button code ? Pin
Judah Gabriel Himango13-Apr-07 11:17
sponsorJudah Gabriel Himango13-Apr-07 11:17 
QuestionListbox selecteditems Pin
Saamir13-Apr-07 3:04
Saamir13-Apr-07 3:04 
AnswerRe: Listbox selecteditems Pin
Luc Pattyn13-Apr-07 4:14
sitebuilderLuc Pattyn13-Apr-07 4:14 
AnswerRe: Listbox selecteditems Pin
Saamir13-Apr-07 11:32
Saamir13-Apr-07 11:32 
GeneralRe: Listbox selecteditems Pin
Luc Pattyn13-Apr-07 14:22
sitebuilderLuc Pattyn13-Apr-07 14:22 
GeneralRe: Listview selecteditems Pin
Saamir15-Apr-07 8:05
Saamir15-Apr-07 8:05 
GeneralRe: Listview selecteditems Pin
Luc Pattyn15-Apr-07 8:24
sitebuilderLuc Pattyn15-Apr-07 8:24 
GeneralRe: Listview selecteditems Pin
Saamir15-Apr-07 14:22
Saamir15-Apr-07 14:22 
QuestionText effects using GDI... Pin
Ravikumar Patra13-Apr-07 2:21
professionalRavikumar Patra13-Apr-07 2:21 
AnswerRe: Text effects using GDI... Pin
Pete O'Hanlon13-Apr-07 3:02
mvePete O'Hanlon13-Apr-07 3:02 
GeneralRe: Text effects using GDI... Pin
Ravikumar Patra13-Apr-07 3:09
professionalRavikumar Patra13-Apr-07 3:09 
Questionhow to get Coloumns counts of ListView using SendMessage() Pin
Farhan Ali13-Apr-07 1:32
Farhan Ali13-Apr-07 1:32 
QuestionWrong forum? Pin
CPallini13-Apr-07 2:22
mveCPallini13-Apr-07 2:22 
AnswerRe: Wrong forum? Pin
Farhan Ali13-Apr-07 2:25
Farhan Ali13-Apr-07 2:25 
GeneralRe: Wrong forum? Pin
CPallini13-Apr-07 2:54
mveCPallini13-Apr-07 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.