|
If you're using someone elses code, where did it come from ? If a CP article, there's a forum under that article where you can ask the author directly
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
How to throttle the file streams using performance counter values?
I want to trasnfer the data from source path to destination path (While taking backup), i want to check the IO bandwidth using performance counters. Depends on the value of performance counter i have to transfer the data from source to destination path.
I am using Physical Disk performance counter with instance Avg Disk Queue Length. I am getting the value. depends on that value i have to manage the transfer rate of files..
If counter value is less i have to transfer the data with maximum speed. If counter value is more i have to transfer the file with less speed.
I am using C#. Please let me know if you know any idea on throttling or adjust the transfer speed with performance counter..
Thanks inadvance..
Ravi Majji
|
|
|
|
|
Ravi plz google it
if you got the answere then please Post it
wasim khan
|
|
|
|
|
I am trying to create a PDF report using C#. I have used PDFSharp to do one report, but now I need to do a more complicated report. I have looked at many different PDF engines on this page:
http://csharp-source.net/open-source/pdf-libraries[^]
These engines do not really meet my needs. The closest one is the "ASP.Net FO PDF" - but I could not get it to work because this is a Windows application. PDFSharp is working, but it does not meet some of my requirements. I'm driving myself nuts with this. I need a PDF engine which meets my requirements:
1. Must generate a native PDF file and be able to open the viewer on the person's machine
2. Must be able to combine graphics and text
3. Should be able to create a proper "HTML-Style" table with proper word wrapping within the cells
4. I would rather not have to draw everything and measure it as if it was graphics
5. I need it to be able to do pagination - this is one that's really giving me a headache - I've tried the text formatter tool in PDFSharp, but there is no way to measure the height of the string after it's been formatted into the box! That means I have no idea where to position the next row in the table, and I have no idea when to create a next page.
I have used Apache XSL-FO and would really like some kind of template engine like that - but I am totally on foreign ground here and have no idea what options are out there - Google is a total waste of time as I've already tried all the engines that come up in Google searches - basically that page I posted is the entire list that I can find. If you know of something like this, please let me know. I can't use Crystal I don't think... because I need to re-distribute the whole thing and I can't afford any licensing. I don't even know if Crystal could do what I want...
|
|
|
|
|
There are free libraries that print to a pdf. I don't see any way for you to create a graphic without drawing it yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Please read my question before you point me to Google like I'm some kind of noob. As I said, I've tried the free things that seem to be available and I'm here simply asking if someone knows of something ELSE that might meet my requirements. I've been on this forum a long time and I've helped a lot of people and was simply hoping that someone might be able to give something back. Sometimes (rarely) people have heard of things that don't show up on Google, and I thought I made it perfectly clear that was what I was looking for.
You are not reading my requirements carefully either. I have to mix graphics and text - obviously I'm going to draw the graphics in the normal way, but I don't want to draw text that same way.
Since I've done a lot of research on this subject myself I really didn't expect to get a good answer, but I REALLY didn't expect to be pointed to Google like I'm some kind of idiot. Thanks a lot, that was really helpful, and now I'm buried 10 pages in and nobody will ever see this. This site used to be friendly.
|
|
|
|
|
Jasmine2501 wrote: like I'm some kind of noob
I guess you are a noob, b/c you plainly don't know what a sig block is.
Jasmine2501 wrote: You are not reading my requirements carefully either. I have to mix graphics and text - obviously I'm going to draw the graphics in the normal way, but I don't want to draw text that same way.
OK - your comment about some other library didn't make that clear, it made me think you hoped to generate graphics via something analagous to an XSLT transform.
Jasmine2501 wrote: but I REALLY didn't expect to be pointed to Google like I'm some kind of idiot
If you look at any of my posts, you'll see they all have the same sig block. Are you SURE you've been here a long time ?
Jasmine2501 wrote: Thanks a lot, that was really helpful, and now I'm buried 10 pages in and nobody will ever see this.
Well, it was visible for some time, a lot of people here post answers even when a question has been answered ( I believe they are trying to win CP MVP status ), so I doubt that my answer hurt you. Obviously if someone had answered who had a better response, I'd have stayed out, but it seemed no-one was helping, so I tried to answer as best I could. Sorry that my sig block offened you. I do note you have a sig block tho, so why did it confuse you ?
Jasmine2501 wrote: This site used to be friendly.
Yeah, I know what you mean. I get yelled at for trying to help a lot these days. And downvoted for giving good answers. I wonder why I bother at times.
I suggest rewording your question so it's clearer, you seemed to me to be saying you didn't want to use a graphics object at all. Then by all means repost it if you hope to find a better answer. Truth is, I find it rare to get an answer to a difficult question here nowadays, the flood of the sort of questions for which my sig block exists, pretty much causes any real question to get lost pretty quick.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm sorry I guess I overreacted. I didn't realize that was your sig. You must be having real issues with people to have to put something like that on every post.
Apache XSL-FO does generate PDFs with a XSLT somehow, and can mix graphics - vectors or JPGs/GIFs in the same document very easily. It is very nice to use, and I really wish I could find something like that which would work with C#. I couldn't get it to compile with J# - that is a project for another time.
When I go ahead and post a question on here, you have to realize it's a problem that someone with 25 years of experience can't figure out. I used to have to figure out stuff like this without the benefit of the internet, so I know how to do research, and when I'm at my wit's end, you can be sure it's a pretty hard question and I've tried for a long time to figure it out myself. I consider posting a question on a forum to be an absolute last resort, when all other avenues of discovery have been exhausted, and posting a question to a forum is a very open admission of failure, and you can quote me on that. I wish other people would do the same. You and some others on here are, IMO, some of the best people to ask those kind of questions.
It is no excuse, but I was in a pretty bad mood this morning because my RX-7 is dying a slow death and I couldn't make it to work this morning, and if I don't finish this software soon (which is not my regular job), I won't have the money to pay for the car I just bought
I really love coding, and when I can't make it to work, I get a little funky - this is the pitfall of having a job you actually like.
|
|
|
|
|
Jasmine2501 wrote: You must be having real issues with people to have to put something like that on every post.
Oh, you can't imagine.
Jasmine2501 wrote: Apache XSL-FO does generate PDFs with a XSLT somehow
OK - well, that sounds uber cool. You can't use it from C# ?
Jasmine2501 wrote: I really love coding, and when I can't make it to work, I get a little funky - this is the pitfall of having a job you actually like.
Yeah, I know what you mean....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, I did successfully use XSL-FO with ASP.Net at my last job, but I actually had to pass the document to the Apache server, then stream it back through the ASP site. On the user side, it was transparent, but lets just say I'm glad I'm not maintaining it now. I essentially wrote "ASP.Net FO" from that link I posted in the OP - and if it wasn't for a job, I would have released the template engine as an open-source thing. I am still considering opening up "GayML" as open-source, which I developed on my own time, and then used for that job. It works with ODBC or any database and can produce RTF, XML, and templates for XSL-FO - or anything else XML-based for that matter. Just don't tell Blue Shield that something called "GayML" is creating their PDFs
XSL-FO is "Formatted Objects" and it's similar to laying out a web page - you can have a "flow" layout, and it automatically paginates with headers and footers, page numbering, and so on. It's worth it to try to make it work, because the templates are XML/XSLT and that would mean that my business partner could create new reports and I wouldn't have to do the layout work, only connect the data. It is worth taking another look at, but I don't really have time for it at the moment. I got PDFSharp to sorta do what I want in a very brute-force way, but it's not elegant and it's not something I want to go forward with for a long time. I can get the product out the door, but I'm not proud of it.
On the Google issue - I really wish that everyone would see it like I do - posting a question to a forum and asking for help means you failed, and you should feel bad about that - but not bad enough to risk the project on it or something. Ask for help when you need it, but make sure you actually need it and aren't just being a lazy person.
|
|
|
|
|
is there any way to see undocheckouts in a file history or somewhere like that in vss8.0?
post your replies on visual studio forum,thanks
modified on Thursday, June 26, 2008 4:42 AM
|
|
|
|
|
Not sure, I am also not sure where is the right place to ask this. Visual Studio forum perhaps ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ya,you're right I'm gonna ask it on visual studio forum
|
|
|
|
|
fateme_developer wrote: is there any way to see undocheckouts in a file history
i dont think so. only checkedin and labled you will get from History list
|
|
|
|
|
Hi
I want to get printer information using PJL(Printer job description language) in c#.
can anybody tell me how to send PJL command to USB connected printer in C#?
Thanks.
|
|
|
|
|
|
Hi Bert delaVega
Thanks for reply
Actually this code is to connect LAN printer not for USB connected printer.
If you have any Idea about USB connected printer, Please help me.
Thanks.
|
|
|
|
|
need help..
how to convert this code to c#?
----- dim strTemp() as string - vb code...
can anyone help.. im just new to c#... thank you..
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Its just simple.
string[] strTemp;
If you want to assign a NULL value at initialization level, then
string[] strTemp = null;
|
|
|
|
|
This is one of the problems with VB - those parentheses mean it's an array. You should be able to figure out from there... if not... you need to go back and read your C# book again.
|
|
|
|
|
Hello,
CF 3.5 VS 2008
I have a timer control that is being used to do some work. Code below. The timer interval is set for 1 second. However, when the timer is running the UI freezes for a short period.
I understand that the timer control is uses the UI thread, but I didn't think the amount of work was too much to make the UI freeze for short periods.
I couldn't see any server timers for the compact framework.
Any suggestions would be most helpful.
<br />
private void GetSignalStrength()<br />
{<br />
try<br />
{<br />
if (currentAdapter.NearbyAccessPoints.Count > 0)<br />
{ <br />
foreach (AccessPoint ap in currentAdapter.NearbyAccessPoints)<br />
{<br />
if (ap.Name == currentAdapter.AssociatedAccessPoint)<br />
{<br />
this.DisplaySignalStrength(ap.SignalStrength.ToString());<br />
break;<br />
}<br />
}<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
<br />
private void DisplaySignalStrength(string strength)<br />
{<br />
this.pbExcellent.BackColor = Color.Transparent;<br />
this.pbVeryGood.BackColor = Color.Transparent;<br />
this.pbGood.BackColor = Color.Transparent;<br />
this.pbLow.BackColor = Color.Transparent;<br />
this.pbVeryLow.BackColor = Color.Transparent;<br />
<br />
switch (strength)<br />
{<br />
case "Excellent":<br />
this.pbExcellent.BackColor = Color.Green;<br />
this.pbVeryGood.BackColor = Color.Green;<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Very Good":<br />
this.pbVeryGood.BackColor = Color.Green;<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Good":<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Low":<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Very Low":<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
default:<br />
break;<br />
}<br />
}<br />
<br />
private void tmrPollAP_Tick(object sender, EventArgs e)<br />
{<br />
this.GetSignalStrength(); <br />
}<br />
|
|
|
|
|
Use threading...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Indeed. Start a new thread to run the timer on and when the OnTick event is triggered, I believe you can use this.Involk(); to involk a delegate method to be handled in the main thread?
Not sure but, its a suggestion.
Andy
|
|
|
|
|
Hello,
I didn't really want to use threading. As I would have to invoke all the picture boxes to be updated. As the picture boxes are created on the UI thread.
However, I am experimenting with the code below. Any suggestions would be most helpfull.
Thanks,
<br />
Thread th;<br />
public void StartPolling()<br />
{<br />
this.GetWirelessAdapters();
th = new Thread(ThreadPollStrength);<br />
th.IsBackground = true;<br />
th.Start();<br />
}<br />
<br />
private void ThreadPollStrength()<br />
{<br />
this.GetSignalStrength();
Thread.Sleep(1000); <br />
}<br />
|
|
|
|
|
Just read how invoking control in UI because the control an a UI runs in separated thread
delegate void UpdatePictureBoxCallBack(PictureBox pb, Color color);
private void UpdatePictureBox(PictureBox pb, Color color)
{
if (pb.InvokeRequired){
pb.Invoke(new UpdatePictureBoxCallBack(UpdatePictureBox), new object[] {pb, color});
}else{
pb.BackgroundColor=color;
}
}
call this method for each condition and picture box on your timer ticks event as you submit early
i hope this usefull
dhaim
program is hobby that make some money as side effect
|
|
|
|
|