Esempio n. 1
0
        public PipeAnnotationForm(PipeAnnotationCmd pipeAnnotationCmd)
        {
            InitializeComponent();

            this.Shown               += PipeAnnotationForm_Shown;
            this.FormClosing         += PipeAnnotationForm_FormClosing;
            rb_OnPipe.CheckedChanged += Rb_OnPipe_CheckedChanged;
            KeyPress += PipeAnnotationForm_KeyPress;
            //暂为实现的功能
            cb_IsAutoPreventCollision.Enabled = false;
            cb_IncludeLinkPipe.Enabled        = false;
            cb_BackGroupForSingle.Enabled     = false;
            cb_BackGroupForMultiple.Enabled   = false;

            LoadCmdData(pipeAnnotationCmd);
        }
Esempio n. 2
0
        private void LoadCmdData(PipeAnnotationCmd pipeAnnotationCmd)
        {
            PipeAnnotationCmd = pipeAnnotationCmd;
            switch (PipeAnnotationCmd.PipeAnnotationUIData.SettingForSingle.Location)
            {
            case SinglePipeTagLocation.OnPipe:
                rb_OnPipe.Checked = true;
                break;

            case SinglePipeTagLocation.AbovePipe:
                rb_AbovePipe.Checked = true;
                break;

            default:
                throw new NotImplementedException("暂未实现该类型:" + PipeAnnotationCmd.PipeAnnotationUIData.SettingForSingle.Location.ToString());
            }
            cb_Lead.Checked        = PipeAnnotationCmd.PipeAnnotationUIData.SettingForSingle.NeedLeader;
            tb_LengthFromLine.Text = PipeAnnotationCmd.PipeAnnotationUIData.SettingForSingle.LengthFromLine_Milimeter.ToString();
            switch (PipeAnnotationCmd.PipeAnnotationUIData.SettingForMultiple.Location)
            {
            case MultiPipeTagLocation.OnLineEdge:
                rb_OnLineEdge.Checked = true;
                break;

            case MultiPipeTagLocation.OnLine:
                rb_OnLine.Checked = true;
                break;

            default:
                throw new NotImplementedException("暂未实现该类型:" + PipeAnnotationCmd.PipeAnnotationUIData.SettingForMultiple.Location.ToString());
            }
            tb_LengthBetweenPipe.Text         = PipeAnnotationCmd.PipeAnnotationUIData.SettingForMultiple.LengthBetweenPipe_Milimeter.ToString();
            cb_IncludeLinkPipe.Checked        = PipeAnnotationCmd.PipeAnnotationUIData.SettingForCommon.IncludeLinkPipe;
            cb_IsAutoPreventCollision.Checked = PipeAnnotationCmd.PipeAnnotationUIData.SettingForCommon.AutoPreventCollision;
            //0728长度过滤
            cb_FilterVertical.Checked = PipeAnnotationCmd.PipeAnnotationUIData.SettingForCommon.FilterVertical;
            tb_MinLength.Text         = PipeAnnotationCmd.PipeAnnotationUIData.SettingForCommon.MinLength_Milimeter.ToString();
        }