1) Why is the key type of the Dictionary int rather than Fields?
2) Why is the value type of the Dictionary char rather than int?
3) Why do you protect yourself against missing values in the dictionary?
4) What's with the -64 ?
1. Good point .
2. Because it is importing data from an Excel spreadsheet, the char is the user defined column where the field is located
4. To convert the ASCII letter to its appropriate index in the object array
The question is; how much control do you have over these details?
In fact, the grid would be more useful as object rather than object[,].
Your a bright man . My code needs to be re-thought a bit here to clean it up.
I want to see ( view ) some files with different formats like "PDF" or "DOC" or "HTML" , ...
how can I do it?
I`m not a professional programmer so help me in a simple way! Please!!!
Also I don`t know how to use a reference or Dll in C# Project
I need your help immediately
I ask my question in another way :
I have a listbox that there are some names of different EBook in it. these EBooks have different format like "PDF" , "DOC" , "HTML" , ...
Now I want to bring the text of these EBooks in my C# Project
for example I think I need a PDF viewer or doc viewer; but I don`t know how to use it
thanks in advaced
You can assume that a client machine have installed Acrobat Reader or similar software and use System.Diagnostics.Process.Start(string fileName) method to launch a PDF file.
If you don't want to make such assumptions (and you should not), you can attach to the installator a light-weight PDF viewer like a Foxit Reader[^] (the best PDF viewer I've ever seen). On this[^] page you can also get a Foxit SDK which allows you to render pdfs into bitmaps and then use them in your app. Hope it helps.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
thanks a lot, nelsonpaixao
that was a very good way for working with text file and reading & writing them
But as I siad I want to bring the content of Pdf file or Doc File to for example richTextFile
I can`t use StreamReader class for working with PDF File & Doc File
who can help me?
In fact I want to open PDF File in my application
private Timer Clock = new Timer();//create a timer
void Clock_Tick(object sender, EventArgs e)
//refresh the time every 1 second
this.winFormTimerLabel.Text = DateTime.Now.ToLongTimeString();
private void Form1_Load(object sender, EventArgs e)
Clock.Interval = 1000;//every 1 second do something
//what the program is supposed to do when 1 second elasped
Clock.Tick += new EventHandler(Clock_Tick);
Clock.Start();//starts the timer
I finally understood where did I went wrong - I did not put in the interval value and I did not start the timer..... silly me