프로젝트

일반

사용자정보

개정판 bca81f4c

IDbca81f4cb966aab0c5bd36886c4290517dc6c06b
상위 cfda1fed
하위 aadf6821

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

dev issue #000 : add grouping

Change-Id: I2d73f7cf5a88d09ff8e3f51bd45cc70369c34c24

차이점 보기:

DTI_PID/SPPIDConverter/Util/SPPIDUtil.cs
8 8
using Converter.SPPID.DB;
9 9
using Converter.BaseModel;
10 10
using System.Windows.Forms;
11
using Converter.SPPID.Model;
11 12

  
12 13
namespace Converter.SPPID.Util
13 14
{
......
62 63
            }
63 64
            return true;
64 65
        }
66

  
67
        public static string GetSPPIDMappingPath(SPPID_Document document, object itemObj)
68
        {
69
            if (itemObj.GetType() == typeof(Symbol))
70
            {
71
                Symbol item = itemObj as Symbol;
72
                return document.SymbolMappings.Find(x => x.SYMBOLNAME == item.NAME).SPPIDSYMBOLNAME;
73
            }
74
            else if (itemObj.GetType() == typeof(Line))
75
            {
76
                Line item = itemObj as Line;
77
                return document.LineMappings.Find(x => x.LINENAME == item.TYPE).SPPIDSYMBOLNAME;
78
            }
79
            else if (itemObj.GetType() == typeof(Text))
80
            {
81
                
82
            }
83
            else if (itemObj.GetType() == typeof(Note))
84
            {
85

  
86
            }
87

  
88
            return null;
89
        }
90

  
91

  
92

  
93
        #region
94
        public static bool IsBranchLine(string UID, Line connectedLine)
95
        {
96
            try
97
            {
98
                if (connectedLine.CONNECTORS[0].CONNECTEDITEM != UID && connectedLine.CONNECTORS[1].CONNECTEDITEM != UID)
99
                    return true;
100
            }
101
            catch (Exception ex)
102
            {
103
                
104
            }
105

  
106
            return false;
107
        }
108
        public static object FindObjectByUID(Document document, string UID)
109
        {
110
            foreach (Symbol item in document.SYMBOLS)
111
            {
112
                if (item.UID == UID)
113
                    return item;
114
            }
115

  
116
            foreach (Line item in document.LINES)
117
            {
118
                if (item.UID == UID)
119
                    return item;
120
            }
121

  
122
            foreach (Text item in document.TEXTINFOS)
123
            {
124
                if (item.UID == UID)
125
                    return item;
126
            }
127

  
128
            foreach (Note item in document.NOTES)
129
            {
130
                if (item.UID == UID)
131
                    return item;
132
            }
133

  
134
            foreach (LineNumber item in document.LINENUMBERS)
135
            {
136
                if (item.UID == UID)
137
                    return item;
138
            }
139

  
140
            return null;
141
        }
142
        #endregion
65 143
    }
66 144
}

내보내기 Unified diff

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