Click here to Skip to main content
15,881,248 members
Articles / Web Development / ASP.NET

Race to Linux - Race 3: Reports Starter Kit using Mono SqlServer/Firebird

Rate me:
Please Sign up or sign in to vote.
2.33/5 (2 votes)
30 Sep 20052 min read 52.6K   328   15  
Reports Starter Kit port to Linux using Mono
<html><head><link rel=stylesheet href=style.css></head><body><div class=SourcePanel style='font-size:12'><pre style='background-color:white'>
<font color= "blue">using</font> System;
<font color= "blue">using</font> System.Drawing;
<font color= "blue">using</font> System.Collections;
<font color= "blue"></font>
<font color= "blue">namespace</font> Outlaw.Components
<font color= "blue"></font>{
<font color= "green">    /// <summary></font>
<font color= "green">    /// Summary description for ChartDrawing.</font>
<font color= "green">    /// </summary></font>
<font color= "blue">    </font>abstract public class ChartDrawing
<font color= "blue">    </font>{
<font color= "blue">        private const </font>int COLOR_LIMIT = 12;
<font color= "blue"></font>
<font color= "blue">        private </font>Color[] m_color = 
<font color= "blue">            </font>{ 
<font color= "blue">                </font>Color.Chocolate,
<font color= "blue">                </font>Color.YellowGreen,
<font color= "blue">                </font>Color.Olive,
<font color= "blue">                </font>Color.DarkKhaki,
<font color= "blue">                </font>Color.Sienna,
<font color= "blue">                </font>Color.PaleGoldenrod,
<font color= "blue">                </font>Color.Peru,
<font color= "blue">                </font>Color.Tan,
<font color= "blue">                </font>Color.Khaki,
<font color= "blue">                </font>Color.DarkGoldenrod,
<font color= "blue">                </font>Color.Maroon,
<font color= "blue">                </font>Color.OliveDrab
<font color= "blue">            </font>};
<font color= "blue"></font>
<font color= "green">        //represent collection of all data points for the chart</font>
<font color= "blue">        private </font>ChartItemList dataPoints = new ChartItemList();  
<font color= "blue"></font>
<font color= "blue">        public </font>ChartDrawing(){}
<font color= "blue">        public </font>abstract Bitmap Draw();    //implemented by derived class
<font color= "blue"></font>
<font color= "blue">        public </font>ChartItemList DataPoints
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return dataPoints; }
<font color= "blue">            </font>set{ dataPoints = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public void</font> SetColor(int index, Color NewColor)
<font color= "blue">        </font>{
<font color= "blue"></font><font color= "blue">            if </font>(index < COLOR_LIMIT) <font color= "blue"></font>
<font color= "blue">            </font>{
<font color= "blue">                </font>m_color[index] = NewColor;
<font color= "blue">            </font>}
<font color= "blue"></font><font color= "blue">            else</font><font color= "blue"></font>
<font color= "blue">            </font>{
<font color= "blue">                </font>throw new Exception("Color Limit is " + COLOR_LIMIT);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>Color GetColor(int index)
<font color= "blue">        </font>{
<font color= "blue"></font><font color= "blue">            if </font>(index < COLOR_LIMIT) <font color= "blue"></font>
<font color= "blue">            </font>{
<font color= "blue">                return</font> m_color[index];
<font color= "blue">            </font>}
<font color= "blue"></font><font color= "blue">            else</font><font color= "blue"></font>
<font color= "blue">            </font>{
<font color= "blue">                </font>throw new Exception("Color Limit is " + COLOR_LIMIT);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue">    </font>}
<font color= "blue"></font>}
</pre>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Uruguay Uruguay
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions