示例#1
0
 public SVHeartbeatProperties()
 {
     _rect        = new Rectangle(0, 0, 120, 120);
     _controlType = "心跳控件";
     _bitMapArray = new SVBitmapArray();
     _isLock      = false;
 }
示例#2
0
 public SVGifProperties()
 {
     _rect        = new Rectangle(0, 0, 100, 100);
     _controlType = "动态图";
     _picError    = new SVBitmap();
     _pic         = new SVBitmapArray();
     _var         = new List <String>();
     _varType     = new List <Byte>();
     _isLock      = false;
 }
示例#3
0
        /// <summary>
        /// 初始化构造函数
        /// </summary>
        /// <param Name="array">初始化图片数组</param>
        /// <param Name="count">最大图片个数</param>
        public SVBitmapArrayWindow(SVBitmapArray array, Int32 count = 8)
        {
            InitializeComponent();

            ///相关事件注册
            this.dataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
            this.dataGridView.AllowUserToAddRows  = false;
            this.dataGridView.RowPostPaint       += new DataGridViewRowPostPaintEventHandler(dataGridView_RowPostPaint);
            this.dataGridView.Click += new EventHandler(dataGridView_Click);
            this.propertyGrid1.PropertyValueChanged += new PropertyValueChangedEventHandler(propertyGrid1_PropertyValueChanged);

            _bitArray = array;

            ///在表格中,添加最大行
            for (int i = 0; i < count; i++)
            {
                DataGridViewRowChild v = new DataGridViewRowChild();
                dataGridView.Rows.Add(v);
            }

            if (array.BitmapArray == null)
            {
                return;
            }

            Int32 minValue = Math.Min(count, array.BitmapArray.Count);

            for (int i = 0; i < minValue; i++)
            {
                SVBitmap vTmp = array.BitmapArray[i];
                if (vTmp == null)
                {
                    continue;
                }

                DataGridViewRowChild vv = dataGridView.Rows[i] as DataGridViewRowChild;
                vv.Attrib.Bitmap = vTmp;
                dataGridView.Rows[i].SetValues(vTmp.ShowName);
            }
        }