Ejemplo n.º 1
0
 public KinectFaceMeshJig()
 {
     _displayFaceMesh     = false;
     _polygonPoints       = new Point3dCollection();
     _polygonPositions    = new Point3dCollection();
     _numPolygonPositions = new UInt32Collection();
     _numPolygonPoints    = new UInt32Collection();
     _outlineColors       = new EntityColorCollection();
     _fillColors          = new EntityColorCollection();
     _outlineTypes        = new LinetypeCollection();
     _fillOpacities       = new TransparencyCollection();
 }
Ejemplo n.º 2
0
            public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
            {

                if (value.GetType() == typeof(string))
                {
                    // Parse property string
                    string[] ss = value.ToString().Split(new char[] { ';' }, 2);
                    if (ss.Length == 2)
                    {
                        // Create new PaddingCollection
                        TransparencyCollection item = new TransparencyCollection((Month)context.Instance);
                        // Set properties
                        item.Background = int.Parse(ss[0]);
                        item.Text = int.Parse(ss[1]);
                                                
                        if (item.Text > 255)
                            item.Text = 255;
                        if (item.Text < 0)
                            item.Text = 0;
                        if (item.Background > 255)
                            item.Background = 255;
                        if (item.Background < 0)
                            item.Background = 0;

                        return item;
                    }
                }
                return base.ConvertFrom(context, culture, value);
            }
Ejemplo n.º 3
0
		public Month(MonthCalendar calendar)
		{
			m_calendar = calendar;
			m_dateFont = new Font("Microsoft Sans Serif",(float)8.25);
			m_textFont = new Font("Microsoft Sans Serif",(float)8.25);

			m_dayInFocus = -1;
			m_selArea.Clear();
			
            m_formatTrailing = true;
			m_imageAlign = mcItemAlign.TopLeft;
			m_dateAlign = mcItemAlign.Center;
			m_textAlign = mcItemAlign.BottomLeft;
			m_imageClick = false;
			
			// we need 42 (7 * 6) days for display
			m_days = new Day[42];
			for (int i = 0;i<42;i++)
			{
				m_days[i] = new Day();
				m_days[i].Month = this;
				m_days[i].Calendar = m_calendar;
            }

			m_colors = new MonthColors(this); 
			m_borderStyles = new MonthBorderStyles(this); 
			m_padding = new MonthPadding(this);
            m_transparency = new TransparencyCollection(this);
        }