Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

is my design ok?(generic printing)


hi ,

After reading a fw articles , i made this printEngine class that
derives from PrintDocument. The print engine takes any class that
exposes the IPrintableDocument interface. This interface defines a
method that supplies a PrintablePage to the exposing class which
should fill the page with classes that expose IPrintableSection. Its
not very complicated but it does have a few flaws. Like although it
_can_ handle pagination , it does'nt do it very well.

Could someone please check the code and tell me if the design is ok?
And if it needs any improvements?

I should mention that i'm a self taught newbie!

Heres the code:
http://gidsfiles.googlepages.com/PrintingCore.cs
http://gidsfiles.googlepages.com/_PrintableSections.cs
http://gidsfiles.googlepages.com/PrintTest.cs

This is how the print engine is used with the printTest class:
PrintEngine pDoc = new PrintEngine();
pDoc.PrintableDocument = new PrintTest();
PrintDialog prt = new PrintDialog();
prt.Document = pDoc;
prt.ShowDialog();
PrintPreviewDialog prev = new PrintPreviewDialog();
prev.Document = pDoc;
prev.ShowDialog();

Thanks so much

Gideon

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc