public void AddDataWidget(DataWidget dw)
 {
     dw.Top = 0;
     Parts.Add(dw);
     this.Controls.Add(dw);
     ChangeLayout();
 }
 public void AddDataWidget(DataWidget dw)
 {
     dw.Top = 0;
     Parts.Add(dw);
     this.Controls.Add(dw);
     ChangeLayout();
 }
 public static DataBlock CreateDataBlock(ZBlockDescribe zBlockDescribe)
 {
     DataBlock dataBlock = new DataBlock();
     dataBlock.Title = zBlockDescribe.BlockName;
     dataBlock.TitleTips = "0x" + zBlockDescribe.BlockWord.ToString("X");
     for (int i = 0; i < zBlockDescribe.ZParts.Length; i++)
     {
         DataWidget dataWidget = new DataWidget();
         dataWidget.Title = zBlockDescribe.ZParts[i].Name;
         dataWidget.TitleTips = zBlockDescribe.ZParts[i].DataType.ToString();
         dataWidget.TextTips = zBlockDescribe.ZParts[i].ShowType.ToString();
         dataWidget.DataString = "0";
         dataBlock.AddDataWidget(dataWidget);
     }
     dataBlock.SetPartsWidth(100);
     return dataBlock;
 }