|
Thanx a lot all of u. really it's very easy. Actually i just started dotnet. so, i was worried.
again thanx
|
|
|
|
|
Another solution:
string[] lines = File.ReadAllLines(@"c:\MyFile.Txt");
There are nearly always multiple ways to do anything in .NET!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
hi,
how create a multi file assembly in .net 3.5
|
|
|
|
|
amit sahu20 wrote: how create a multi file assembly in .net 3.5
1) Install VS
2) Run VS
3) From the file menu, select "New...Project"
4) Select your project type, name it, etc.
5) Code your project, making sure to store the code in several files.
6) Hold down CTRL and SHIFT , then press the "B" key.
If this is not helpful, then try giving a little information on what it is you actually want to do.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I used the custom Rendering Ink to build a custom brush. I create a customized dynamic renderer that derives from the DynamicRenderer and override the OnDraw method. In OnDraw method, i need to do a lot of drawEllipse(). After that, the computer becomes very slow. Guys, do you have any solutions about that?
Thanks a lot!
|
|
|
|
|
Since you didn't provide much to work on, and haven't shown any code, all I can do is suggest you read this little article[^] and check the rules outlined there.
|
|
|
|
|
protected override void OnDraw(DrawingContext drawingContext,
StylusPointCollection stylusPoints,
Geometry geometry, Brush fillBrush)
{
// Create a new Brush, if necessary.
if (brush == null)
{
brush = new LinearGradientBrush(Colors.Red, Colors.Blue, 20d);
}
// Create a new Pen, if necessary.
if (pen == null)
{
pen = new Pen(brush, 2d);
}
// Draw linear gradient ellipses between
// all the StylusPoints that have come in.
for (int i = 0; i < stylusPoints.Count; i++)
{
Point pt = (Point)stylusPoints[i];
Vector v = Point.Subtract(prevPoint, pt);
// Only draw if we are at least 4 units away
// from the end of the last ellipse. Otherwise,
// we're just redrawing and wasting cycles.
for (int j=0; j<1000, j++)
{
// Set the thickness of the stroke based
// on how hard the user pressed.
double radius = stylusPoints[i].PressureFactor * 10d;
drawingContext.DrawEllipse(brush, pen, pt, radius, radius); That's the problem...
prevPoint = pt;
}
}
}
|
|
|
|
|
My graphics tablet has 512 pressure levels, and a point resolution of 1016 dpi and reports approx 100 times a second. How many ellipses do you think you are drawing?
And you are wondering why it is slow?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Each stroke i will draw 100 points around it.
I know the reason why it's slow. I want to avoid this situation. So ask all whether you have other solutions.
|
|
|
|
|
Tony Honter wrote: Each stroke i will draw 100 points around it.
Your code draws ten times that!
Tony Honter wrote: for (int j=0; j<1000, j++)
You are aware that compilers don't turn comments into code, aren't you?
Tony Honter wrote: // Only draw if we are at least 4 units away
// from the end of the last ellipse. Otherwise,
// we're just redrawing and wasting cycles.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I hope others have or will give a solution. I didn't study all that, for obvious reasons.
I did notice an interesting comment ("Only draw if...") but did not see its implementation.
|
|
|
|
|
Graphics may use up a lot of resources. Sometimes it may help to explicitly call the Garbage Collection:
GC.Collect();
GC.WaitForPendingFinalizers();
|
|
|
|
|
hi guys
i want to read sms with gsmcomm from nokia phone but i cant read and get error
whats problem ?
from gsmcomm or phone?
thanks
|
|
|
|
|
What's the error and what's the code?
|
|
|
|
|
DecodedShortMessage[] messages = CommSetting.comm.ReadMessages(PhoneMessageStatus.All, storage);
foreach(DecodedShortMessage message in messages)
{
Output(string.Format("Message status = {0}, Location = {1}/{2}",
StatusToString(message.Status), message.Storage, message.Index));
ShowMessage(message.Data);
Output("");
}
Output(string.Format("{0,9} messages read.", messages.Length.ToString()));
Output("");
error:Phone reports generic communication error or syntax error.
of curse i get this code from this site mean codeproject
|
|
|
|
|
behzadcp wrote: of curse i get this code from this site mean codeproject
Then you should post your question in the forum below the article where you got the code, so the person who wrote the code will see your problem.
It's time for a new signature.
|
|
|
|
|
Hi All,
The Problem:
I currently have a few hundred crystal reports which get populated via an ODBC connection. I have to programmatically change this so I can populate a DataSet from a csv file and then populate a report based on the dataset. The main aim is to do this without actually modifying any of the reports (as that would mean months of re-testing of hundreds of reports....and common, who likes to fight with the testing department ;->)
The ideal solution:
My app gets 3 parameters 1) actual report location, 2) report parameter csv file location 3) report data csv file location. To over-ride the ODBC connection specified in the report and populate the report via a dataset populated from the specified csv file.
So far:
At the moment I load the report, populate the report's parameters with those specified in the csv file, create a dataset based on the data csv file and set the report dataset with cryReport.SetDataSource(ds.Tables["tableX"]). The table name in the dataset has been kept the same as the default table name used in all the reports.
The problem seems to be that the report is not pulling in any of the data specified in the DataSet? As far as I can gather from searching the net, you can only populate a report with a strongly typed dataset? I don't see how you can create a strongly typed dataset programmatically for each dataset every-time the application is called, as this cannot be done beforehand.
I would appreciate any direction or help with this problem!
Thanx,
MC
|
|
|
|
|
I can't help with your problem, but it is a very bad idea to post your email address to any forum - not just codeproject. Unless of course, you really like spam...
Change your name! If anyone really wants to contact you privately, there is a option to allow emails at the bottom of each message - this sends an email to your registered address without revealing it to the sender.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I'm trying to re-host wf 4.0 designer (done that) and use custom activity controls that have similar behavior with FlowSwitch. Could you tell me how I could do a custom FlowSwitch with modifiable content( I need a custom picture and a custom textbox). If anybody could give me an example would be great.
Another question is how do I register to events like FlowNode click on a flow chart?
Thank you
|
|
|
|
|
I would like emptying TexBox who are in treatment but in the event selectedchanger:
texbox.text = String.Empty , find an error message because the content of the TexBox changes.
can you help me??
thank you
|
|
|
|
|
tek 2009 wrote: an error message
interesting
tek 2009 wrote: can you help me??
sure
|
|
|
|
|
|
Maybe he means "an error message". Its very specific and helps to guess what your problem is.
Next time write "My application crashs!" to get some more wild guesses.
Greetings
Covean
|
|
|
|
|
He was making a point of being as unspecific as you were.
If you get an error message and need help with it, then include what the error message was.
|
|
|
|
|
Hi there ,
You can't empty the text box while it's changing , it would be user hostile !
I recommended this :
private void textBox1_Enter(object sender, EventArgs e)
{
textBox1.SelectAll();
}
So the user can empty the text box with one Button click
Please , Don't Mind the Other posters ! , they just didn't read the rules !
I know nothing , I know nothing ...
|
|
|
|