Click here to Skip to main content
15,887,240 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.8K   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.Collections;
<font color= "blue">using</font> System.Diagnostics;
<font color= "blue">using</font> System.Drawing;
<font color= "blue"></font>
<font color= "blue">namespace</font> ASPNET.StarterKit.Chart
<font color= "blue"></font>{
<font color= "green">    //*********************************************************************</font>
<font color= "green">    //</font>
<font color= "green">    // ChartItem Class</font>
<font color= "green">    //</font>
<font color= "green">    // This class represents a data point in a chart</font>
<font color= "green">    //</font>
<font color= "green">    //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">    public class</font> ChartItem 
<font color= "blue">    </font>{
<font color= "blue">        private </font>string _label;
<font color= "blue">        private </font>string _description;
<font color= "blue">        private </font>float _value;
<font color= "blue">        private </font>Color _color;
<font color= "blue">        private </font>float _startPos;
<font color= "blue">        private </font>float _sweepSize;
<font color= "blue"></font>
<font color= "blue">        private </font>ChartItem()    {}
<font color= "blue">        </font>
<font color= "blue">        public </font>ChartItem(string label, string desc, float data, float start, float sweep, Color clr)
<font color= "blue">        </font>{
<font color= "blue">            </font>_label = label;
<font color= "blue">            </font>_description = desc;
<font color= "blue">            </font>_value = data;
<font color= "blue">            </font>_startPos = start;
<font color= "blue">            </font>_sweepSize = sweep;
<font color= "blue">            </font>_color = clr;
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>string Label 
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _label; }
<font color= "blue">            </font>set{ _label = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>string Description 
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _description; }
<font color= "blue">            </font>set{ _description = value; }
<font color= "blue">        </font>} 
<font color= "blue"></font>
<font color= "blue">        public </font>float Value 
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _value; }
<font color= "blue">            </font>set{ _value = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>Color ItemColor 
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _color; }
<font color= "blue">            </font>set{ _color = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>float StartPos
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _startPos; }
<font color= "blue">            </font>set{ _startPos = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>float SweepSize
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return _sweepSize; }
<font color= "blue">            </font>set{ _sweepSize = value; }
<font color= "blue">        </font>}
<font color= "blue">    </font>}
<font color= "blue"></font>
<font color= "green">    //*********************************************************************</font>
<font color= "green">    //</font>
<font color= "green">    // Custom Collection for ChartItems</font>
<font color= "green">    //</font>
<font color= "green">    //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">    public class</font> ChartItemsCollection : CollectionBase 
<font color= "blue">    </font>{
<font color= "blue">        public </font>ChartItem this[int index] 
<font color= "blue">        </font>{
<font color= "blue">            </font>get{ return (ChartItem)(List[index]); }
<font color= "blue">            </font>set{ List[index] = value; }
<font color= "blue">        </font>}
<font color= "blue"> </font>
<font color= "blue">        public </font>int Add(ChartItem value) 
<font color= "blue">        </font>{
<font color= "blue">            return</font> List.Add(value);
<font color= "blue">        </font>}
<font color= "blue"> </font>
<font color= "blue">        public </font>int IndexOf(ChartItem value) 
<font color= "blue">        </font>{
<font color= "blue">            return</font> List.IndexOf(value);
<font color= "blue">        </font>}
<font color= "blue"> </font>
<font color= "blue">        public </font>bool Contains(ChartItem value) 
<font color= "blue">        </font>{
<font color= "blue">            return</font> List.Contains(value);
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public void</font> Remove(ChartItem value) 
<font color= "blue">        </font>{
<font color= "blue">            </font>List.Remove(value);
<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