Exemplo n.º 1
0
        /// <summary>
        /// 获取绘图配置对象
        /// </summary>
        /// <returns>绘图配置对象</returns>
        public static GraphSetting GetGraphSetting()
        {
            if (graphSetting == null)
            {
                graphSetting = new GraphSetting();
            }

            return graphSetting;
        }        
Exemplo n.º 2
0
        /// <summary>
        /// 刷新图元绘制参数
        /// </summary>
        public override void Refresh()
        {
            // 初始化绘图数据管理对象
            graphSetting = GraphSetting.GetGraphSetting();

            // 刷新逻辑数据
            textRectangle.Location = location + new Size(-(int)(elementSize.Width / 2), -(int)(elementSize.Height / 2));
            textRectangle.Size = elementSize;
            activateRectangle.Location = location + new Size(-elementSize.Width, -elementSize.Height);
            activateRectangle.Size = elementSize + elementSize;           
        }