Sinopsis
This is the third of six-volumes on Programming in C#. These are detailed chapters covering diverse topics such as INI and XML file processing, Printing and Formatting. 470 pages. See the ebook version's "look inside" for a better preview. 2024.1104
Chapter 14 INI Files:
Many think INI files (configuration files) are old-fashioned, but I use them in nearly all of my programs to set background preferences, server-names, and the like. With the text-parsing skills from Chapter 7 and 12, read the ASCII file and parse name-value pairs. Even if you do not intend to use INI files, the skills taught here are valuable.
Chapter 15 - XML Files:
XML files are a more modern way to store preferences and other data, and these can replace traditional INI files. This is the format used to move data into and out of most web applications. In this chapter, learn the ins-and-outs for xml file processing. You will also learn about the undeniably handy app.config.xml file which can fully automate how a program's preferences are stored.
Chapter 16 - Windows Registry
The Windows Registry is a database for storing a computer's application preferences. Use this chapter to rifle through and change values. Kind-of-boring, but sometimes needed.
Chapter 17 - Excel and Intro to SQL:
Read and write from Excel files! Learn how to open a sheet and consume the data-there-in, processing row-by-row. In this same chapter, connect to a simple SQL database and read a table, populating a selection-lists (comboBoxes). This is the lightest of introductions to SQL. See Volume 5 for all things-SQL.
Chapter 18 - External Shells:
Shows how to use C# to launch other programs and tasks, as well as to prevent multiple launches of your programs. With this, you can call any other program (such as launching notepad, excel). It is surprising how often this is needed.
Chapter 19 - Waits, Delays, and Pauses:
Learn how to "suspend" a program. Having a program hesitate here-and-there solves problems with databases and caches that are not yet flushed. Use these ideas to "blink" buttons and other controls on your form. This chapter does not use the default C# "sleep" command -- where your program completely hangs while sleeping. Instead, you will write the elusive "wait" - where a paused program still gives keyboard and mouse control -- something you never see described in the wild. Then, learn about count-down timers, periodic jobs, and other automated batch techniques.
Chapter 20 - Printing:
Printing in C# is treacherous. This chapter covers everything from font-sizes, line-heights, lines-per-page, page-breaks, headers and footers. Also shown are graphic objects, shadow-boxes, horizontal and vertical lines. This is a challenging chapter.
Chapter 21 - Formatting:
An expansive chapter on formatting covers all numeric picture clauses, padding, justification, fonts, etc.. Every imaginable picture clause is described and it is darn'd handy to have all this in one place.
Write your own "@Proper" routine to fix badly-typed names. This chapter can handle mal-formed names and addresses, such as "von Newman", "mcgreggor", "tom allEN Smith, Jr.", "123 n. elm st. Suite 102", and other train-wrecks.
Then, write a phone-number formatter that punctuates phone numbers exactly as you want - no matter how badly the original data was. Practically-speaking, this one routine is a complete program by itself and here it is, just another function in the chapter.
About this series
There are six books in this series with 2,100-pages and 1,300 illustrations. This can be frightening but this was done to keep printing manageable. Don't panic. Each book is inexpensive and approachable, and with electronic publishing, I can devote the time and graphics to explain each topic in detail.
Thank you for purchasing. I hope you enjoy it as much as I have had writing it.
"Sobre este título" puede pertenecer a otra edición de este libro.