|
If the user starts the print-action from, say, his browser, then the local computer will display a list of all available printers. If the printer is in the network, and the local computer has the correct drivers, it'll be able to print to there. Permissions are granted over the Active Directory.
Printing is not an action that "raises an event". You could add code that instructs the server to print something on behalf of the user.
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I have rehosted the workflow designer and I've added a few custom activities along with default activities in it. It is going to be used by users to create and edit control flows. All I want to do is to plug the designer in a predefined architecture which includes a DLL, BLL and presentation layer. What architecture do you suggest for the new case including workflow designer?
Thank you very much in advance.
|
|
|
|
|
Do you suppose it would be possible to create a mostly proprietary operating system built around the Linux kernel, but with all other components being closed source, commercially developed?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
That is common practice with devices like TV set top boxes. Many use the Linux kernel and some required OS specific programs (often BusyBox) from the open source side and implement the main function in closed source applications.
The source of the kernel and all code based on open source must be published according to their licenses. Each program written from scratch by you must not be published.
A special case is linking open source libraries. These must have a GPL linking exception or are published under a license allowing such linkage like LGPL.
Assuming you want to use the Linux kernel but implement nearly all other code yourself, I think it is possible. But it would be a lot of work and requires checking the licenses of the used open source components.
|
|
|
|
|
I am reading the bridge design pattern from the GoF book, there is a variant defined which the author calls "Sharing implementors" illustrated by handle body / idiom in c++. I did some research to find its implmenetation but i am unable to see Reference counting technique to allow multiple objects with the same value to share a single representation of that value. can any body help me please to learn this?
Hassan Akhtar
|
|
|
|
|
Hi,
for our project we use Windsor Castle to do IoC. This means that we also let the IoC container resolve the needed constructor arguments. But for some cases (wrappers, view models, etc.) we also need to pass some ctor arguments which are only known at runtime and from my opinion are needed to create a valid object. For this we use generic factories like:
interface IMyWrapperFactory
{
IMyWrapper CreateWrapper(string key);
}
For this to work I have IoC registered that factory as well as IMyWrapper, where the implementation of IMyWrapper only has one ctor overload with the string argument.
Problem: we also have created an integration test which instantiates all registered components to ensure that everything can be resolved. But this fails for obvious reasons with IMyWrapper, as the string argument is not registered!
I would be very happy if you could tell me what you think about it.
1. Is there a way to let certain components exclusively be instantiated by generic factories so the test could differ and it would not be possible to acquire an instance directly without using the needed string argument?
2. Am I wrong and it is generally bad practice to provide runtime parameters to constructors?
3. If not, would you limit your freedom of doing so just to make the integration test check 100% well?
Best regards
Alex
|
|
|
|
|
you can use MOQ for mocking and IOC for running the test cases.
|
|
|
|
|
Hello All,
My question is whether there are best practices around color-coding flow-charts and similar diagrams. Do certain colors belong to certain symbols? (such as Yellow for "decisions" while green for "data") If so, what are they? Are there resources online that you know of regarding this?
|
|
|
|
|
There are no standards that I'm aware of. I've never used colors for these, just simple black & white.
Whatever works best for your audience and communicates the message.
Failure is not an option; it's the default selection.
|
|
|
|
|
Just be consistent and use colors that make it easy to read.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Why not to use the traffic signal color coding....it will make much more sense ...at least you need not need to provide legends to the users.
|
|
|
|
|
Thank you all for your input.
|
|
|
|
|
you're welcome.... even if i don't have an input here... haha.
hermaine...",)
|
|
|
|
|
In 1971 (yes, 40+ years back), a book came out on Flowcharting.
The book contained the usual blurbs on the dust jacket, including one about how the book even covered sharpening the pencil.
But the most telling one was: Flowcharting is for the mentally retarded.
Honest.
|
|
|
|
|
I remember that there was an ActiveX control for setting the skin of a form on VB. Can anybody remind me with its name?
|
|
|
|
|
|
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.
|
|
|
|
|