Exemplo n.º 1
0
		/// <summary>
		/// Loads a Hues object from a file
		/// </summary>
		/// <param name="FileName">The hues.mul file to read from</param>
		/// <returns>A Hues object</returns>
		public static Hues Load( string FileName )
		{
			if ( ! File.Exists( FileName ) )
				return null;

			try
			{
				FileStream stream = new FileStream( FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite );
				BinaryReader reader = new BinaryReader( stream, System.Text.Encoding.ASCII );

				Hues hues = new Hues();

				for ( int i = 0; i < 375; i++ )
				{
					hues.m_Groups[ i ] = HueGroup.Read( reader );
				}
				stream.Close();
				
				return hues;
			}
			catch
			{
				return null;
			}
		}
Exemplo n.º 2
0
		public HueSelector()
		{
			InitializeComponent();

			// Issue 10 - Update the code to Net Framework 3.5 - http://code.google.com/p/pandorasbox3/issues/detail?id=10 - Smjert
			SelectedHues = new List<int>();
			// Issue 10 - End

			TempBmp = new Bitmap( 450, 300 );

			m_Hues = Hues.Load( Pandora.Profile.MulManager[ "hues.mul" ] );

			DrawHues();

			SelectedHues.Add( 1 );
			DrawSelectionChart();
			SelectedHues.Clear();
			TheImage.Image = Chart;
			SelectionChart = (Bitmap) Chart.Clone();

            Pandora.Localization.LocalizeControl(this);
			//Pandora.Localization.LocalizeControl( this );
		}