50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System.Drawing;
 | 
						|
using DevComponents.DotNetBar.Metro.ColorTables;
 | 
						|
using DevComponents.DotNetBar.Metro.Rendering;
 | 
						|
using DevComponents.DotNetBar.Rendering;
 | 
						|
 | 
						|
namespace DevComponents.DotNetBar.Charts.Style
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Create the Metro Visual Style for ChartControl.
 | 
						|
    /// </summary>
 | 
						|
    public class MetroStyleFactory : VisualStyleFactory
 | 
						|
    {
 | 
						|
        private MetroPartColors _MetroPartColors;
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Initializes a new instance of the MetroStyleFactory class.
 | 
						|
        /// </summary>
 | 
						|
        public MetroStyleFactory()
 | 
						|
        {
 | 
						|
            _MetroPartColors = MetroRender.GetColorTable().MetroPartColors;
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Initializes a new instance of the MetroStyleFactory class.
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="metroPartColors">Metro Part Colors to Initialize Style with.</param>
 | 
						|
        public MetroStyleFactory(MetroPartColors metroPartColors)
 | 
						|
        {
 | 
						|
            _MetroPartColors = metroPartColors;
 | 
						|
 | 
						|
            if (metroPartColors == null)
 | 
						|
                _MetroPartColors = MetroRender.GetColorTable().MetroPartColors;
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Create the DefaultVisualStyle for ChartControl.
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="factory">Color-Factory used to generate colors.</param>
 | 
						|
        /// <returns>New instance of DefaultVisualStyles class.</returns>s
 | 
						|
        public override DefaultVisualStyles CreateStyle(ColorFactory factory)
 | 
						|
        {
 | 
						|
            DefaultVisualStyles visualStyle = new DefaultVisualStyles();
 | 
						|
 | 
						|
            // TODO: Add int code
 | 
						|
 | 
						|
            return (visualStyle);
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |