using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
using System.Xml.Serialization;
using System.Windows.Forms;
using MyGeometry;

namespace SmartLayout
{
	public class MeshRecord
	{
		[Browsable(false)] public Mesh Mesh { get; set; }
		[Browsable(false)] public Matrix4d CurrentTransformation { get; set; }
        [Category("Model Info")]
		[ReadOnly(true)] public string Filename { get; set; }
		[Browsable(false)] public List<MeshView.IMeshDisplay> AlgorithmObjects { get; set; }
        [Category("Model Info")]
		public int VertexCount { get { return Mesh.VertexCount; } }
        [Category("Model Info")]
		public int FaceCount { get { return Mesh.FaceCount; } }
    //    [Category("Algorithm")]
  

        ///////////////////////////////////////////////////////////////////
        //NEW_ADD
        #region data
        private Color modelColor = Color.Tan;// Color.CornflowerBlue;
        private Color backgroundColor = Color.White;
        #endregion

        #region properties
        [Category("Model Info")]
        public Color ModelColor
        {
            get
            {
                return modelColor;
            }
            set
            {
                modelColor = value;
                Program.GetFormMain().GetMeshView().Refresh();
            }
        }
        [Category("Model Info")]
        public Color BackgroundColor
        {
            get
            {
                return backgroundColor;
            }
            set
            {
                backgroundColor = value;
                Program.GetFormMain().GetMeshView().Refresh();
            }
        }
        #endregion
        ///////////////////////////////////////////////////////////////////

		public byte TabIndex = 0;

		public MeshRecord(Mesh m)
		{
			this.Mesh = m;
			this.CurrentTransformation = Matrix4d.IdentityMatrix();
			this.AlgorithmObjects = new List<MeshView.IMeshDisplay>();
		}
	}
}