操作系统:win10 x64
数据类型: 文件型
问题详细描述:弹出的bubble 没有标题和关闭按钮(图一所示),并且界面显示不完整。
private void AddBubble()
{
Recordset recordset = null;
try
{
if (m_curSceneControl.Bubbles.Count > 0)
{
m_curSceneControl.Bubbles.Clear();
}
Bubble bubble = null;
m_selection = m_curSceneControl.Scene.FindSelection(true)[0];
recordset = m_selection.ToRecordset();
bubble = new Bubble();
m_curSceneControl.Bubbles.Add(bubble);
FillBubbleControlModel(recordset);
bubble.ClientWidth = m_bubbleControlModel.Width;
bubble.ClientHeight = m_bubbleControlModel.Height;
Geometry3D geometry3D = recordset.GetGeometry() as Geometry3D;
Point3D point3D = geometry3D.BoundingBox.Upper;
bubble.Pointer = point3D;
bubble.Title = "test";
bubble.RoundQuality = 1;
bubble.IsAutoHide = false;
bubble.FrameWidth = 20;
bubble.BackColor = Color.FromArgb(100, 185, 230, 253);
TextStyle textStyle = new TextStyle();
textStyle.Alignment = SuperMap.Data.TextAlignment.TopCenter;
textStyle.FontName = "黑体";
textStyle.ForeColor = Color.Black;
bubble.TitleTextStyle = textStyle;
bubble.Visible = true;
m_curSceneControl.Scene.Refresh();
}
catch (System.Exception ex)
{
Trace.WriteLine(ex.Message);
}
finally
{
if (recordset != null)
{
recordset.Close();
recordset.Dispose();
}
}
}
private void CurSceneControl_BubbleInitialize(object sender, BubbleEventArgs e)
{
System.Drawing.Point point = new Point(e.Bubble.ClientLeft, e.Bubble.ClientTop);
if (m_selection != null)
{
m_bubbleControlModel.Location = point;
m_bubbleControlModel.Visible = true;
}
}
private void CurSceneControl_BubbleClose(object sender, BubbleEventArgs e)
{
m_bubbleControlModel.Visible = false;
}
private void CurSceneControl_BubbleResize(object sender, BubbleEventArgs e)
{
System.Drawing.Point point = new Point(e.Bubble.ClientLeft, e.Bubble.ClientTop);
if (m_selection != null)
{
m_bubbleControlModel.Location = point;
m_bubbleControlModel.Visible = true;
}
}