Exemple #1
0
        private void setstatu(FlowNodePanel p, FlowNodeStatu statu)
        {
            var  ff       = this._flows.Where(f => f.Step > p.Step).OrderBy(f => f.Step).FirstOrDefault();
            bool finished = true;

            if (ff != null)
            {
                finished = ff.Finished;
            }
            p.SetStatu(statu, finished);
        }
Exemple #2
0
        public void SetStatu(FlowNodeStatu statu, bool rightFinish = false)
        {
            this.Statu          = statu;
            this._rightFinished = rightFinish;

            if (statu == FlowNodeStatu.Active)
            {
                this._lblNum.Font  = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                this._lblName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                this._lblNum.Image = global::RIPP.Lib.Properties.Resources.BlueFlag;
            }
            else if (statu == FlowNodeStatu.Default)
            {
                this._lblNum.Font  = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                this._lblName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                this._lblNum.Image = global::RIPP.Lib.Properties.Resources.Flag;
            }

            this.Cursor = this._finished ? System.Windows.Forms.Cursors.Hand :
                          System.Windows.Forms.Cursors.Default;

            if (this._leftOrRight == -1 && !this._finished)
            {
                this._lblName.Image = global::RIPP.Lib.Properties.Resources.linerightdash;
            }
            else if (this._leftOrRight == -1 && this._finished)
            {
                this._lblName.Image = global::RIPP.Lib.Properties.Resources.linerightline;
            }
            else if (this._leftOrRight == 0 && !this._finished)
            {
                this._lblName.Image = global::RIPP.Lib.Properties.Resources.lineDash;
            }
            else if (this._leftOrRight == 0 && this._finished)
            {
                if (rightFinish)
                {
                    this._lblName.Image = global::RIPP.Lib.Properties.Resources.lineline;
                }
                else
                {
                    this._lblName.Image = global::RIPP.Lib.Properties.Resources.linelindash;
                }
            }
            else if (this._leftOrRight == 1 && !this._finished)
            {
                this._lblName.Image = global::RIPP.Lib.Properties.Resources.linedashArrow;
            }
            else if (this._leftOrRight == 1 && this._finished)
            {
                this._lblName.Image = global::RIPP.Lib.Properties.Resources.linelineArrow;
            }
        }
Exemple #3
0
 public FlowNodePanel(string txt, int num, IFlowNode nodeControl, int LeftOrRight = 0, FlowNodeStatu statu = FlowNodeStatu.Default)
 {
     this._text                    = txt;
     this._step                    = num;
     this._leftOrRight             = LeftOrRight;
     this._nodeControl             = nodeControl;
     this._nodeControl.OnFinished += new EventHandler(_nodeControl_OnFinished);
     this.init();
     this.SetStatu(statu, this._rightFinished);
 }