|
I'm not sure if this will help you.
string[] drives = Environment.GetLogicalDrives();
|
|
|
|
|
hello there,
i am working on a project of speech recognition in c#..
in this project the software will be able to execute some voice commond inputed through a mic. i cant generate grammar for the same
till now i dont have satisfactory progress. can anyone there help me regarding this?
thank you
alok
|
|
|
|
|
Hi ..
By next month i have to start my project, and even i am planning over Image and Speech processing.
So i dont think ill be of any help to you at the moment . But yeh you could be definately help to me. So when u get the right path then also do let me know about it and we can work on it together if you are not waiting for its completion that sooner.
Thanks
SS
|
|
|
|
|
|
Does anybody know how Microsoft is saving the rating info for e.g. images?
As far as I can discover, it is not saved in exif- or IPTC-tags.
Purpose is to use the rating info entered with Vista Photo Gallery in an other program...
|
|
|
|
|
I believe this is done with some kind of shell extension. Search this site's articles for shell-related interop, I believe there are some articles that show how to extend the shell to retrieve and save your own information per file.
I could be way off, though. Like ID3 tags, it may be stored as part of the file itself. I'm not a COM expert, nor a shell expert, so take this with a grain of salt.
|
|
|
|
|
i have four text box for different field(name,city,state,country) for searching and three different criteria of search(like member/guest/vendor)
i simply use if else statements but it is too long method
can any one tell me simplest way to impliment it
i use c# for code.
|
|
|
|
|
You can use switch statements to handle lots of if/else logic:
string s = "foo";
switch(s)
{
case "bar":
Console.WriteLine("It was bar!");
break;
case "foo":
Console.WriteLine("It was foo!");
break;
case "baz":
Console.WriteLine("It was baz!");
break;
}
|
|
|
|
|
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
|
|
|
|
|
Your post doesn't really have a specific question, so this will be a rather general answer.
I can tell you that you don't need ActionListener class -- while Java forces you to create a class that handles some "event" (in this case, the ActionPerformed event), C# lets you do this using events and delegates. So it would be
fPause.ActionPerformed += myActionPerformedHandlerFunction;
...
void myActionPerformedHandlerFunction(...)
{
STAFResult stafResult = ...
}
For semaphores, look at System.Threading.Semaphore[^]
You can pause any thread (and thus, the whole application) by waiting on a semaphore using the WaitOne method on the Semaphore class. The Semaphore class should work much like the semaphore used in your Java code.
|
|
|
|
|
Well what about this fPause.Act..... line
well i dont think fPause is already defined in C#.NET
I know its hard to explain the whole thing here as not much people knows about STAF and even STAF at the moment doesnt support C# so its not even relevant to ask questions in there forum.
Anyway i am trying to communicate between the two exe. At the moment i can run exe from local system to remote but i want a back communication i.e. after local to remote communication, remote exe goies back to local to ask for more info to run specific task and after recievin info it gets executed.
But as i am not getting it at the moment so i am trying to add functionality of pause, resume exe frm local system using semaphor and queue.
Anyway thanks for your reply
|
|
|
|
|
What type is the fPause variable?
For communication between 2 .NET processes, search for .NET remoting.
|
|
|
|
|
Hi guys,
I am trying to go through EACH SELECTED ITEM in a listbox and move it over with certain configuration to another listbox. I can't figure it out how to go through each and unselect it and then go through the next one.
In list view there is somethign like foreach(ListViewItem item in listbox1.SelectedItems) is there something like that for a listbox where I can go through each selected item and process and unselect and again go through the next one.
Please help.
I appreciate your help in advance.
sasa
|
|
|
|
|
Hi,
look at the properties SelectedItems, and dont forget to set SelectionMode.
|
|
|
|
|
I have done this, this is not my question.
sasa
|
|
|
|
|
Please clarify the problem, show the code you have, and tell us what exactly
is going wrong.
|
|
|
|
|
Hi Luc,
thanks for your response. All that I am trying to do is load one listview and move data from one listview to another. But when I move the data, I don't want to remove it from the first listview. To avoid duplicates int he second listview in case the user moves it once and tries again, I want to check to make sure there are no duplicates.
So, when moving from one listview to another I want to first check if it exists in the second and if not then only move.
Please advice.
sasa
|
|
|
|
|
Hi,
so you want to copy, not move.
Here is what I would try (assuming the items are just strings, if not modify where
appropriate):
ListView lvw1=new ListView();
ListView lvw2=new ListView();
...
foreach (string s1 in lvw1.SelectedItems) {
bool found=false;
foreach (string s2 in lvw2.Items) {
if (s1==s2) {
found=true;
break;
}
}
if (!found) lvw2.Items.Add(s1);
}
|
|
|
|
|
Thank you mate for your help. I used your suggestion and got it to work.
sasa
|
|
|
|
|
for showing some text on an image am using the GDI
it is doing well.
but the thing is I am not able to give some effects to it like some zoom in effect or flying effct or any thing atleast some effects.
any help is appriciated.
thanks
Ravikumar Patra
|
|
|
|
|
Either consider using DirectX, WPF (really trivial with WPF), or transformations. With transformations, you can rotate, scale, shear and so on.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
ok
using Direct X how it can be done
plz help me
Ravikumar Patra
|
|
|
|
|
Asalam o Alaikum:
i want to get coloumns count from listview using SendMessage() Api function.
can anybody tell me about this.
Thanx
|
|
|
|
|
Have you missed the right forum, haven't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
how this is a wrong forum tell me???????
|
|
|
|