Beispiel #1
0
 /// <summary>
 /// 获取新的属性窗体
 /// </summary>
 /// <param name="drawObject">图形</param>
 /// <returns></returns>
 private ucProperiesBase GetNewUcProperies(Type type)
 {
     ucProperiesBase ucBase = null;
     if (type.Name == new DrawLine().GetType().Name)
     {
         ucBase = new ucProperiesLine();
     }
     else if (type.Name == new DrawText().GetType().Name)
     {
         ucBase = new ucProperiesText();
     }
     else if (type.Name == new DrawRectangle().GetType().Name)
     {
         ucBase = new ucProperiesRectangle();
     }
     else if (type.Name == new DrawImage().GetType().Name)
     {
         ucBase = new ucProperiesImage();
     }
     else
     {
         if (type.Name != "DrawObject")
         {
            ucBase= GetNewUcProperies(type.BaseType);
         }
         else
         {
             ucBase = new ucProperiesBase();
         }
     }
     return ucBase;
 }
Beispiel #2
0
 /// <summary>
 /// 填充需要显示属性的用户窗体
 /// </summary>
 /// <param name="ucBase">属性用户窗体</param>
 private void SetUcProperiesForm(ucProperiesBase ucBase)
 {
     plProperties.Controls.Add(ucBase);
     this.Height = plTitle.Height + plCommon.Height + ucBase.Height;
     this.Width = ucBase.Width;
 }