|
dileep2009 wrote: in which i need to find the size of image and convert it into inches/cms/mts
You'd need to determine the DPI[^] of the medium that this image is going to. Then you'd count the pixels; you could determine the size in inches with those two values - and convert it to centimeters or meters if required I are Troll
|
|
|
|
|
Hi
I have 10 Objects of different types, each object interacts with every other object, but depending on which object is interacting with which, it performs different functions.
For example
if i have objA, ObjB and ObjC then they could interact as follows
ObjA + ObjB performs function x
ObjA + ObjC performs function y
ObjB + ObjC performs function z
and so forth.
My question though is: From a true object orientated way, what is the best way to deal with this problem? Is there a particular design pattern i could have a look at? Doing this the wrong way would include several nested Select Case statements, but would cause a major maintenance hassle especially if the number of objects increased
I'm using VB.net
Thank you
|
|
|
|
|
thesoulfyguy wrote: Is there a particular design pattern i could have a look at?
Looks like a good fit for the Decorator[^] pattern.I are Troll
|
|
|
|
|
|
|
Hi
I have to create a windows service. While browsing the internet I found a few articles which are taking about classes which should not be used in the windows service. So far I found the following.
System.Timers.Timer
System.Windows.Threading.DispatcherTimer
System.ComponentModel.BackgroundWorker
Is that correct? Are there any aditional classes which should not be used in a windows service?
Thanks in advance.
Uroš
|
|
|
|
|
It depends more on what and how your service is going to be used. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What do you mean how? The service communicates with an .net application using WCF and than releys data to ethernet device using tcp sockets.
Uroš
|
|
|
|
|
You seem to be missing the point. Perhaps more research on what a Windows service is, and isn't, will clarify it for you. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
In general you have to avoid everything that does something with the GUI.
Services that try to open a window or something in that way will hang up
(except services that can interact with the desktop, but don't use this anymore because it becomes obsolete).
But you can use the class System.Timers.Timer in a service, you can't use the System.Windows.Forms.Timer!Greetings
Covean
|
|
|
|
|
I know I should avoid anything that has to do with UI. But Background Worker does not exectly fit that criteria. Is the information regarding the Background worker event corrent?
|
|
|
|
|
I can't see any reason why BackgroundWorker shouldn't work in a service.
Its just using delegates and normal events.
I also googled a little bit. It says it works on a service but this class is designed for
UI purposes only so you shouldn't use it. Just use a normal Thread, this will work in any case.Greetings
Covean
|
|
|
|
|
|
Did you read the last message on this board?
"It works fine in a console or service app with no forms. The delegates are
run on thread pool threads instead of the UI thread. So there is nothing
special going on, just delegates, BeginInvoke, and events. Try it yourself." Greetings
Covean
|
|
|
|
|
BETA1 releases of Microsoft Enterprise Library 5.0 and Microsoft Unity 2.0 are available for evaluation now.
Those who followed the progress of the patterns & practices team through the regular iteration-end code drops are aware what a massive undertaking this has been! With exception of the integration with the Visual Studio, this release is feature complete. Enterprise Library users who are looking at this release for the first time, please review thee Change Log.
The team is very excited about the improvements they’ve made to the overall Enterprise Library architecture and configuration experience, both of Enterprise Library and Unity (with new configuration tools, fluent interface and IntelliSense support with new schemas). They also focused on making Enterprise Library easier to extend.
Here’s your call to action. Download this Beta1 release. It will quite happily run side-by-side with earlier versions, so you can easily evaluate it without disrupting your development environment. Try the new features. Attempt a migration of an existing application. Tell Entlib Team about your experiences.
|
|
|
|
|
|
This appears to be nothing to do with .NET, try the Database forum. MVP 2010 - are they mad?
|
|
|
|
|
I am using System::Data::OleDb::OleDbConnection. I know SQL; the problem is that some SQL code does not work fully with some .NET providers. I will try the database forum.
|
|
|
|
|
I have a gridview that displays a delete LinkButton. I also have a javascript confim box display before any action is taken. This works just find. What I want to do is insert a carrage return in the confim box. I thought that I could use "\n" but for some reason when I try this the confimation box does not display and the row is deleted. below is the function I have that is displaying the box.
protected void SetDeleteButton(Object sender, EventArgs e) {
LinkButton btn= (LinkButton)sender;
btn.Attributes.Add("onclick", "return confirm(\"Removing this Category will remove all Sub-Categories and Products tied to this Category. Are you sure you want to proceed? \");");
}
I get what I want from this except the format of the text is not neat. I would like to center the text if possible. and I want a new line where its asking the question "Are you sure you want to proceed?"
|
|
|
|
|
use
\\n for the new line.
|
|
|
|
|
lol
I diffently should have seen that. Guess I was just having a brain fart.
Thanks
|
|
|
|
|
Does Windows Workflow similar to Spring WebFlow? or MVC 2 is more closer to WEbFlow?
Thanks,
koko
|
|
|
|
|
Try the Workflow forum. MVP 2010 - are they mad?
|
|
|
|
|
Hello folks,
Can somebody clarify the "OnChanged" event.
Suppose I am copying/transferring a large file, does "OnChanged" fire up for every succesful bytes written? or when the operation is completed?
Thanks,
Koko
|
|
|
|
|
bluish wrote: does "OnChanged" fire up for every succesful bytes written?
No, that is unspecified, hence it will fire at least once, that is all we know. In practice, it fires once for a small file change, and multiple times for a large change.
And FSW does not signal the end of anything, so you often need either a timeout (unspecified duration!), or a loop with try and wait on failure.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|