コード例 #1
0
ファイル: ViewHelper.cs プロジェクト: 15831944/oldProject
        //static void BulkChangesPs_StateChanged(object sender, PaletteSetStateEventArgs e)
        //{
        //    if (e.NewState == StateEventIndex.Hide)
        //    {
        //        BulkChangesCtl.Visible = false;
        //    }
        //    else
        //    {
        //        BulkChangesCtl.Visible = true;
        //    }
        //}
        #endregion

        #region 标注面板
        /// <summary>
        /// 加载标注面板
        /// </summary>
        /// <param name="eventArgs"></param>
        public static void LoadLabelManager(FixEntityArgs eventArgs)
        {
            if (labelManagerPs == null && labelManager == null)
            {
                labelManager = new LabelManager {
                    eventArgs = eventArgs
                };
                labelManagerPs = new PaletteSet("标注")
                {
                    Visible     = true,
                    Dock        = DockSides.None,
                    Size        = new Size(390, 230),
                    MinimumSize = new Size(360, 220)
                };
                labelManagerPs.Add("标注面板", labelManager);
            }
            else
            {
                labelManager.eventArgs = eventArgs;
                labelManager.BindLabelSource();
                labelManagerPs.Visible = true;
            }
        }