using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LYFZ.Model;
namespace LYFZ.Software.UI.DoorCityProcess.NewOrderCustomControls
{
///
/// 流程图节点
///
public class FlowchartNode
{
ComponentLibrary.PanelEx panelNode = new ComponentLibrary.PanelEx();
ComponentLibrary.LabelEx labelText = new ComponentLibrary.LabelEx();
public FlowchartNode(FlowchartNodeType nType, string nodeText="未知")
{
this.panelNode.Size = new System.Drawing.Size(48,48);
switch (nType)
{
case FlowchartNodeType.蓝色节点:
this.panelNode.BackgroundImage = LYFZ.Software.Properties.Resources.节点1;
this.labelText.ForeColor = System.Drawing.Color.White;
break;
case FlowchartNodeType.白色节点:
this.panelNode.BackgroundImage = LYFZ.Software.Properties.Resources.节点2;
this.labelText.ForeColor = System.Drawing.Color.DodgerBlue;
break;
default:
this.panelNode.BackgroundImage = LYFZ.Software.Properties.Resources.节点1;
this.labelText.ForeColor = System.Drawing.Color.DodgerBlue;
break;
}
this.panelNode.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.labelText.BackColor = System.Drawing.Color.Transparent;
this.labelText.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelText.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
//this.labelText.Location = new System.Drawing.Point(0, 0);
// this.labelText.Size = new System.Drawing.Size(48, 48);
this.labelText.Text = nodeText;
this.labelText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.panelNode.Controls.Add(this.labelText);
}
public string NodeText
{
set { this.labelText.Text = value; }
get { return this.labelText.Text.Trim(); }
}
public ComponentLibrary.PanelEx PanelNode
{
get { return this.panelNode; }
}
///
///
///
public Model_ErpOrderDigital DigitalItem { get {return digitalItem; } set { digitalItem = value; } }
LYFZ.Model.Model_ErpOrderDigital digitalItem = null;
///
///
///
public Model_ErpOrdersPhotography PhotographyItem { get { return photographyItem; } set { photographyItem = value; } }
LYFZ.Model.Model_ErpOrdersPhotography photographyItem = null;
}
}
namespace LYFZ
{
public enum FlowchartNodeType
{
蓝色节点 = 0,
白色节点 = 1
}
}