|
the class connection that i made (and everybody is using for connections), it's freezing the server after time. maybe my code is wrong or anybody isn't using 'dispose' function.
i need to know what is happening with...
help me please i need to see the objects with a tool for that.
sorry for bad english.
|
|
|
|
|
I have a class Input that has a static property Input[] Devices .
Instead of the user having to iterate over the array and subscribe to an event in each instance, I want to provide a mechanism where they can do it in one shot.
This works, but I wondered if there was a better way?
public class Input
{
public event EventHandler<ConnectedEventArgs> Connected;
public static Input[] Devices
{
get
{
}
}
public static void SubscribeToAllConnected(EventHandler<ConnectedEventArgs> multicastDelegate)
{
foreach (Input device in Devices)
device.Connected += multicastDelegate;
}
public static void UnsubscribeToAllConnected(EventHandler<ConnectedEventArgs> multicastDelegate)
{
foreach (Input device in Devices)
device.Connected -= multicastDelegate;
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Can you change the devices property to a method? Assuming you keep the devices in a private variable devices , you can write something like
public static Input[] Devices(EventHandler<ConnectedEventArgs> multicastDelegate)
{
foreach (Input device in devices)
device.Connected += multicastDelegate;
return devices;
}
|
|
|
|
|
Hmmm... not a bad idea. In the real world class there are quite a few events so I could overload the method and have different parameters, but many have the same signature EventHandler so not practical.
I'm trying out VS2010 and C#4.0, so I could use optional parameters
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi.
I am making example:users do not press ctrl+alt+delete or LWinLogo press dont open start bar in the form Iam what do ?
|
|
|
|
|
For Christ's sake, man, a simple search on the internet will find loads of examples - try to help yourself before asking others to help you!
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
|
no no. Iam making locking to desktop application writing.To open required Password etc. etc..But Desktop Locking task manager etc. Winlogo start bar do not open.
|
|
|
|
|
I get it, my reply was a joke full of sarcasm.
Check global keyboard hooks.
|
|
|
|
|
My project with C# writing.how do This global hook my project ?
|
|
|
|
|
Research, I'm not helping any further due to the potential risk of such a project.
|
|
|
|
|
You cannot stop Ctrl-Alt-Del. You can stop the Window key from being seen, but, that has already been pointed out to you. You need to do some research into "C# Global Keyboard Hook".
|
|
|
|
|
I am an advanced .net web developer and am looking to create an application that will WATCH sporting event videos and report statistics, results and other data into a database.
I understand the scale of this project and complexity and am ony looking for keywords and phrases that will help me start my research. Again, I am NOT looking for code.
Maybe similar software uses a similar approach or again keywords that I may use to start my research.
Thank you,
Robert Fidler
Springfield, Missouri.
I'm listening but I only speak GEEK.
|
|
|
|
|
Holy cow! That would be REALLY CLEVER!
OCR is the only keyword I can think of to help you (I assume you'd be looking to grab scores in text from teh screen, and not actually program to be able to tell if a basket had been scored?)
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
My initial post may have been a little misleading. I am looking to follow races, (greyhound, horses, and automoblies ). I am looking to follow the entire race and track the movements, behaviors, etc...
Thank you for your post. I will google OCR and start with that.
Thanks
Robert Fidler,
Springfield, Missouri
I'm listening but I only speak GEEK.
|
|
|
|
|
AreJay wrote: I am looking to follow the entire race and track the movements, behaviors, etc.
You're trying to track the movements of cars?? Are you looking for lead changes and stuff, in real time?? The only place that could supply you with that would be the same feeds that fantasy sports site use. The problem with that is that it's not free. You really can't use the video to do OCR because OCR really doesn't work on such low resolution images.
|
|
|
|
|
Getting information the video stream is probably the worst place to get the stats. A better option would be various sports websites and official league game documentation to do that. That is at least in a more manageable format than trying to do Optical Character Recognition on a low resolution video feed.
|
|
|
|
|
Thanks for your reply. The data I am looking to gather is published on sporting sites and is about 40% accurate. This is where my problem lys. I am looking to research how video surveillance cameras track objects on low res video.
Example: video_tracking[^]
This is an extreme example... I am looking to gather an x and y location (reading ever x milliseconds) of the object as it travels around a track.
Looking for help finding an algorithm that breaks down a video frame by frame and detects objects. That would help me start....
Thanks
Robert Fidler
Springfield, Missouri
I'm listening but I only speak GEEK.
|
|
|
|
|
AreJay wrote: This is an extreme example... I am looking to gather an x and y location (reading ever x milliseconds) of the object as it travels around a track.
Well, your problem is that you can track AN object, not necessarily THE object you want. What you pointed out only recognizes that a blob exists against a rather uniform background, namely a bright white, or dark black, blob against a gray background. If that blob intersects another blob of roughly the same color, there is no way to tell the two blobs apart. Introduce shadows into the mix and, suddenly, your car disappears into its own shadow, or into the shadow of another car.
On top of that, changes in the camera shot will just result in you losing the car your tracking, every few seconds.
This article[^] is about the best you're going to find.
|
|
|
|
|
thats perfict. this article is exaclty the starting point I was looking for. THANKS!!
I'm listening but I only speak GEEK.
|
|
|
|
|
Hi!
I am trying to build a form that can resize objects(panels).
I am trying to this with cruser change and resize the panel with the mouse with the drag drop events.
I included the enter event but the point that I get from
System.Windows.Forms.Cursor.Position
is not changing no metter where I enter the panel object.
Can someone tell me how can I know in which point my mouse is located on the form and see if it equals to the panel.
another quastions is how I change the curser in the code???
I could not find a good example for this.
Does some one has something or can point me to a good code example??
Thanks
|
|
|
|
|
Hi,
Cursor.Position gives screen coordinates (i.e. relative to the top left edge of the screen).
you can translate them to relative to the top left edge of some control or form by calling Control.PointToClient
Each Control (or Form) has a Cursor property, so change the appearance by myControl.Cursor=Cursors.XXX
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have tried searching and everything I find says to use "WebRequest.UserAgent" but this isnt a valid option in my solution to add. Am I doing something wrong? The script is pulling content from the webpage 100% correctly, I just want to be able to specify the user agent also.
byte[] data = System.Text.Encoding.ASCII.GetBytes(FormVariables);
System.IO.Stream os = null;
WebRequest request = null;
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultCredentials;
request = WebRequest.Create(URL);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.ContentLength = data.Length;
request.Timeout = 420000;
os = request.GetRequestStream();
os.Write(data, 0, data.Length);
os.Close();
System.Net.WebResponse resp = null;
resp = request.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
strResponse = sr.ReadToEnd().Trim();
|
|
|
|
|
Good Evening,
currently I am doing a small program which copies a file from one folder to another folder. The destination folder is the "Fonts" folder which holds all fonts of my system. Currently my code looks like this:
FileIOPermission f2 = new FileIOPermission(FileIOPermissionAccess.Write, "C:\\Windows\\Fonts\\");
f2.AddPathList(FileIOPermissionAccess.Read , origin);
try
{
System.IO.File.Copy(origin, destination);
}
catch (UnauthorizedAccessException ex)
{
MessageBox.Show(ex.ToString());
}
When I start debugging, the debugger tells me that I dont have permission for C:\Windows\Fonts\"filename". Which confuses me a bit since I thought I already got write permission to "C:\Windows\Fonts\". What am i doing wrong?
P.S.: I am using Windows Vista SP1 64-Bit
Thanks for your help and advices
|
|
|
|
|
Can someone give me some help on this please, since i dont know what i am doing wrong? I used a messagebox to have a quick look at the permmission i requested and it says i asked for write permission for C:\Windows\Fonts and read permission for the folder in "origin".
Is there something else I have to do?
|
|
|
|