コード例 #1
0
        /// <summary>
        /// 获取全部流程线
        /// </summary>
        /// <returns></returns>
        public List <FlowLine> GetAllLines()
        {
            dynamic         jsonobj = JsonConvert.DeserializeObject(this.WorkFlow.FlowJSON);
            List <FlowLine> lines   = new List <FlowLine>();

            foreach (JObject item in jsonobj.lines)
            {
                FlowLine line = item.ToObject <FlowLine>();
                lines.Add(line);
            }
            return(lines);
        }
コード例 #2
0
        /// <summary>
        /// 获取工作流节点及以节点为出发点的流程
        /// </summary>
        /// <param name="linesobj"></param>
        /// <returns></returns>
        private Dictionary <Guid, List <FlowLine> > GetFromLines(dynamic linesobj)
        {
            Dictionary <Guid, List <FlowLine> > lines = new Dictionary <Guid, List <FlowLine> >();

            foreach (JObject item in linesobj)
            {
                FlowLine line = item.ToObject <FlowLine>();

                if (!lines.ContainsKey(line.From))
                {
                    lines.Add(line.From, new List <FlowLine> {
                        line
                    });
                }
                else
                {
                    lines[line.From].Add(line);
                }
            }

            return(lines);
        }
コード例 #3
0
    private void DisplayNextLine()
    {
        FlowLine line = FN.lines[activeLineIndex];

        SetFlowNarrativeDialogue(flowNarController, line.text);
    }