프로젝트

일반

사용자정보

개정판 72775f2e

ID72775f2e4c00fb82d2d9c5411fa6bb3ee9d18e96
상위 8ab98ea3
하위 67638be0

이지연이(가) 3년 이상 전에 추가함

issue #000: PSN DB Type 수정, Keyword 데이터 변경 및 로직 수정, Setting image size combobox 사이즈 수정, wating form 적용

Change-Id: I017c4a9b9f309f01c167da8c9c12fc1822e5eeb4

차이점 보기:

DTI_PID/ID2PSN/DB.cs
121 121
                        SaveTopologyRule(topologyRule);
122 122
                    }
123 123

  
124
                    matched = names.FirstOrDefault(param => param == PSN_PATHITEMS);
124

  
125
                    matched = names.FirstOrDefault(param => param == PSN_PIPESYSTEMNETWORK);
125 126
                    if (matched == null)
126 127
                    {
127
                        var query = $"CREATE TABLE {PSN_PATHITEMS} (OID NVARCHAR(50), SequenceData_OID NVARCHAR(125), " +
128
                            "TopologySet_OID NVARCHAR(125), BranchTopologySet_OID NVARCHAR(125), PipeLine_OID NVARCHAR(125), ITEMNAME NVARCHAR(50), ITEMTAG NVARCHAR(125), " +
129
                            "Class NVARCHAR(80), SubClass NVARCHAR(80), TYPE NVARCHAR(80), PIDNAME NVARCHAR(10), NPD NVARCHAR(20), PipeSystemNetwork_OID NVARCHAR(20), " +
130
                            "ViewPipeSystemNetwork_OID NVARCHAR(255), PipeRun_OID NVARCHAR(255))";
128
                        var query = $"CREATE TABLE {PSN_PIPESYSTEMNETWORK} (OID NVARCHAR(50), Type NVARCHAR(20), OrderNumber NVARCHAR(20), Pipeline_OID NVARCHAR(125), FROM_DATA NVARCHAR(255), " +
129
                            "TO_DATA NVARCHAR(255), TopologySet_OID_Key NVARCHAR(125), PSNRevisionNumber NVARCHAR(255), IsValid INTEGER, Status NVARCHAR(255), PBS NVARCHAR(255), Drawings NVARCHAR(255), " +
130
                            "IncludingVirtualData NVARCHAR(10),  PSNAccuracy REAL)";
131 131
                        using (var cmd = connection.GetSqlStringCommand(query))
132 132
                        {
133 133
                            cmd.ExecuteNonQuery();
134 134
                        }
135 135
                    }
136 136

  
137
                    matched = names.FirstOrDefault(param => param == PSN_SEQUENCEDATA);
137
                    matched = names.FirstOrDefault(param => param == PSN_EQUIPMENT);
138 138
                    if (matched == null)
139 139
                    {
140
                        var query = $"CREATE TABLE {PSN_SEQUENCEDATA} (OID NVARCHAR(125), SERIALNUMBER NVARCHAR(10), PathItem_OID NVARCHAR(50), TopologySet_OID_Key NVARCHAR(125))";
140
                        var query = $"CREATE TABLE {PSN_EQUIPMENT} (OID NVARCHAR(50), ITEMTAG NVARCHAR(50), XCOORDS REAL, YCOORDS REAL)";
141 141
                        using (var cmd = connection.GetSqlStringCommand(query))
142 142
                        {
143 143
                            cmd.ExecuteNonQuery();
144 144
                        }
145 145
                    }
146 146

  
147
                    matched = names.FirstOrDefault(param => param == PSN_PIPESYSTEMNETWORK);
147
                    matched = names.FirstOrDefault(param => param == PSN_NOZZLE);
148 148
                    if (matched == null)
149 149
                    {
150
                        var query = $"CREATE TABLE {PSN_PIPESYSTEMNETWORK} (OID NVARCHAR(50), Type NVARCHAR(20), OrderNumber NVARCHAR(20), Pipeline_OID NVARCHAR(125), FROM_DATA NVARCHAR(255), " +
151
                            "TO_DATA NVARCHAR(255), TopologySet_OID_Key NVARCHAR(125), PSNRevisionNumber NVARCHAR(255), PBS NVARCHAR(255), PIDDrawings NVARCHAR(255), " +
152
                            "Validity INTEGER, Status NVARCHAR(255), IncludingVirtualData NVARCHAR(10),  PSNAccuracy REAL)";
150
                        var query = $"CREATE TABLE {PSN_NOZZLE} (OID NVARCHAR(50), ITEMTAG NVARCHAR(255), XCOORDS REAL, YCOORDS REAL, Equipment_OID NVARCHAR(255), " +
151
                            "FLUID NVARCHAR(255), NPD NVARCHAR(255), ROTATION REAL, FlowDirection NVARCHAR(255))";
153 152
                        using (var cmd = connection.GetSqlStringCommand(query))
154 153
                        {
155 154
                            cmd.ExecuteNonQuery();
156 155
                        }
157 156
                    }
158 157

  
159
                    matched = names.FirstOrDefault(param => param == PSN_EQUIPMENT);
158
                    matched = names.FirstOrDefault(param => param == PSN_FLUIDCODE);
160 159
                    if (matched == null)
161 160
                    {
162
                        var query = $"CREATE TABLE {PSN_EQUIPMENT} (OID NVARCHAR(50), ITEMTAG NVARCHAR(50), XCOORDS REAL, YCOORDS REAL)";
161
                        var query = $"CREATE TABLE {PSN_FLUIDCODE} (UID NVARCHAR(50), Code NVARCHAR(255), Description NVARCHAR(255), Condition NVARCHAR(255), Remarks NVARCHAR(255), GroundLevel NVARCHAR(20))";
163 162
                        using (var cmd = connection.GetSqlStringCommand(query))
164 163
                        {
165 164
                            cmd.ExecuteNonQuery();
166 165
                        }
167 166
                    }
168 167

  
169
                    matched = names.FirstOrDefault(param => param == PSN_NOZZLE);
168

  
169
                    matched = names.FirstOrDefault(param => param == PSN_PIPINGMATLCLASS);
170 170
                    if (matched == null)
171 171
                    {
172
                        var query = $"CREATE TABLE {PSN_NOZZLE} (OID NVARCHAR(50), ITEMTAG NVARCHAR(50), XCOORDS REAL, YCOORDS REAL, Equipment_OID NVARCHAR(50), " +
173
                            "FLUID NVARCHAR(50), NPD NVARCHAR(20), ROTATION REAL, FlowDirection NVARCHAR(10))";
172
                        var query = $"CREATE TABLE {PSN_PIPINGMATLCLASS} (UID NVARCHAR(50), Priority INTEGER, Code NVARCHAR(255), Description NVARCHAR(255), Condition NVARCHAR(255), Remarks NVARCHAR(255), GroundLevel NVARCHAR(20))";
174 173
                        using (var cmd = connection.GetSqlStringCommand(query))
175 174
                        {
176 175
                            cmd.ExecuteNonQuery();
177 176
                        }
178 177
                    }
179 178

  
180
                    matched = names.FirstOrDefault(param => param == PSN_FLUIDCODE);
179
                    matched = names.FirstOrDefault(param => param == PSN_SEQUENCEDATA);
181 180
                    if (matched == null)
182 181
                    {
183
                        var query = $"CREATE TABLE {PSN_FLUIDCODE} (UID NVARCHAR(50), Code NVARCHAR(50), Description NVARCHAR(255), Condition NVARCHAR(50), Remarks NVARCHAR(255), GroundLevel NVARCHAR(50))";
182
                        var query = $"CREATE TABLE {PSN_SEQUENCEDATA} (OID NVARCHAR(125), SERIALNUMBER NVARCHAR(255), PathItem_OID NVARCHAR(255), TopologySet_OID_Key NVARCHAR(255))";
184 183
                        using (var cmd = connection.GetSqlStringCommand(query))
185 184
                        {
186 185
                            cmd.ExecuteNonQuery();
187 186
                        }
188 187
                    }
189 188

  
190
                    matched = names.FirstOrDefault(param => param == PSN_PIPINGMATLCLASS);
189
                    matched = names.FirstOrDefault(param => param == PSN_PATHITEMS);
191 190
                    if (matched == null)
192 191
                    {
193
                        var query = $"CREATE TABLE {PSN_PIPINGMATLCLASS} (UID NVARCHAR(50), Priority INTEGER, Code NVARCHAR(255), Description NVARCHAR(50), Condition NVARCHAR(255), Remarks NVARCHAR(80), GroundLevel NVARCHAR(50))";
192
                        var query = $"CREATE TABLE {PSN_PATHITEMS} (OID NVARCHAR(50), SequenceData_OID NVARCHAR(125), " +
193
                            "TopologySet_OID NVARCHAR(125), BranchTopologySet_OID NVARCHAR(125), PipeLine_OID NVARCHAR(125), ITEMNAME NVARCHAR(50), ITEMTAG NVARCHAR(125), " +
194
                            "Class NVARCHAR(80), SubClass NVARCHAR(80), TYPE NVARCHAR(80), PIDNAME NVARCHAR(10), NPD NVARCHAR(20), PipeSystemNetwork_OID NVARCHAR(20), PipeRun_OID NVARCHAR(255), " +
195
                            "ViewPipeSystemNetwork_OID NVARCHAR(255))";
194 196
                        using (var cmd = connection.GetSqlStringCommand(query))
195 197
                        {
196 198
                            cmd.ExecuteNonQuery();
197 199
                        }
198 200
                    }
199

  
201
                    
200 202
                    matched = names.FirstOrDefault(param => param == PSN_VIEW);
201 203
                    if (matched == null)
202 204
                    {
......
210 212
                    matched = names.FirstOrDefault(param => param == PSN_TOPOLOGYSET);
211 213
                    if (matched == null)
212 214
                    {
213
                        var query = $"CREATE TABLE {PSN_TOPOLOGYSET} (OID NVARCHAR(125), Type NVARCHAR(30), SubType NVARCHAR(30), HeadItemTag NVARCHAR(50), TailItemTag NVARCHAR(50), HeadItemID NVARCHAR(50), TailItemID NVARCHAR(50))";
215
                        var query = $"CREATE TABLE { PSN_TOPOLOGYSET} (OID NVARCHAR(125), Type NVARCHAR(30), SubType NVARCHAR(30), HeadItemTag NVARCHAR(50), TailItemTag NVARCHAR(50), HeadItemSPID NVARCHAR(50), TailItemSPID NVARCHAR(50))";
214 216
                        using (var cmd = connection.GetSqlStringCommand(query))
215 217
                        {
216 218
                            cmd.ExecuteNonQuery();
......
960 962
                            connection.ExecuteNonQuery(connection.GetSqlStringCommand(query), txn);
961 963
                            foreach (DataRow row in item.TopologySet.Rows)
962 964
                            {
963
                                query = $"INSERT INTO {PSN_TOPOLOGYSET} VALUES (@OID, @Type, @SubType, @HeadItemTag, @TailItemTag, @HeadItemID, @TailItemID)";
965
                                query = $"INSERT INTO {PSN_TOPOLOGYSET} VALUES (@OID, @Type, @SubType, @HeadItemTag, @TailItemTag, @HeadItemSPID, @TailItemSPID)";
964 966
                                var cmd = connection.GetSqlStringCommand(query);
965 967
                                AddWithValue(cmd, "@OID", row["OID"].ToString());
966 968
                                AddWithValue(cmd, "@Type", row["Type"].ToString());
967 969
                                AddWithValue(cmd, "@SubType", row["SubType"].ToString());
968 970
                                AddWithValue(cmd, "@HeadItemTag", row["HeadItemTag"].ToString());
969 971
                                AddWithValue(cmd, "@TailItemTag", row["TailItemTag"].ToString());
970
                                AddWithValue(cmd, "@HeadItemID", row["HeadItemID"].ToString());
971
                                AddWithValue(cmd, "@TailItemID", row["TailItemID"].ToString());
972
                                AddWithValue(cmd, "@HeadItemSPID", row["HeadItemSPID"].ToString());
973
                                AddWithValue(cmd, "@TailItemSPID", row["TailItemSPID"].ToString());
972 974
                                connection.ExecuteNonQuery(cmd, txn);
973 975
                            }
974 976

  
......
978 980
                            foreach (DataRow row in item.PipeSystemNetwork.Rows)
979 981
                            {
980 982
                                query = $"INSERT INTO {PSN_PIPESYSTEMNETWORK} VALUES (@OID, @Type, @OrderNumber, @Pipeline_OID, @FROM_DATA, @TO_DATA, @TopologySet_OID_Key, @PSNRevisionNumber, " +
981
                                    $"@PBS, @PIDDrawings, @Validity, @Status, @IncludingVirtualData, @PSNAccuracy)";
983
                                    $"@PBS, @Drawings, @IsValid, @Status, @IncludingVirtualData, @PSNAccuracy)";
982 984
                                var cmd = connection.GetSqlStringCommand(query);
983 985
                                AddWithValue(cmd, "@OID", row["OID"].ToString());
984 986
                                AddWithValue(cmd, "@Type", row["Type"].ToString());
......
989 991
                                AddWithValue(cmd, "@TopologySet_OID_Key", row["TopologySet_OID_Key"].ToString());
990 992
                                AddWithValue(cmd, "@PSNRevisionNumber", row["PSNRevisionNumber"].ToString());
991 993
                                AddWithValue(cmd, "@PBS", row["PBS"].ToString());
992
                                AddWithValue(cmd, "@PIDDrawings", row["PIDDrawings"].ToString());
993
                                int Validity = 0;
994
                                if (row["Validity"].ToString() == "OK")
995
                                    Validity = 0;
996
                                else if (row["Validity"].ToString() == "InValid")
997
                                    Validity = 1;
998
                                else if (row["Validity"].ToString() == "Error")
999
                                    Validity = -1;
1000
                                AddWithValue(cmd, "@Validity", Validity);
994
                                AddWithValue(cmd, "@Drawings", row["Drawings"].ToString());
995
                                int IsValid = 0;
996
                                if (row["IsValid"].ToString() == "OK")
997
                                    IsValid = 0;
998
                                else if (row["IsValid"].ToString() == "InValid")
999
                                    IsValid = 1;
1000
                                else if (row["IsValid"].ToString() == "Error")
1001
                                    IsValid = -1;
1002
                                AddWithValue(cmd, "@IsValid", IsValid);
1001 1003
                                AddWithValue(cmd, "@Status", row["Status"].ToString());
1002 1004
                                AddWithValue(cmd, "@IncludingVirtualData", row["IncludingVirtualData"].ToString());
1003 1005
                                AddWithValue(cmd, "@PSNAccuracy", row["PSNAccuracy"].ToString()); 
......
1238 1240
                    using (var ds = connection.ExecuteDataSet(connection.GetSqlStringCommand(query)))
1239 1241
                    {
1240 1242
                        result.PipeSystemNetwork = ds.Tables[0].Clone();
1241
                        result.PipeSystemNetwork.Columns["Validity"].DataType = typeof(string);
1243
                        result.PipeSystemNetwork.Columns["IsValid"].DataType = typeof(string);
1242 1244

  
1243 1245
                        foreach (DataRow row in ds.Tables[0].Rows)
1244 1246
                        {
......
1252 1254
                            newRow["TopologySet_OID_Key"] = row["TopologySet_OID_Key"].ToString();
1253 1255
                            newRow["PSNRevisionNumber"] = row["PSNRevisionNumber"].ToString();
1254 1256
                            newRow["PBS"] = row["PBS"].ToString();
1255
                            newRow["PIDDrawings"] = row["PIDDrawings"].ToString();
1256
                            string Validity = string.Empty;
1257
                            newRow["Drawings"] = row["Drawings"].ToString();
1258
                            string IsValid = string.Empty;
1257 1259

  
1258
                            if (Convert.ToInt32(row["Validity"].ToString()) == 0)
1259
                                Validity = string.Empty;//"OK";
1260
                            else if (Convert.ToInt32(row["Validity"].ToString()) == 1)
1261
                                Validity = "InValid";
1262
                            else if (Convert.ToInt32(row["Validity"].ToString()) == -1)
1263
                                Validity = "Error";
1260
                            if (Convert.ToInt32(row["IsValid"].ToString()) == 0)
1261
                                IsValid = string.Empty;//"OK";
1262
                            else if (Convert.ToInt32(row["IsValid"].ToString()) == 1)
1263
                                IsValid = "InValid";
1264
                            else if (Convert.ToInt32(row["IsValid"].ToString()) == -1)
1265
                                IsValid = "Error";
1264 1266

  
1265
                            newRow["Validity"] = Validity;
1267
                            newRow["IsValid"] = IsValid;
1266 1268

  
1267 1269
                            newRow["Status"] = row["Status"].ToString();
1268 1270
                            newRow["IncludingVirtualData"] = row["IncludingVirtualData"].ToString();
......
1392 1394
                            newRow["SubType"] = row["SubType"].ToString();
1393 1395
                            newRow["HeadItemTag"] = row["HeadItemTag"].ToString();
1394 1396
                            newRow["TailItemTag"] = row["TailItemTag"].ToString();
1395
                            newRow["HeadItemID"] = row["HeadItemID"].ToString();
1396
                            newRow["TailItemID"] = row["TailItemID"].ToString();
1397
                            newRow["HeadItemSPID"] = row["HeadItemSPID"].ToString();
1398
                            newRow["TailItemSPID"] = row["TailItemSPID"].ToString();
1397 1399
                            dt.Rows.Add(newRow);
1398 1400
                        }
1399 1401
                    }
......
1420 1422
                    using (var ds = connection.ExecuteDataSet(connection.GetSqlStringCommand(query)))
1421 1423
                    {
1422 1424
                        dt = ds.Tables[0].Clone();
1423
                        dt.Columns["Validity"].DataType = typeof(string);
1425
                        dt.Columns["IsValid"].DataType = typeof(string);
1424 1426
                        foreach (DataRow row in ds.Tables[0].Rows)
1425 1427
                        {
1426 1428
                            DataRow newRow = dt.NewRow();
......
1433 1435
                            newRow["TopologySet_OID_Key"] = row["TopologySet_OID_Key"].ToString();
1434 1436
                            newRow["PSNRevisionNumber"] = row["PSNRevisionNumber"].ToString();
1435 1437
                            newRow["PBS"] = row["PBS"].ToString();
1436
                            newRow["PIDDrawings"] = row["PIDDrawings"].ToString();
1437
                            string Validity = string.Empty;
1438
                            newRow["Drawings"] = row["Drawings"].ToString();
1439
                            string IsValid = string.Empty;
1438 1440

  
1439
                            if (Convert.ToInt32(row["Validity"].ToString()) == 0)
1440
                                Validity = string.Empty;//"OK";
1441
                            else if (Convert.ToInt32(row["Validity"].ToString()) == 1)
1442
                                Validity = "InValid";
1443
                            else if (Convert.ToInt32(row["Validity"].ToString()) == -1)
1444
                                Validity = "Error";
1441
                            if (Convert.ToInt32(row["IsValid"].ToString()) == 0)
1442
                                IsValid = string.Empty;//"OK";
1443
                            else if (Convert.ToInt32(row["IsValid"].ToString()) == 1)
1444
                                IsValid = "InValid";
1445
                            else if (Convert.ToInt32(row["IsValid"].ToString()) == -1)
1446
                                IsValid = "Error";
1445 1447

  
1446
                            newRow["Validity"] = Validity;
1448
                            newRow["IsValid"] = IsValid;
1447 1449

  
1448 1450
                            newRow["Status"] = row["Status"].ToString();
1449 1451
                            newRow["IncludingVirtualData"] = row["IncludingVirtualData"].ToString();
DTI_PID/ID2PSN/Form/HeaderSettingForm.cs
247 247

  
248 248
                int parentId = level1Index.IndexOf(level1) + 1;
249 249
                string level2 = split[1];
250
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, Image.FromFile(Path.Combine(imgPath, root)));
250

  
251
                //combobox image size 변경
252
                Image image = Image.FromFile(Path.Combine(imgPath, root));
253
                Bitmap imgbitmap = new Bitmap(image);
254
                Image resizedImage = resizeImage(imgbitmap, new Size(200, 200));
255

  
256
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, resizedImage);
251 257

  
252 258
                if (Path.GetFileNameWithoutExtension(path) == "Connect To Process" && bLine)
253 259
                {
254 260
                    bLine = false;
255
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, Image.FromFile(Path.Combine(imgPath, root)));
256
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, Image.FromFile(Path.Combine(imgPath, root)));
261
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, resizedImage);
262
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, resizedImage);
257 263
                }
258 264
            }
259 265
        }
260 266

  
267
        public static Image resizeImage(Image imgToResize, Size size)
268
        {
269
            return (Image)(new Bitmap(imgToResize, size));
270
        }
271

  
261 272
        private void btnAddType_Click(object sender, EventArgs e)
262 273
        {
263 274
            string uid = Guid.NewGuid().ToString();
DTI_PID/ID2PSN/Form/MainForm.Designer.cs
82 82
            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
83 83
            this.contextMenuPSN = new System.Windows.Forms.ContextMenuStrip(this.components);
84 84
            this.toolStripMenuItemPathItems = new System.Windows.Forms.ToolStripMenuItem();
85
            this.splashScreenManager1 = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::PDF_TO_IMAGE.WaitForm), true, true);
85 86
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
86 87
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
87 88
            this.layoutControl1.SuspendLayout();
......
688 689
            this.toolStripMenuItemPathItems.Size = new System.Drawing.Size(167, 22);
689 690
            this.toolStripMenuItemPathItems.Text = "View PSN Details";
690 691
            // 
692
            // splashScreenManager1
693
            // 
694
            this.splashScreenManager1.ClosingDelay = 500;
695
            // 
691 696
            // MainForm
692 697
            // 
693 698
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
......
803 808
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItemEnd;
804 809
        private DevExpress.XtraEditors.SimpleButton btnKeywordsSetting;
805 810
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
811
        private DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager1;
806 812
    }
807 813
}
808 814

  
DTI_PID/ID2PSN/Form/MainForm.cs
146 146

  
147 147
        private void btnRun_Click(object sender, EventArgs e)
148 148
        {
149
            if (MessageBox.Show("Generate PSN?", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) !=
150
               DialogResult.Yes)
151
                return;
152

  
153
            if (radioGroupPBS.SelectedIndex < 0)
154
            {
155
                MessageBox.Show("PBS setting is empty!", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
156
                return;
157
            }
158
            else if (radioGroupPBS.Properties.Items[radioGroupPBS.SelectedIndex].Value.ToString() == "Drawing No" && 
159
                Convert.ToInt32(spinEditStart.Value) >= Convert.ToInt32(spinEditEnd.Value))
149
            try
160 150
            {
161
                MessageBox.Show("PBS setting (from/to) invalid value!", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
162
                return;
163
            }
151
                if (MessageBox.Show("Generate PSN?", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) !=
152
                   DialogResult.Yes)
153
                    return;
164 154

  
165
            SaveSetting();
155
                if (radioGroupPBS.SelectedIndex < 0)
156
                {
157
                    MessageBox.Show("PBS setting is empty!", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
158
                    return;
159
                }
160
                else if (radioGroupPBS.Properties.Items[radioGroupPBS.SelectedIndex].Value.ToString() == "Drawing No" &&
161
                    Convert.ToInt32(spinEditStart.Value) >= Convert.ToInt32(spinEditEnd.Value))
162
                {
163
                    MessageBox.Show("PBS setting (from/to) invalid value!", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
164
                    return;
165
                }
166 166

  
167
            DataTable dt = DB.SelectDrawings();
168
            List<Document> documents = new List<Document>();
169
            DataTable symbolNameTable = DB.SelectSymbolName();
170
            foreach (DataRow row in dt.Rows)
171
            {
172
                string filePath = string.Format(ID2Info.TempDirPath + "{0}.xml", Path.GetFileNameWithoutExtension(row["NAME"].ToString()));
173
                if (File.Exists(filePath))
174
                    documents.Add(new Document(filePath, symbolNameTable));
175
            }
167
                splashScreenManager1.ShowWaitForm();
168
                splashScreenManager1.SetWaitFormCaption("Generate PSN..");
169
                splashScreenManager1.SetWaitFormDescription("Wating...");
170
                //splashScreenManager1.SetWaitFormDescription(i + " / " + sPage + " Pages ( " + iPercent + "% )");
171
                SaveSetting();
176 172

  
177
            int revisionNumber = DB.GetRevision();
178
            if (revisionNumber < 0)
179
                return;
180
            revisionNumber++;
173
                DataTable dt = DB.SelectDrawings();
174
                List<Document> documents = new List<Document>();
175
                DataTable symbolNameTable = DB.SelectSymbolName();
176
                foreach (DataRow row in dt.Rows)
177
                {
178
                    string filePath = string.Format(ID2Info.TempDirPath + "{0}.xml", Path.GetFileNameWithoutExtension(row["NAME"].ToString()));
179
                    if (File.Exists(filePath))
180
                        documents.Add(new Document(filePath, symbolNameTable));
181
                }
182

  
183
                int revisionNumber = DB.GetRevision();
184
                if (revisionNumber < 0)
185
                    return;
186
                revisionNumber++;
181 187

  
182
            PSN psn = new PSN(documents, revisionNumber);
183
            if (checkEditEquipTag.Checked)
184
                psn.EquipTagNoAttributeName = comboBoxEditEquipTagName.SelectedItem.ToString();
185
            psn.SetPSNData();
186
            currentPSN = psn;
188
                PSN psn = new PSN(documents, revisionNumber);
189
                if (checkEditEquipTag.Checked)
190
                    psn.EquipTagNoAttributeName = comboBoxEditEquipTagName.SelectedItem.ToString();
191
                psn.SetPSNData();
192
                currentPSN = psn;
187 193

  
188
            SetDataTableByCurrentPSN();
194
                SetDataTableByCurrentPSN();
195

  
196
                splashScreenManager1.CloseWaitForm();
197

  
198
                MessageBox.Show("Generate PSN was successful.", "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Information);
199
            }
200
            catch(Exception ex)
201
            {
202
                MessageBox.Show(ex.Message, "ID2 " + ID2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
203
            }
204
            finally
205
            {
206
                //splashScreenManager1.Dispose();
207
            }
189 208
        }
190 209

  
191 210
        private void btnPriority_Click(object sender, EventArgs e)
......
264 283
            topologyDT.Columns.Add("SubType", typeof(string));
265 284
            topologyDT.Columns.Add("HeadItemTag", typeof(string));
266 285
            topologyDT.Columns.Add("TailItemTag", typeof(string));
267
            topologyDT.Columns.Add("HeadItemID", typeof(string));
268
            topologyDT.Columns.Add("TailItemID", typeof(string));
286
            topologyDT.Columns.Add("HeadItemSPID", typeof(string));
287
            topologyDT.Columns.Add("TailItemSPID", typeof(string));
269 288
            topologyDT.Columns.Add("Show", typeof(string));
270 289

  
271 290
            gridControlTopologys.DataSource = topologyDT;
......
273 292
            gridViewTopologys.Columns["SubType"].Caption = "Sub-Type";
274 293
            gridViewTopologys.Columns["HeadItemTag"].Caption = "Head Side ItemTag";
275 294
            gridViewTopologys.Columns["TailItemTag"].Caption = "Tail Side ItemTag";
276
            gridViewTopologys.Columns["HeadItemID"].Caption = "Head Side ID";
277
            gridViewTopologys.Columns["TailItemID"].Caption = "Tail Side ID";
295
            gridViewTopologys.Columns["HeadItemSPID"].Caption = "Head Side ID";
296
            gridViewTopologys.Columns["TailItemSPID"].Caption = "Tail Side ID";
278 297
            gridViewTopologys.Columns["Show"].Caption = " ";
279 298

  
280 299

  
......
288 307
            PSNPageDT.Columns.Add("TopologySet_OID_Key", typeof(string));
289 308
            PSNPageDT.Columns.Add("PSNRevisionNumber", typeof(string));
290 309
            PSNPageDT.Columns.Add("PBS", typeof(string));
291
            PSNPageDT.Columns.Add("PIDDrawings", typeof(string));
292
            PSNPageDT.Columns.Add("Validity", typeof(string));
310
            PSNPageDT.Columns.Add("Drawings", typeof(string));
311
            PSNPageDT.Columns.Add("IsValid", typeof(string));
293 312
            PSNPageDT.Columns.Add("Status", typeof(string));
294 313
            PSNPageDT.Columns.Add("IncludingVirtualData", typeof(string));
295 314
            PSNPageDT.Columns.Add("PSNAccuracy", typeof(string));      
......
374 393
                newRow["SubType"] = row["SubType"].ToString();
375 394
                newRow["HeadItemTag"] = row["HeadItemTag"].ToString();
376 395
                newRow["TailItemTag"] = row["TailItemTag"].ToString();
377
                newRow["HeadItemID"] = row["HeadItemID"].ToString();
378
                newRow["TailItemID"] = row["TailItemID"].ToString();
396
                newRow["HeadItemSPID"] = row["HeadItemSPID"].ToString();
397
                newRow["TailItemSPID"] = row["TailItemSPID"].ToString();
379 398

  
380 399
                topologyDT.Rows.Add(newRow);
381 400
            }
......
392 411
                newRow["TO_DATA"] = row["TO_DATA"].ToString();
393 412
                newRow["TopologySet_OID_Key"] = row["TopologySet_OID_Key"].ToString();
394 413
                newRow["PSNRevisionNumber"] = row["PSNRevisionNumber"].ToString();               
395
                newRow["Validity"] = row["Validity"].ToString();                
414
                newRow["IsValid"] = row["IsValid"].ToString();                
396 415
                newRow["Status"] = row["Status"].ToString();
397 416
                newRow["IncludingVirtualData"] = row["IncludingVirtualData"].ToString();
398 417
                newRow["PSNAccuracy"] = row["PSNAccuracy"].ToString() + "%";
399 418
                newRow["PBS"] = row["PBS"].ToString();
400
                newRow["PIDDrawings"] = row["PIDDrawings"].ToString();
419
                newRow["Drawings"] = row["Drawings"].ToString();
401 420
                PSNPageDT.Rows.Add(newRow);
402 421
            }
403 422

  
......
444 463
        {
445 464
            SetDataTable(currentPSN.TopologySet,
446 465
                currentPSN.PipeSystemNetwork);
466

  
467
            currentPSN = DB.GetDBPSN();
468

  
469
            SetPathItem(currentPSN.PathItems);
447 470
        }
448 471

  
449 472
        private void gridViewPSN_ValidatingEditor(object sender, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs e)
DTI_PID/ID2PSN/Form/TransformKeywordsSettingForm.Designer.cs
32 32
            this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl();
33 33
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
34 34
            this.labelControlToolTip = new DevExpress.XtraEditors.LabelControl();
35
            this.gridControlKeyword = new DevExpress.XtraGrid.GridControl();
36
            this.gridViewKeyword = new DevExpress.XtraGrid.Views.Grid.GridView();
35 37
            this.btnClose = new DevExpress.XtraEditors.SimpleButton();
36 38
            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
37 39
            this.btnAddSymbol = new DevExpress.XtraEditors.SimpleButton();
......
41 43
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
42 44
            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
43 45
            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
44
            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
45
            this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem();
46
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
47 46
            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
48
            this.gridViewKeyword = new DevExpress.XtraGrid.Views.Grid.GridView();
49
            this.gridControlKeyword = new DevExpress.XtraGrid.GridControl();
47
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
50 48
            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
49
            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
50
            this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem();
51 51
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
52 52
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
53 53
            this.layoutControl1.SuspendLayout();
54
            ((System.ComponentModel.ISupportInitialize)(this.gridControlKeyword)).BeginInit();
55
            ((System.ComponentModel.ISupportInitialize)(this.gridViewKeyword)).BeginInit();
54 56
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
55 57
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
56 58
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
57 59
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
58 60
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
59 61
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
60
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
61
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit();
62
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
63 62
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
64
            ((System.ComponentModel.ISupportInitialize)(this.gridViewKeyword)).BeginInit();
65
            ((System.ComponentModel.ISupportInitialize)(this.gridControlKeyword)).BeginInit();
63
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
66 64
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
65
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
66
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit();
67 67
            this.SuspendLayout();
68 68
            // 
69 69
            // ribbonControl
......
79 79
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
80 80
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
81 81
            this.ribbonControl.ShowToolbarCustomizeItem = false;
82
            this.ribbonControl.Size = new System.Drawing.Size(464, 27);
82
            this.ribbonControl.Size = new System.Drawing.Size(480, 32);
83 83
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
84 84
            // 
85 85
            // layoutControl1
......
90 90
            this.layoutControl1.Controls.Add(this.btnSave);
91 91
            this.layoutControl1.Controls.Add(this.btnAddSymbol);
92 92
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
93
            this.layoutControl1.Location = new System.Drawing.Point(0, 27);
93
            this.layoutControl1.Location = new System.Drawing.Point(0, 32);
94 94
            this.layoutControl1.Name = "layoutControl1";
95 95
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(488, 408, 650, 400);
96 96
            this.layoutControl1.Root = this.Root;
97
            this.layoutControl1.Size = new System.Drawing.Size(464, 636);
97
            this.layoutControl1.Size = new System.Drawing.Size(480, 639);
98 98
            this.layoutControl1.TabIndex = 1;
99 99
            this.layoutControl1.Text = "layoutControl1";
100 100
            // 
......
104 104
            this.labelControlToolTip.ImageAlignToText = DevExpress.XtraEditors.ImageAlignToText.RightCenter;
105 105
            this.labelControlToolTip.ImageOptions.Alignment = System.Drawing.ContentAlignment.MiddleLeft;
106 106
            this.labelControlToolTip.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("labelControlToolTip.ImageOptions.Image")));
107
            this.labelControlToolTip.Location = new System.Drawing.Point(382, 12);
107
            this.labelControlToolTip.Location = new System.Drawing.Point(398, 12);
108 108
            this.labelControlToolTip.Name = "labelControlToolTip";
109 109
            this.labelControlToolTip.Size = new System.Drawing.Size(70, 16);
110 110
            this.labelControlToolTip.StyleController = this.layoutControl1;
111 111
            this.labelControlToolTip.TabIndex = 7;
112 112
            this.labelControlToolTip.Text = "Tool Tip";
113 113
            // 
114
            // gridControlKeyword
115
            // 
116
            this.gridControlKeyword.Location = new System.Drawing.Point(24, 89);
117
            this.gridControlKeyword.MainView = this.gridViewKeyword;
118
            this.gridControlKeyword.MenuManager = this.ribbonControl;
119
            this.gridControlKeyword.Name = "gridControlKeyword";
120
            this.gridControlKeyword.Size = new System.Drawing.Size(432, 486);
121
            this.gridControlKeyword.TabIndex = 4;
122
            this.gridControlKeyword.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
123
            this.gridViewKeyword});
124
            // 
125
            // gridViewKeyword
126
            // 
127
            this.gridViewKeyword.GridControl = this.gridControlKeyword;
128
            this.gridViewKeyword.Name = "gridViewKeyword";
129
            this.gridViewKeyword.OptionsView.ShowGroupPanel = false;
130
            // 
114 131
            // btnClose
115 132
            // 
116 133
            this.btnClose.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.ImageOptions.Image")));
117
            this.btnClose.Location = new System.Drawing.Point(382, 588);
134
            this.btnClose.Location = new System.Drawing.Point(398, 591);
118 135
            this.btnClose.Name = "btnClose";
119 136
            this.btnClose.Size = new System.Drawing.Size(70, 36);
120 137
            this.btnClose.StyleController = this.layoutControl1;
......
125 142
            // btnSave
126 143
            // 
127 144
            this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image")));
128
            this.btnSave.Location = new System.Drawing.Point(290, 588);
145
            this.btnSave.Location = new System.Drawing.Point(306, 591);
129 146
            this.btnSave.Name = "btnSave";
130 147
            this.btnSave.Size = new System.Drawing.Size(68, 36);
131 148
            this.btnSave.StyleController = this.layoutControl1;
......
135 152
            // 
136 153
            // btnAddSymbol
137 154
            // 
138
            this.btnAddSymbol.Location = new System.Drawing.Point(348, 63);
155
            this.btnAddSymbol.Location = new System.Drawing.Point(361, 63);
139 156
            this.btnAddSymbol.Name = "btnAddSymbol";
140
            this.btnAddSymbol.Size = new System.Drawing.Size(89, 22);
157
            this.btnAddSymbol.Size = new System.Drawing.Size(95, 22);
141 158
            this.btnAddSymbol.StyleController = this.layoutControl1;
142 159
            this.btnAddSymbol.TabIndex = 2;
143 160
            this.btnAddSymbol.Text = " Add Symbol";
......
156 173
            this.layoutControlItem7,
157 174
            this.emptySpaceItem5});
158 175
            this.Root.Name = "Root";
159
            this.Root.Size = new System.Drawing.Size(464, 636);
176
            this.Root.Size = new System.Drawing.Size(480, 639);
160 177
            this.Root.TextVisible = false;
161 178
            // 
162 179
            // emptySpaceItem3
163 180
            // 
164 181
            this.emptySpaceItem3.AllowHotTrack = false;
165
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 576);
182
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 579);
166 183
            this.emptySpaceItem3.Name = "emptySpaceItem3";
167
            this.emptySpaceItem3.Size = new System.Drawing.Size(278, 40);
184
            this.emptySpaceItem3.Size = new System.Drawing.Size(294, 40);
168 185
            this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
169 186
            // 
170 187
            // layoutControlItem4
171 188
            // 
172 189
            this.layoutControlItem4.Control = this.btnSave;
173
            this.layoutControlItem4.Location = new System.Drawing.Point(278, 576);
190
            this.layoutControlItem4.Location = new System.Drawing.Point(294, 579);
174 191
            this.layoutControlItem4.MaxSize = new System.Drawing.Size(72, 40);
175 192
            this.layoutControlItem4.MinSize = new System.Drawing.Size(72, 40);
176 193
            this.layoutControlItem4.Name = "layoutControlItem4";
......
182 199
            // layoutControlItem5
183 200
            // 
184 201
            this.layoutControlItem5.Control = this.btnClose;
185
            this.layoutControlItem5.Location = new System.Drawing.Point(370, 576);
202
            this.layoutControlItem5.Location = new System.Drawing.Point(386, 579);
186 203
            this.layoutControlItem5.MaxSize = new System.Drawing.Size(74, 40);
187 204
            this.layoutControlItem5.MinSize = new System.Drawing.Size(74, 40);
188 205
            this.layoutControlItem5.Name = "layoutControlItem5";
......
194 211
            // emptySpaceItem2
195 212
            // 
196 213
            this.emptySpaceItem2.AllowHotTrack = false;
197
            this.emptySpaceItem2.Location = new System.Drawing.Point(350, 576);
214
            this.emptySpaceItem2.Location = new System.Drawing.Point(366, 579);
198 215
            this.emptySpaceItem2.MaxSize = new System.Drawing.Size(20, 40);
199 216
            this.emptySpaceItem2.MinSize = new System.Drawing.Size(20, 40);
200 217
            this.emptySpaceItem2.Name = "emptySpaceItem2";
......
211 228
            this.emptySpaceItem1});
212 229
            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 20);
213 230
            this.layoutControlGroup2.Name = "layoutControlGroup2";
214
            this.layoutControlGroup2.Size = new System.Drawing.Size(444, 556);
231
            this.layoutControlGroup2.Size = new System.Drawing.Size(460, 559);
215 232
            this.layoutControlGroup2.Text = "Keyword Items";
216 233
            // 
234
            // layoutControlItem6
235
            // 
236
            this.layoutControlItem6.Control = this.gridControlKeyword;
237
            this.layoutControlItem6.Location = new System.Drawing.Point(0, 26);
238
            this.layoutControlItem6.Name = "layoutControlItem6";
239
            this.layoutControlItem6.Size = new System.Drawing.Size(436, 490);
240
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
241
            this.layoutControlItem6.TextVisible = false;
242
            // 
243
            // layoutControlItem3
244
            // 
245
            this.layoutControlItem3.Control = this.btnAddSymbol;
246
            this.layoutControlItem3.Location = new System.Drawing.Point(337, 0);
247
            this.layoutControlItem3.Name = "layoutControlItem3";
248
            this.layoutControlItem3.Size = new System.Drawing.Size(99, 26);
249
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
250
            this.layoutControlItem3.TextVisible = false;
251
            // 
252
            // emptySpaceItem1
253
            // 
254
            this.emptySpaceItem1.AllowHotTrack = false;
255
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 0);
256
            this.emptySpaceItem1.Name = "emptySpaceItem1";
257
            this.emptySpaceItem1.Size = new System.Drawing.Size(337, 26);
258
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
259
            // 
217 260
            // layoutControlItem7
218 261
            // 
219 262
            this.layoutControlItem7.Control = this.labelControlToolTip;
220
            this.layoutControlItem7.Location = new System.Drawing.Point(370, 0);
263
            this.layoutControlItem7.Location = new System.Drawing.Point(386, 0);
221 264
            this.layoutControlItem7.MaxSize = new System.Drawing.Size(74, 20);
222 265
            this.layoutControlItem7.MinSize = new System.Drawing.Size(74, 20);
223 266
            this.layoutControlItem7.Name = "layoutControlItem7";
......
231 274
            this.emptySpaceItem5.AllowHotTrack = false;
232 275
            this.emptySpaceItem5.Location = new System.Drawing.Point(0, 0);
233 276
            this.emptySpaceItem5.Name = "emptySpaceItem5";
234
            this.emptySpaceItem5.Size = new System.Drawing.Size(370, 20);
277
            this.emptySpaceItem5.Size = new System.Drawing.Size(386, 20);
235 278
            this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0);
236 279
            // 
237
            // layoutControlItem3
238
            // 
239
            this.layoutControlItem3.Control = this.btnAddSymbol;
240
            this.layoutControlItem3.Location = new System.Drawing.Point(325, 0);
241
            this.layoutControlItem3.Name = "layoutControlItem3";
242
            this.layoutControlItem3.Size = new System.Drawing.Size(95, 26);
243
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
244
            this.layoutControlItem3.TextVisible = false;
245
            // 
246
            // layoutControlItem6
247
            // 
248
            this.layoutControlItem6.Control = this.gridControlKeyword;
249
            this.layoutControlItem6.Location = new System.Drawing.Point(0, 26);
250
            this.layoutControlItem6.Name = "layoutControlItem6";
251
            this.layoutControlItem6.Size = new System.Drawing.Size(420, 487);
252
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
253
            this.layoutControlItem6.TextVisible = false;
254
            // 
255
            // gridViewKeyword
256
            // 
257
            this.gridViewKeyword.GridControl = this.gridControlKeyword;
258
            this.gridViewKeyword.Name = "gridViewKeyword";
259
            this.gridViewKeyword.OptionsView.ShowGroupPanel = false;
260
            // 
261
            // gridControlKeyword
262
            // 
263
            this.gridControlKeyword.Location = new System.Drawing.Point(24, 89);
264
            this.gridControlKeyword.MainView = this.gridViewKeyword;
265
            this.gridControlKeyword.MenuManager = this.ribbonControl;
266
            this.gridControlKeyword.Name = "gridControlKeyword";
267
            this.gridControlKeyword.Size = new System.Drawing.Size(416, 483);
268
            this.gridControlKeyword.TabIndex = 4;
269
            this.gridControlKeyword.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
270
            this.gridViewKeyword});
271
            // 
272
            // emptySpaceItem1
273
            // 
274
            this.emptySpaceItem1.AllowHotTrack = false;
275
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 0);
276
            this.emptySpaceItem1.Name = "emptySpaceItem1";
277
            this.emptySpaceItem1.Size = new System.Drawing.Size(325, 26);
278
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
279
            // 
280 280
            // TransformKeywordsSettingForm
281 281
            // 
282 282
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
283 283
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
284
            this.ClientSize = new System.Drawing.Size(464, 663);
284
            this.ClientSize = new System.Drawing.Size(480, 671);
285 285
            this.Controls.Add(this.layoutControl1);
286 286
            this.Controls.Add(this.ribbonControl);
287 287
            this.Name = "TransformKeywordsSettingForm";
......
291 291
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
292 292
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
293 293
            this.layoutControl1.ResumeLayout(false);
294
            ((System.ComponentModel.ISupportInitialize)(this.gridControlKeyword)).EndInit();
295
            ((System.ComponentModel.ISupportInitialize)(this.gridViewKeyword)).EndInit();
294 296
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
295 297
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
296 298
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
297 299
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
298 300
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
299 301
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
300
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
301
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit();
302
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
303 302
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
304
            ((System.ComponentModel.ISupportInitialize)(this.gridViewKeyword)).EndInit();
305
            ((System.ComponentModel.ISupportInitialize)(this.gridControlKeyword)).EndInit();
303
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
306 304
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
305
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
306
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit();
307 307
            this.ResumeLayout(false);
308 308
            this.PerformLayout();
309 309

  
DTI_PID/ID2PSN/Form/TransformKeywordsSettingForm.cs
18 18
using DevExpress.XtraTreeList.Nodes;
19 19
using DevExpress.Utils.Extensions;
20 20
using DevExpress.Utils;
21
using DevExpress.Utils.Drawing;
21 22

  
22 23
namespace ID2PSN
23 24
{
......
78 79
            gridColumn.OptionsColumn.AllowEdit = false;
79 80
            gridColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
80 81
            gridColumn.VisibleIndex = 0;
81

  
82 82
            gridColumn = gridViewKeyword.Columns[1];
83 83
            gridColumn.Name = "KeyWords";
84 84
            gridColumn.Caption = "Transform Key Words";
85 85
            gridColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
86 86
            gridColumn.VisibleIndex = 1;
87

  
87
            //gridColumn.AppearanceHeader.BackColor = Color.Red;
88
            
88 89
            gridColumn = gridViewKeyword.Columns[2];
89 90
            gridColumn.Name = "Name";
90 91
            gridColumn.Caption = "ID2 Symbol Name";
......
105 106
            
106 107
            gridColumn.ColumnEdit = btnRemove;
107 108
            gridColumn.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
109
            //gridViewKeyword.CustomDrawColumnHeader += GridViewKeyword_CustomDrawColumnHeader;
110
        }
111

  
112
        private void GridViewKeyword_CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e)
113
        {
114
            if (e.Column == null || (e.Column.AppearanceHeader.BackColor == Color.Empty && !e.Column.AppearanceHeader.Options.UseBackColor))
115

  
116
                return;
117

  
118
            Rectangle rect = e.Bounds;
119

  
120
            rect.Inflate(-1, -1);
121

  
122
            // Fill the title color.
123

  
124
            e.Graphics.FillRectangle(new SolidBrush(e.Column.AppearanceHeader.BackColor), rect);
125

  
126
            e.Appearance.DrawString(e.Cache, e.Info.Caption, e.Info.CaptionRect);
127

  
128
            // Draw filter and sort buttons.
129

  
130
            foreach (DrawElementInfo info in e.Info.InnerElements)
131

  
132
            {
133

  
134
                if (!info.Visible) continue;
135

  
136
                ObjectPainter.DrawObject(e.Cache, info.ElementPainter, info.ElementInfo);
137

  
138
            }
139

  
140
            e.Handled = true;
108 141
        }
109 142

  
110 143
        public void InitData()
......
172 205

  
173 206
                int parentId = level1Index.IndexOf(level1) + 1;
174 207
                string level2 = split[1];
175
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, Image.FromFile(Path.Combine(imgPath, root)));
208
                //combobox image size 변경
209
                Image image = Image.FromFile(Path.Combine(imgPath, root));
210
                Bitmap imgbitmap = new Bitmap(image);
211
                Image resizedImage = resizeImage(imgbitmap, new Size(200, 200));
212

  
213
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, resizedImage);
176 214

  
177 215
                if (Path.GetFileNameWithoutExtension(path) == "Connect To Process" && bLine)
178 216
                {
179 217
                    bLine = false;
180
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, Image.FromFile(Path.Combine(imgPath, root)));
181
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, Image.FromFile(Path.Combine(imgPath, root)));
218
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, resizedImage);
219
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, resizedImage);
182 220
                }
183 221
            }
184 222
        }
185 223

  
224
        public static Image resizeImage(Image imgToResize, Size size)
225
        {
226
            return (Image)(new Bitmap(imgToResize, size));
227
        }
228

  
186 229
        private void btnAddSymbol_Click(object sender, EventArgs e)
187 230
        {
188 231
            if (currentKeywordInfo == null)
DTI_PID/ID2PSN/Form/VentDrainSettingForm.cs
247 247

  
248 248
                int parentId = level1Index.IndexOf(level1) + 1;
249 249
                string level2 = split[1];
250
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, Image.FromFile(Path.Combine(imgPath, root)));
250

  
251
                //combobox image size 변경
252
                Image image = Image.FromFile(Path.Combine(imgPath, root));
253
                Bitmap imgbitmap = new Bitmap(image);
254
                Image resizedImage = resizeImage(imgbitmap, new Size(200, 200));
255

  
256
                dt.Rows.Add(filesPath.ToList().IndexOf(path) + 10000, parentId, Path.GetFileNameWithoutExtension(path), 1, resizedImage);
251 257

  
252 258
                if (Path.GetFileNameWithoutExtension(path) == "Connect To Process" && bLine)
253 259
                {
254 260
                    bLine = false;
255
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, Image.FromFile(Path.Combine(imgPath, root)));
256
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, Image.FromFile(Path.Combine(imgPath, root)));
261
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 20000, parentId, "Primary", 1, resizedImage);
262
                    dt.Rows.Add(filesPath.ToList().IndexOf(path) + 30000, parentId, "Secondary", 1, resizedImage);
257 263
                }
258 264
            }
259 265
        }
260 266

  
267
        public static Image resizeImage(Image imgToResize, Size size)
268
        {
269
            return (Image)(new Bitmap(imgToResize, size));
270
        }
271

  
272

  
261 273
        private void btnAddType_Click(object sender, EventArgs e)
262 274
        {
263 275
            string uid = Guid.NewGuid().ToString();
DTI_PID/ID2PSN/Form/WaitForm.Designer.cs
36 36
            // progressPanel1
37 37
            // 
38 38
            this.progressPanel1.AnimationAcceleration = 10F;
39
            this.progressPanel1.Appearance.BackColor = System.Drawing.Color.White;
39
            this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent;
40 40
            this.progressPanel1.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
41
            this.progressPanel1.Appearance.ForeColor = System.Drawing.Color.Violet;
41
            this.progressPanel1.Appearance.ForeColor = System.Drawing.Color.DodgerBlue;
42 42
            this.progressPanel1.Appearance.Options.UseBackColor = true;
43 43
            this.progressPanel1.Appearance.Options.UseFont = true;
44 44
            this.progressPanel1.Appearance.Options.UseForeColor = true;
45 45
            this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
46
            this.progressPanel1.AppearanceCaption.ForeColor = System.Drawing.Color.DimGray;
46
            this.progressPanel1.AppearanceCaption.ForeColor = System.Drawing.Color.DodgerBlue;
47 47
            this.progressPanel1.AppearanceCaption.Options.UseFont = true;
48 48
            this.progressPanel1.AppearanceCaption.Options.UseForeColor = true;
49 49
            this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
......
54 54
            this.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
55 55
            this.progressPanel1.ImageHorzOffset = 15;
56 56
            this.progressPanel1.LineAnimationElementHeight = 15;
57
            this.progressPanel1.LineAnimationElementType = DevExpress.Utils.Animation.LineAnimationElementType.Triangle;
58 57
            this.progressPanel1.Location = new System.Drawing.Point(0, 16);
59 58
            this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
60 59
            this.progressPanel1.Name = "progressPanel1";
DTI_PID/ID2PSN/ID2PSN.csproj
42 42
    <Reference Include="DevExpress.Office.v19.1.Core, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
43 43
    <Reference Include="DevExpress.Printing.v19.1.Core, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
44 44
    <Reference Include="DevExpress.Charts.v19.1.Core, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
45
    <Reference Include="DevExpress.Sparkline.v19.1.Core, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
45 46
    <Reference Include="DevExpress.Spreadsheet.v19.1.Core, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
46 47
    <Reference Include="DevExpress.Utils.v19.1, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
47 48
    <Reference Include="DevExpress.XtraBars.v19.1, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
DTI_PID/ID2PSN/PSN.cs
966 966
                pipeSystemNetworkDT.Columns.Add("TopologySet_OID_Key", typeof(string));
967 967
                pipeSystemNetworkDT.Columns.Add("PSNRevisionNumber", typeof(string));
968 968
                pipeSystemNetworkDT.Columns.Add("PBS", typeof(string));
969
                pipeSystemNetworkDT.Columns.Add("PIDDrawings", typeof(string));
970
                pipeSystemNetworkDT.Columns.Add("Validity", typeof(string));
969
                pipeSystemNetworkDT.Columns.Add("Drawings", typeof(string));
970
                pipeSystemNetworkDT.Columns.Add("IsValid", typeof(string));
971 971
                pipeSystemNetworkDT.Columns.Add("Status", typeof(string));
972 972
                pipeSystemNetworkDT.Columns.Add("IncludingVirtualData", typeof(string));
973 973
                pipeSystemNetworkDT.Columns.Add("PSNAccuracy", typeof(string));
......
978 978
                topologySetDT.Columns.Add("SubType", typeof(string));
979 979
                topologySetDT.Columns.Add("HeadItemTag", typeof(string));
980 980
                topologySetDT.Columns.Add("TailItemTag", typeof(string));
981
                topologySetDT.Columns.Add("HeadItemID", typeof(string));
982
                topologySetDT.Columns.Add("TailItemID", typeof(string));
981
                topologySetDT.Columns.Add("HeadItemSPID", typeof(string));
982
                topologySetDT.Columns.Add("TailItemSPID", typeof(string));
983 983

  
984 984
                // Set Vent/Drain Info
985 985
                List<VentDrainInfo> VentDrainInfos = new List<VentDrainInfo>();
......
1207 1207
                                    newRow["TopologySet_OID_Key"] = item.Topology.FullName;
1208 1208
                                    newRow["PSNRevisionNumber"] = string.Format("V{0:D4}", Revision);
1209 1209
                                    newRow["PBS"] = PSNItem.GetPBSData();
1210
                                    newRow["Validity"] = PSNItem.Validity;
1210
                                    newRow["IsValid"] = PSNItem.IsValid;
1211 1211
                                    newRow["Status"] = !string.IsNullOrEmpty(PSNItem.Status) ? PSNItem.Status.Remove(0, 2) : string.Empty;
1212 1212
                                    newRow["IncludingVirtualData"] = "No";
1213 1213

  
......
1219 1219
                                        if (!drawingNames.Contains(_group.Document.DrawingName))
1220 1220
                                        {
1221 1221
                                            if (drawingNames.Count == 0)
1222
                                                newRow["PIDDrawings"] = _group.Document.DrawingName;
1222
                                                newRow["Drawings"] = _group.Document.DrawingName;
1223 1223
                                            else
1224
                                                newRow["PIDDrawings"] = newRow["PIDDrawings"] + ", " + _group.Document.DrawingName;
1224
                                                newRow["Drawings"] = newRow["Drawings"] + ", " + _group.Document.DrawingName;
1225 1225
                                            drawingNames.Add(_group.Document.DrawingName);
1226 1226
                                        }
1227 1227
                                    }
......
1249 1249
                            newRow["SubType"] = null;
1250 1250
                        newRow["HeadItemTag"] = GetItemTag(topology.Items.Last());
1251 1251
                        newRow["TailItemTag"] = GetItemTag(topology.Items.First());
1252
                        newRow["HeadItemID"] = topology.Items.Last().UID;
1253
                        newRow["TailItemID"] = topology.Items.First().UID;
1252
                        newRow["HeadItemSPID"] = topology.Items.Last().UID;
1253
                        newRow["TailItemSPID"] = topology.Items.First().UID;
1254 1254
                        topologySetDT.Rows.Add(newRow);
1255 1255
                    }
1256 1256
                }
......
1452 1452

  
1453 1453
        private void UpdateAccuracy()
1454 1454
        {
1455
            DataRow[] statusRows = PipeSystemNetwork.Select(" Type = 'Error' OR Validity = 'Error'"); 
1455
            DataRow[] statusRows = PipeSystemNetwork.Select(" Type = 'Error' OR IsValid = 'Error'"); 
1456 1456
            List<double> lstAcc = null;
1457 1457
            string Status = string.Empty;
1458 1458
            foreach (DataRow dataRow in statusRows)
......
1650 1650
        public PSNType StartType { get; set; }
1651 1651
        public PSNType EndType { get; set; }
1652 1652
        public int Index { get; set; }
1653
        public string Validity { get; set; }
1653
        public string IsValid { get; set; }
1654 1654
        public string Status { get; set; }
1655 1655
        public string IncludingVirtualData { get; set; }
1656 1656
        public string PSNAccuracy { get; set; }
......
1733 1733
                    result = Groups.First().Items.First().Equipment.ItemTag;
1734 1734
                else
1735 1735
                {
1736
                    Validity = "Error";
1736
                    IsValid = "Error";
1737 1737
                    Item item = Groups.First().Items.First();
1738 1738
                    if (item.ItemType == ItemType.Symbol)
1739 1739
                    {
......
1815 1815
                result = Groups.Last().Items.Last().Equipment.ItemTag;
1816 1816
            else
1817 1817
            {
1818
                Validity = "Error";
1818
                IsValid = "Error";
1819 1819
                Item item = Groups.Last().Items.Last();
1820 1820
                if (item.ItemType == ItemType.Symbol)
1821 1821
                {

내보내기 Unified diff