프로젝트

일반

사용자정보

개정판 53c81765

ID53c81765e3bcb220157158984865845bf920b52a
상위 03110d25
하위 7c7bcd10

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #708 : SpecBreakModeling (심볼만)

Change-Id: Ic16888c4aacc51d926299d2858ec06d0c590be79

차이점 보기:

DTI_PID/SPPIDConverter/BaseModel/Document.cs
22 22
        private List<LineNumber> _LINENUMBERS = new List<LineNumber>();
23 23
        private List<TrimLine> _TRIMLINES = new List<TrimLine>();
24 24
        private List<EndBreak> _EndBreaks = new List<EndBreak>();
25
        private List<SpecBreak> _SpecBreaks = new List<SpecBreak>();
25 26
        private List<Equipment> _Equipments = new List<Equipment>();
26 27
        private bool _Enable;
27 28

  
......
33 34
        public List<Line> LINES { get => _LINES; set => _LINES = value; }
34 35
        public List<LineNumber> LINENUMBERS { get => _LINENUMBERS; set => _LINENUMBERS = value; }
35 36
        public List<EndBreak> EndBreaks { get => _EndBreaks; set => _EndBreaks = value; }
37
        public List<SpecBreak> SpecBreaks { get => _SpecBreaks; set => _SpecBreaks = value; }
36 38
        public List<Equipment> Equipments { get => _Equipments; set => _Equipments = value; }
37 39
        public string DWGNAME { get => _DWGNAME; set => _DWGNAME = value; }
38 40
        public string SIZE
......
55 57
        public double SIZE_WIDTH { get => _SIZE_WIDTH; }
56 58
        public double SIZE_HEIGHT { get => _SIZE_HEIGHT; }
57 59
        public List<TrimLine> TRIMLINES { get => _TRIMLINES; set => _TRIMLINES = value; }
60
        
58 61

  
59 62
        public Document(string xmlPath)
60 63
        {
......
88 91
                string sType = item.Element("TYPE").Value;
89 92
                if (sType == "Segment Breaks")
90 93
                {
91
                    continue;
94
                    SpecBreak specBreak = new SpecBreak()
95
                    {
96
                        UID = item.Element("UID").Value,
97
                        DBUID = item.Element("DBUID").Value,
98
                        NAME = item.Element("NAME").Value,
99
                        TYPE = item.Element("TYPE").Value,
100
                        OWNER = item.Element("OWNER").Value,
101
                        ORIGINALPOINT = item.Element("ORIGINALPOINT").Value,
102
                        CONNECTIONPOINT = item.Element("CONNECTIONPOINT").Value,
103
                        LOCATION = item.Element("LOCATION").Value,
104
                        SIZE = item.Element("SIZE").Value,
105
                        ANGLE = Convert.ToDouble(item.Element("ANGLE").Value),
106
                        PARENT = item.Element("PARENT").Value,
107
                        CHILD = item.Element("CHILD").Value,
108
                        HASINSTRUMENTLABEL = item.Element("HASINSTRUMENTLABEL").Value,
109
                        AREA = item.Element("AREA").Value,
110
                        FLIP = Convert.ToInt32(item.Element("FLIP").Value),
111
                        CURRENTPOINTMODEINDEX = Convert.ToInt32(item.Element("CURRENTPOINTMODEINDEX").Value)
112
                    };
113
                    SetAssociations(item.Element("ASSOCIATIONS"), specBreak.ASSOCIATIONS);
114
                    SetSymbolConnectors(item.Element("CONNECTORS"), specBreak.CONNECTORS, specBreak.CONNECTIONPOINT);
115
                    SetProperties(item.Element("PROPERTIES"), specBreak.PROPERTIES);
116
                    SetAttributes(item.Element("SYMBOLATTRIBUTES"), specBreak.ATTRIBUTES);
117
                    SetSpecBreakAttribute(specBreak);
118

  
119
                    SpecBreaks.Add(specBreak);
92 120
                }
93 121
                else if (sType == "End Break")
94 122
                {
......
395 423
            }
396 424
        }
397 425

  
426
        private void SetSpecBreakAttribute(SpecBreak specBreak)
427
        {
428
            string upStream = specBreak.ATTRIBUTES.Find(x => x.ATTRIBUTE == "UpStream").VALUE;
429
            string downStream = specBreak.ATTRIBUTES.Find(x => x.ATTRIBUTE == "DownStream").VALUE;
430

  
431
            specBreak.UpStreamUID = upStream;
432
            specBreak.DownStreamUID = downStream;
433
        }
434

  
398 435
        private void SetLineNumberRuns(XElement node, List<LineRun> lineNumberRuns)
399 436
        {
400 437
            foreach (XElement item in node.Elements("RUN"))

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)