Exemplo n.º 1
0
        public void CreateLeftStructDiagrammInfo(string idChooseElement, List <Elements> sourceElements)
        {
            //var id = Int32.Parse(idChooseElement);
            StructDiagramm str;
            Elements       element = sourceElements.Find((x) => x.Id == idChooseElement);
            var            level   = element.Level;
            var            number  = (Int32.Parse(element.Number) - 1).ToString();

            /*
             * var number = element.Number;
             * str = new StructDiagramm(level, number);
             * LeftStructDiagramm.Add(str);
             */
            var indexElement  = sourceElements.FindIndex((x) => x.Level == level && x.Number == number);
            var indexSubjects = SourceSubjects.FindIndex((x) => x.ParentId == sourceElements[indexElement].Id);

            foreach (string item in SourceSubjects[indexSubjects].SubjectId)
            {
                Elements elementItem = new Elements();
                elementItem = sourceElements.Find((x) => x.Id == item);

                if (LeftStructDiagramm.Find((x) => x.Level == elementItem.Level) != null)
                {
                    LeftStructDiagramm[LeftStructDiagramm.FindIndex((x) => x.Level == elementItem.Level)].AddNumber(elementItem.Number);
                }
                else
                {
                    str = new StructDiagramm(elementItem.Level, elementItem.Number);
                    LeftStructDiagramm.Add(str);
                }
            }
        }
Exemplo n.º 2
0
 public void AddLeftStructDiagramm(StructDiagramm structDiagramm)
 {
     LeftStructDiagramm.Add(structDiagramm);
 }