using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LYFZ.Software.UI.DoorCityProcess.NewOrderCustomControls { public class NodeDescription { ComponentLibrary.PanelEx panelLine = new ComponentLibrary.PanelEx(); ComponentLibrary.LabelEx labelText = new ComponentLibrary.LabelEx(); ComponentLibrary.LabelEx labelText2 = new ComponentLibrary.LabelEx(); ComponentLibrary.PanelEx panelBg = new ComponentLibrary.PanelEx(); ComponentLibrary.LabelEx labelDescription = new ComponentLibrary.LabelEx(); ComponentLibrary.PanelEx panelGroup = new ComponentLibrary.PanelEx(); public NodeDescription() { this.labelText.BackColor = System.Drawing.Color.Transparent; this.labelText.Font = new System.Drawing.Font( "微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)) ); this.labelText.ForeColor = System.Drawing.Color.DodgerBlue; this.labelText.Location = new System.Drawing.Point( 4, 4 ); this.labelText.Size = new System.Drawing.Size( 136, 24 ); this.labelText.Text = ""; this.labelText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.panelLine.BackColor = System.Drawing.Color.FromArgb( ((int)(((byte)(0)))), ((int)(((byte)(183)))), ((int)(((byte)(238)))) ); this.panelLine.BorderColor = System.Drawing.Color.FromArgb( ((int)(((byte)(255)))), ((int)(((byte)(204)))), ((int)(((byte)(209)))) ); this.panelLine.BorderType = LYFZ.ComponentLibrary.PlBorderType.all; this.panelLine.BorderWidth = 1; this.panelLine.Location = new System.Drawing.Point( 0, 31 ); this.panelLine.Size = new System.Drawing.Size( 148, 1 ); this.labelText2.BackColor = System.Drawing.Color.Transparent; this.labelText2.Font = new System.Drawing.Font( "微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)) ); this.labelText2.ForeColor = System.Drawing.Color.DodgerBlue; this.labelText2.Location = new System.Drawing.Point( 10, 35 ); this.labelText2.Size = new System.Drawing.Size( 130, 24 ); this.labelText2.Text = ""; this.labelText2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelDescription.BackColor = System.Drawing.Color.Transparent; this.labelDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.labelDescription.Font = new System.Drawing.Font( "微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)) ); this.labelDescription.ForeColor = System.Drawing.Color.DodgerBlue; this.labelDescription.Location = new System.Drawing.Point( 0, 0 ); this.labelDescription.Size = new System.Drawing.Size( 455, 40 ); this.labelDescription.Text = ""; this.labelDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelDescription.Padding = new System.Windows.Forms.Padding( 3, 0, 0, 0 ); this.panelBg.BackgroundImage = LYFZ.Software.Properties.Resources.方框2; this.panelBg.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelBg.Controls.Add( this.labelDescription ); this.panelBg.Location = new System.Drawing.Point( 145, 10 ); this.panelBg.Size = new System.Drawing.Size( 455, 40 ); this.panelGroup.Size = new System.Drawing.Size( 610, 78 ); this.panelGroup.BorderColor = System.Drawing.Color.FromArgb( ((int)(((byte)(255)))), ((int)(((byte)(204)))), ((int)(((byte)(209)))) ); this.panelGroup.BorderType = LYFZ.ComponentLibrary.PlBorderType.all; this.panelGroup.BorderWidth = 1; this.panelGroup.Controls.Add( this.panelLine ); this.panelGroup.Controls.Add( this.labelText ); this.panelGroup.Controls.Add( this.labelText2 ); this.panelGroup.Controls.Add( this.panelBg ); } /// /// 节点描述组 /// public ComponentLibrary.PanelEx PanelGroup { get { return panelGroup; } } /// /// 状态描述1 /// public ComponentLibrary.LabelEx LabelText { get { return labelText; } } /// /// 状态描述2 /// public ComponentLibrary.LabelEx LabelText2 { get { return labelText2; } } /// /// 详细描述 /// public ComponentLibrary.LabelEx LabelDescription { get { return labelDescription; } } /// /// 方框背景 /// public ComponentLibrary.PanelEx PanelBg { get { return panelBg; } } /// /// /// /// /// public System.Windows.Forms.LinkLabel NewLinkBtn( string text = "未知按钮" ) { System.Windows.Forms.LinkLabel likBtn = new System.Windows.Forms.LinkLabel(); likBtn.Text = text; likBtn.ActiveLinkColor = System.Drawing.Color.FromArgb( ((int)(((byte)(255)))), ((int)(((byte)(104)))), ((int)(((byte)(109)))) ); likBtn.AutoSize = true; likBtn.DisabledLinkColor = System.Drawing.Color.DarkGray; likBtn.Font = new System.Drawing.Font( "微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)) ); likBtn.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; likBtn.LinkColor = System.Drawing.Color.FromArgb( ((int)(((byte)(255)))), ((int)(((byte)(104)))), ((int)(((byte)(109)))) ); likBtn.Size = new System.Drawing.Size( 56, 17 ); likBtn.TabStop = true; return likBtn; } List likBtnList = new List(); public List LikBtnList { get { return likBtnList; } } public void AddLinkBtn( System.Windows.Forms.LinkLabel likBtn ) { likBtn.Location = new System.Drawing.Point( this.panelBg.Location.X + this.panelBg.Width - 60 - 20 * likBtnList.Count - 56 * likBtnList.Count, this.panelBg.Location.Y + this.panelBg.Height + 1 ); likBtnList.Add( likBtn ); this.panelGroup.Controls.Add( likBtn ); } string[] _btnTexts = null; public string[] BtnTexts { set { _btnTexts = value; } get { return _btnTexts; } } bool isAddBtnText = false; /// /// 是否已添加了按钮 /// public bool IsAddBtnText { set { isAddBtnText = value; } get { return isAddBtnText; } } FlowchartNode currentNode = null; /// /// 当前节点 /// public FlowchartNode CurrentNode { set { currentNode = value; } get { return currentNode; } } } }