Click here to Skip to main content
15,893,904 members
Articles / Desktop Programming / WPF

WPF-Less GDI+.NET Report Component: Star Report

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
25 Jan 2013CPOL8 min read 46.6K   1.5K   42  
StarReport: WPF-less GDI+.NET report component.
using System;
using System.Drawing;
using System.Text;
using System.IO;
using System.Reflection;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace UniverseReport
{
	internal enum Schemes{MacOs,Xp,Plex};

	internal class SkinImage
	{
	
		public static ImageObject button;
		public static ImageObject checkbox;
		public static ImageObject radiobutton;

		private Schemes scheme=Schemes.MacOs;

		public SkinImage()
		{
			
		}

		static SkinImage()
		{
			Xp1skin();
		}

	
		protected static void MacSkin()
		{
			button=new ImageObject("UniverseReport.mac_button.png",5,Rectangle.FromLTRB(14,11,14,11));
			checkbox=new ImageObject("UniverseReport.mac_checkbox.png",12,new Rectangle(0,0,0,0));
			radiobutton=new ImageObject("UniverseReport.mac_radiobutton.png",8,new Rectangle(0,0,0,0));
		}

		protected static void Xp1skin()
		{
			button = new ImageObject("UniverseReport.xp1_button.png",5,Rectangle.FromLTRB(8,9,8,9));
			checkbox = new ImageObject("UniverseReport.xp1_checkbox.png",12,new Rectangle(0,0,0,0));
			radiobutton = new ImageObject("UniverseReport.xp1_radiobutton.png",8,new Rectangle(0,0,0,0));
		}

		protected static void Plexskin()
		{
			button = new ImageObject("UniverseReport.Plex_button.png",5,Rectangle.FromLTRB(8,9,8,9));
			checkbox = new ImageObject("UniverseReport.Plex_checkbox.png",12,new Rectangle(0,0,0,0));
			radiobutton = new ImageObject("UniverseReport.Plex_radiobutton.png",8,new Rectangle(0,0,0,0));
		}

		public Schemes Scheme
		{
			get
			{ return scheme;
			}
			set
			{
				scheme = value;
				
				switch (scheme)
				{
					case Schemes.MacOs:
						MacSkin();
						break;
					case Schemes.Xp:
						Xp1skin();
						break;
					case Schemes.Plex:
						Plexskin();
						break;
				}
				
			}
		}

	}

}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Finance Industry
United States United States
Currently pursuing 'Programming Nirvana' (The ineffable ultimate in which one has attained disinterested wisdom and compassion as it relates to programming)

Respected Technologies
1. Confusor (https://confuser.codeplex.com/)
2. Power Threading (http://www.wintellect.com/Resources/visit-the-power-threading-library)
3. EDI Parsers (http://www.rdpcrystal.com)


Acknowledgements:

Microsoft Certified Technologist for WPF and .Net 3.5 (MCTS)
Microsoft Certified Technologist for WCF and .Net 3.5 (MCTS)
Microsoft Certified Application Developer for .Net (MCAD)
Microsoft Certified Systems Engineer (MCSE)
Microsoft Certified Professional (MCP)

Sun Certified Developer for Java 2 Platform (SCD)
Sun Certified Programmer for Java 2 Platform (SCP)
Sun Certified Web Component Developer (SCWCD)

CompTIA A+ Certified Professional

Registered Business School Teacher for Computer Programming and Computer Applications (2004)
(University of the State of New York Education Department)

Graduated from University At Stony Brook

Comments and Discussions