Block III Unit 3 3 A log file

Block III – Unit 3 3 - A log file viewer 4 - Data display 1

3 - A log file viewer 2

Decisions • If we want to add a log file viewer to our application: – Should the display be a separate window? – Should the display be viewable all the time or on request? – Should we change the application to MDI? 3

Log file viewer sketch Memo Panel 4

Computer Activities • Computer Activities 3. 1 3. 2 • Summary of important new terms and ideas: – TStrings and Load. From. File – How to make a normal window visible – How to close a window and leave the application running. – Show. Modal – File. Exists() 5

4 - Data display 6

Simple graph 7

class Data. Engine. Type 1 { private: int Maximum; int Minimum; int Number. Of. Items; int Data[50]; int Current. Item; public: int Max(void); int Min(void); int Next. Item(void); bool Init(Ansi. String File. Name); int Size(void); }; 8

Graphing: Paper and Pen • The paper is represented by the form’s Canvas property which is of the TCanvas class. • The dimensions of this drawing space are available as the Client. Width and Client. Height properties of the form. • Various methods of TCanvas allow you to draw on the form; the ones required here are the Move. To and Line. To methods. 9

Graphing: Example Canvas Move. To(20, 30); Canvas Line. To(80, 10); • Move. To changes the Pen position to 20, 30 • Line. To draws the line from the Pen position to 80, 10 10

Computer Activities • Computer Activity 4. 1 4. 2 11
- Slides: 11