|
|
Thank you anyway. I've just found it. It's Actskin4.ocx
That's the file I was looking for, but can it work also on C#? I wonder.
|
|
|
|
|
Probably, bit why would you want it to? Use WPF and you can retheme the app all you like.
|
|
|
|
|
Now that's another problem that I'm gonna post in this website, because I can't make any WPF projects
modified 22-Mar-12 16:03pm.
|
|
|
|
|
I have an Ethernet connected motion controller that I need to get information from. I'm using WPF (C# flavor) for the project. The goal is to get data from the device as fast as possible so the UI doesn't seem sluggish.
My thought was to spin off a background task that constantly polled the device for information as fast as it could run. It would fire events when certain groups of data were updated. Another class would monitor for these events and then set dependency properties that would update the UI.
I have a couple questions:
1) What is the best way of starting the background task? I want it to close when the main thread is closed and not stop the main thread from being closed.
2) Any helpful advice as to how data can be retrieved on one thread that will eventually be displayed on a different thread.
I have only toyed with multi-threaded applications up to this point. I'd rather ask and do it right than to find out later there was a better way.
[UPDATES]
This is on a closed network on the machine. It is not going over a corporate network.
The device does not fire events. It has an API that allows data to be requested and then it replies. Right now I am using a DispatchTimer to request updates at a regular interval. It is running at 25ms without any issues. I was looking at trying to free my UI from my polling routine in case the device locks up or stops responding.
Brad
If you think you can, you will.
If you think you can't, you won't.
Either way, you're right.
|
|
|
|
|
BRShroyer wrote: My thought was to spin off a background task that constantly polled the device for information as fast as it could run
This is a very bad idea resulting in a very high system and network load. You should check if the motion controller provides some kind of notification messages (sending data to an established network connection).
Using a worker thread for such network communications is the common and best way. To stop such a worker thread, it is usally listening for a terminate event (besides the communication events) that can be signaled when your application terminates.
To pass data from the worker thread to the main (GUI) thread and vice-versa you must implement some kind of inter-thread communication.
How to implement threads and inter-thread communication depends on the used language.
|
|
|
|
|
I've updated my post with some more information.
Basically, this is on a closed network. There aren't any other devices connected. Also, this will be in C#.
Thanks for the advice.
Brad
If you think you can, you will.
If you think you can't, you won't.
Either way, you're right.
|
|
|
|
|
The System.Threading.Timer can help you: its callback function does not run in the thread the timer was created.
|
|
|
|
|
Hi Guys,
Currently when client is logged in to my system, the user's session is bound to some server (lets say there are 4 instances of the same server on 4 PCs) and is handled only on this server.
I'm going to put servers into cluster with distributed cache where user sessions will be stored and be accessible from each of these servers.
There is a problem, I dont know which distributed cache product to use (i need exactly .NET solution), I found something about memchached, microsoft's AppFabric, etc..
But everything is very superficial (or i'm bad googleman ), could someone advice something? what is the best in the performance? maybe there is some good comparative analysis topic, etc?
10x in advance,
Pavel
modified 18-Mar-12 12:57pm.
|
|
|
|
|
|
Hello everyone,
I just wanted to ask, how can you have a different icon from the windows task-bar one and the one that appears on the form, for example (see graphic/link below):
Click for picture.
I couldn't found out which topic to post it in, because I do not know which programming language(s), do this. Thats why I posted it here because it is design and architecture for programs. So what programming languages do this, answers will be fully appreciated.
Regards,
Brandon T. H.
modified 17-Mar-12 20:03pm.
|
|
|
|
|
Brandon T. H. wrote: paste in your browser hit enter
Use the link button, not the code one.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I'll be sure next time.
Modified it for you .
|
|
|
|
|
You can set your application icon under properties - application tab - resources - icon in visual studio, and this determines the icon for your application on the desktop and the task bar. You can further set a different icon for each separate window in your application, which determines the icon displayed in that window's title bar.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
|
The only way I know of is to use two windows. An invisible main window (the icon of which is shown in the taskbar) and your second window becomes the main window for the user.
|
|
|
|
|
Dear Team,
I have a Visual Basic 6.0 Application with 10 timers in one form.Time Intrval Set For timers are different.
Timer1-1000,Timer2-10000,Timer3-10000,Timer4-10000,Timer5-10000,Timer6-10000,Timer7-10000,Timer8-10000,Timer9-10000,Timer10-10000.
The problem is sometime all timers does not fires on its interval...but most of the time works correctly.Because of this skip reason I am looking to work in wpf as I have read it has dispatcher.
I want good suggestion from all what is the best solution of it...Suggestion is always appreciated.
Thanks
Sukhen Dass
|
|
|
|
|
I suggest you use another forum. This has nothing to do with design or architecture.
Failure is not an option; it's the default selection.
|
|
|
|
|
sukhen dass wrote: I have a Visual Basic 6.0 Application with 10 timers in one form.
Why?
sukhen dass wrote: sometime all timers does not fires on its interval
How do you test for this situation?
sukhen dass wrote: Because of this skip reason I am looking to work in wpf
It's unlikely that will make any difference unless you are certain that you have diagnosed and resolved the original problem.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
As long as you do not endeavor to find what the actual problem is, switching over to a different technology will not help you.
|
|
|
|
|
Put some code on the first line of the event to log the time that it's fired. You'll find that it fires around the time it's supposed to, unless the app is in a loop without yielding processortime for the messagepump.
Have a read of this[^] CP article
Bastard Programmer from Hell
|
|
|
|
|
Fresh from the success of my Inheritance question last week, I have another relating to the data behind those objects. Remember I have been using a 1:1 relationship between objects and database tables. I had Routes, Stages and a Many : Many relationship between them coverd by a RouteStage table
But the new design will be along the lines
Class CStage
{
Stage details
}
Class CRoute
{
Route Details
List <CStage> List of Stages
}
How do I represent this on a relational database.
My research is leading me to a term called "Object Impedance". I have ideas for some none-too-pretty methods on the revised CRoute, but I am open to clever suggestions to best represent this scenario.
Ger
|
|
|
|
|
The most common route is to map the OO-objects to a relational model. Your database will need to have it's own design thought out, and preferably, normalized.
OTOH, if you're using it merely as a datastore for said objects, then it might be more beneficial to dive into serialization.
Bastard Programmer from Hell
|
|
|
|
|
Hi guys Check my example below:
CrazyBitz is an employment agency specializing in matching IT staff with specific skill sets to the needs of prospective employers. An employer might need someone with a c# background and SQL-server experience, who’re also qualified as a CCNA. They need an application that will automatically evaluate how well the skills of applicants match the needs of employers.
Outline arguing that this IS or IS NOT a suitable problem to address with the aid of the decorator pattern...
I say a decorator pattern will be useful since a person that will be employed can have additional skills other than c# and Sql-server as time goes...
What are your personal views about this example?
|
|
|
|
|
A Decorator is used when the original class cannot be "extended" (because it is sealed or final, or written by someone else and you don't have source, etc.). In your example, the skills associated with a person can easily be maintained as an array of skills on the Person class. So this does not qualify as an apt example for a decorator pattern.
|
|
|
|