|
|
|
Thanks a bunch jerk, now I can't delete my message until you delete yours. Did you not see my comment to Jacek? The reasons I gave my original response were entirely justified because of the way that the forums are intended to be available for use later on and not just now. Now I can't delete this thread chain, and I have to leave it there to give context.
some_beginner wrote: It is just natural that people ask those questions because they hope that the
professionals here either have been in the same situation and are thus able to
provide a good answer or maybe even a solution
Yes, but in the correct forum, not where whim takes you. Honestly, it's as if you don't care that other people are meant to be able to search for solutions to problems that have been solved before.
|
|
|
|
|
I had to read your message three times before I could beleive you'd written in in seriousness.
Given your total two/three year contribution to the site is five messages, two of which can be seen in this thread, do you think it is appropiate that you should tell someone who is a regular (and a pretty decent and helpful chap to boot) what to do here? The OP posted on the wrong thread, it dimishing the usefulness of this site as a research tool.
Two other aspects of professionalism you missed: Getting your facts straight and not hurling insults.
Oh, and if you can't stand the occaisional "acid" comment get out of IT now, you'll never succeed.
|
|
|
|
|
Keith Barrow wrote: if you can't stand the occaisional "acid" comment get out of IT now
5!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Note: I set the property using Dispather.BeginInvoke{...} . Can it be an (indirect) source of exception? I cannot check it right now so please think of it anyway.
Greetings - Jacek
|
|
|
|
|
You should really have moved this back to the WPF forum. The issue is that resources that are in or consumed in a control template have to be frozen. This is done so that the resource can be shared across control instances quickly. Once you set the binding on the Dependency Object on a Freezable, you stop it from being frozen.
As you can't create a static resource of the RepeatBehavior, I'd suggest that this is one of those instances where it is perfectly legitimate to have code in the code behind of the view. Don't tie yourself into logical knots here - view specific code in the view code-behind is legitimate.
|
|
|
|
|
Hi,
I want to Update a TreeView() method of the MDI Child Form (Form Project;) by clicking a button on another MDI Child Form (Form AddPhase;). Both Forms are open in the MDI container, however AddPhase is active.
MDI Parent name = MainForm
How do I do that?
Greetzzz....
G
|
|
|
|
|
The best way is to have AddPhase raise an event, which MainForm subscribes to. It can then route the information to Project either again via an event or via a property as seems appropriate for you design. That way, only the MainForm knows about the existence of (and interrelation between) the two MDI children.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Thanx for the reply,
I already found the answer. Using a public interface IChangeNotification works!
G
|
|
|
|
|
Hi everybody,
I wanna have the smallest code to conver a double to a string without the point of digits
Exple:
12.010 --->1201
ty
modified on Friday, March 18, 2011 6:03 AM
|
|
|
|
|
The only way you're going to "have" is to write it yourself. We're not going to write it for you, and frankly, this can be done in a single line of code.
...and this reeks of being a homework assignment.
|
|
|
|
|
What... You need a WHOLE line. I could do it in 1/3 of a line...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I'll do it in a 1/3 of a line at 640x480. If you want to beat that, you'll have to "name that tune"!
|
|
|
|
|
The current one playing is Lennon's version of Stand by Me, but I sing it I'll clear the room.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
By "smallest" what do you mean? Does your homework need the fewest number of characters? The shortest IL? The quickest execution? Or what?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
using (Font f=new Font("Courier New", 0.01)) {
}
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
(anti)hint: NumberFormat.DecimalSeparator does not accept an empty string.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
That is an unusual requirement. However:
double d = 12.010;
string s = Math.Truncate(d * 100).ToString();
|
|
|
|
|
Or
d.ToString().Replace('.', string.Empty); So many ways to do it, and as usual, the requirements exist in a fug of inadequacy.
|
|
|
|
|
I'm sorry to say, I see two problems with that:
1. it doesn't compile as Replace needs (char,char) or (string,string);
2. cultural differences may cause some other character to act as decimal point, a comma for instance.
So I'd suggest d.ToString(NumberFormatInfo.InvariantInfo).Replace(".", ""); as the proper way to do it,
and possibly ""+(int)(100*d) as the shortest code (with overflow risks).
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Don't be sorry. You are right after all.
|
|
|
|
|
Well, I do am sorry in a different way, as I didn't find a way to signal your code's weakness without violating Dave's hint not to answer homework questions in any detail. That must be the price to pay when coming late to a thread.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
The reason I posted mine is because, weaknesses from typing it up on a phone keyboard notwithstanding, it's a poor way of solving the problem - and then you went and corrected it. I ignored various edge cases, which you started to correct - shame on you .
|
|
|
|
|
always insulting me thank u for u help
|
|
|
|