hytos / ID2.Manager / ID2.Manager.Compare / Main.cs @ 353b7f9f
이력 | 보기 | 이력해설 | 다운로드 (21.7 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Data; |
5 |
using System.Drawing; |
6 |
using System.Linq; |
7 |
using System.Text; |
8 |
using System.Threading.Tasks; |
9 |
using System.Windows.Forms; |
10 |
|
11 |
using System.IO; |
12 |
using System.Reflection; |
13 |
using System.Diagnostics; |
14 |
|
15 |
using ID2.Manager.Controls; |
16 |
using ID2.Manager.Classes; |
17 |
|
18 |
using Telerik.WinControls; |
19 |
using Telerik.WinControls.UI; |
20 |
|
21 |
namespace ID2.Manager |
22 |
{ |
23 |
public partial class Main : RadRibbonForm |
24 |
{ |
25 |
protected override CreateParams CreateParams |
26 |
{ |
27 |
get |
28 |
{ |
29 |
CreateParams cp = base.CreateParams; |
30 |
cp.ExStyle |= 0x02000000; |
31 |
return cp; |
32 |
} |
33 |
} |
34 |
|
35 |
//#if DEBUG |
36 |
// Telerik.WinControls.RadControlSpy.RadControlSpyForm radControlSpyForm = new Telerik.WinControls.RadControlSpy.RadControlSpyForm(); |
37 |
//#endif |
38 |
private readonly Color _SummaryColor = Color.FromArgb(255, 108, 55); |
39 |
|
40 |
public Main() |
41 |
{ |
42 |
InitializeComponent(); |
43 |
var verification = new Controls.Verification(this.radProgressBarElement) { Dock = DockStyle.Fill }; |
44 |
this.LayoutValidation.Controls.Add(verification); |
45 |
this.DockMainTabStrip.Select(); |
46 |
|
47 |
var appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName); |
48 |
|
49 |
if (!Directory.Exists(appDataPath)) |
50 |
{ |
51 |
Directory.CreateDirectory(appDataPath); |
52 |
} |
53 |
|
54 |
#region 테마 설정 |
55 |
this.radMenuItemControlDefault.Click += RadMenuItemTheme_Click; |
56 |
this.radMenuItemOffice2013Dark.Click += RadMenuItemTheme_Click; |
57 |
this.radMenuItemTelerikMetro.Click += RadMenuItemTheme_Click; |
58 |
this.radMenuItemVisualStudio2012Dark.Click += RadMenuItemTheme_Click; |
59 |
this.radMenuItemVisualStudio2012Light.Click += RadMenuItemTheme_Click; |
60 |
this.radMenuItemWindows8.Click += RadMenuItemTheme_Click; |
61 |
#endregion |
62 |
|
63 |
this.Initialize(); |
64 |
} |
65 |
|
66 |
/// <summary> |
67 |
/// 사용자가 선택한 테마를 적용한다. |
68 |
/// </summary> |
69 |
/// <param name="sender"></param> |
70 |
/// <param name="e"></param> |
71 |
private void RadMenuItemTheme_Click(object sender, EventArgs e) |
72 |
{ |
73 |
string theme = (sender as RadMenuItem).Text; |
74 |
if(theme != this.radDropDownButtonElementTheme.Text) |
75 |
{ |
76 |
this.radDropDownButtonElementTheme.Text = theme; |
77 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "App", "Theme", theme); |
78 |
if (!string.IsNullOrEmpty(theme)) |
79 |
{ |
80 |
Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = theme; |
81 |
Program.ThemeName = theme; |
82 |
} |
83 |
} |
84 |
} |
85 |
|
86 |
#region Init, Load |
87 |
private void Initialize() |
88 |
{ |
89 |
this.ID2ManagerRadRibbonBar.Expanded = false; |
90 |
} |
91 |
|
92 |
protected override void OnLoad(EventArgs e) |
93 |
{ |
94 |
try |
95 |
{ |
96 |
this.Text = $"ID2.Manager.Compare - V {Application.ProductVersion}"; |
97 |
|
98 |
#region 테마를 읽어 적용 |
99 |
string theme = Classes.ID2Helper.IniReadValue(Program.IniFilePath, "App", "Theme"); |
100 |
if (!string.IsNullOrEmpty(theme)) |
101 |
{ |
102 |
Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = theme; |
103 |
Program.ThemeName = theme; |
104 |
} |
105 |
#endregion |
106 |
|
107 |
this.radDropDownButtonElementTheme.Text = Program.ThemeName; |
108 |
this.radBrowseEditorAutoCADFolder.ValueChanged += RadBrowseEditorAutoCADFolder_ValueChanged; |
109 |
this.radBrowseEditorAVEVAFolder.ValueChanged += RadBrowseEditorAVEVAFolder_ValueChanged; |
110 |
this.radGridViewDocument.DataBindingComplete += RadGridViewDocument_DataBindingComplete; |
111 |
this.radGridViewDocument.ViewRowFormatting += RadGridViewDocument_ViewRowFormatting; |
112 |
this.radButtonElementCompare.Click += RadButtonElementCompare_Click; |
113 |
this.radButtonElementConfiguration.Click += RadButtonElementConfiguration_Click; |
114 |
|
115 |
this.radButtonElementRefreshCommand.Click += RadButtonElementRefreshCommand_Click; |
116 |
|
117 |
Program.AutoCADFolder = Classes.ID2Helper.IniReadValue(Program.IniFilePath, "Path", "AutoCAD Folder"); |
118 |
if (!string.IsNullOrEmpty(Program.AutoCADFolder)) this.radBrowseEditorAutoCADFolder.Value = Program.AutoCADFolder; |
119 |
|
120 |
Program.AVEVAPIDFolder = Classes.ID2Helper.IniReadValue(Program.IniFilePath, "Path", "AVEVA P&ID Folder"); |
121 |
if (!string.IsNullOrEmpty(Program.AVEVAPIDFolder)) this.radBrowseEditorAVEVAFolder.Value = Program.AVEVAPIDFolder; |
122 |
|
123 |
this.radGridViewDocument.SelectionChanged += RadGridViewDocument_SelectionChanged; |
124 |
} |
125 |
catch (Exception ex) |
126 |
{ |
127 |
Program.logger.Error($"An exception occurred from {MethodBase.GetCurrentMethod().Name}", ex); |
128 |
RadMessageBox.Show("Failed to load project.", Application.ProductName, MessageBoxButtons.OK, RadMessageIcon.Error); |
129 |
} |
130 |
|
131 |
base.OnLoad(e); |
132 |
} |
133 |
|
134 |
private void RadGridViewDocument_SelectionChanged(object sender, EventArgs e) |
135 |
{ |
136 |
if (this.radGridViewDocument.SelectedRows.Any() && this.radGridViewDocument.SelectedRows[0].DataBoundItem is Document doc) |
137 |
{ |
138 |
this.Cursor = Cursors.WaitCursor; |
139 |
try |
140 |
{ |
141 |
var verification = this.LayoutValidation.Controls[0] as Controls.Verification; |
142 |
verification.CompareDrawings(new List<Document>() { doc }); |
143 |
} |
144 |
finally |
145 |
{ |
146 |
this.Cursor = Cursors.Default; |
147 |
} |
148 |
} |
149 |
} |
150 |
|
151 |
/// <summary> |
152 |
/// 도면 리스트를 갱신한다. |
153 |
/// </summary> |
154 |
/// <param name="sender"></param> |
155 |
/// <param name="e"></param> |
156 |
private void RadButtonElementRefreshCommand_Click(object sender, EventArgs e) |
157 |
{ |
158 |
try |
159 |
{ |
160 |
this.Cursor = Cursors.WaitCursor; |
161 |
|
162 |
var AutoCADFiles = Directory.GetFiles(Program.AutoCADFolder, "*.dwg"); |
163 |
var AVEVAFiles = Directory.GetFiles(Program.AVEVAPIDFolder, "*.dwg"); |
164 |
|
165 |
MakeDocumentList(AutoCADFiles, AVEVAFiles); |
166 |
} |
167 |
finally |
168 |
{ |
169 |
this.Cursor = Cursors.Default; |
170 |
} |
171 |
} |
172 |
|
173 |
/// <summary> |
174 |
/// 환경 설정 창을 띄운다. |
175 |
/// </summary> |
176 |
/// <param name="sender"></param> |
177 |
/// <param name="e"></param> |
178 |
private void RadButtonElementConfiguration_Click(object sender, EventArgs e) |
179 |
{ |
180 |
using (var frm = new Forms.ExceptLayer()) |
181 |
{ |
182 |
if (DialogResult.OK == frm.ShowDialog(this)) |
183 |
{ |
184 |
string ExceptLayers = string.Join(",", Forms.ExceptLayer.ExceptLayers.Select(x => x.Name)); |
185 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Except Layers", ExceptLayers); |
186 |
|
187 |
string ExceptLayersVisible = string.Join(",", Forms.ExceptLayer.ExceptLayers.Select(x => x.Visible)); |
188 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Except Layers Visible", ExceptLayersVisible); |
189 |
|
190 |
string LineLayers = string.Join(",", Forms.ExceptLayer.LineLayers.Select(x => x.Name)); |
191 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Line Layers", LineLayers); |
192 |
|
193 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Length Tolerance Ratio", |
194 |
Forms.ExceptLayer.LengthToleranceRatio.ToString()); |
195 |
|
196 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "Arrow Max Length", |
197 |
Forms.ExceptLayer.ArrowMaxLength.ToString()); |
198 |
|
199 |
string SpecialCharacters = string.Join(",", Forms.ExceptLayer.SpecialCharacters.Select(x => $"{x.Special}={x.Normal}")); |
200 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Verification", "SpecialCharacters", SpecialCharacters); |
201 |
} |
202 |
} |
203 |
} |
204 |
|
205 |
private void RadButtonElementCompare_Click(object sender, EventArgs e) |
206 |
{ |
207 |
try |
208 |
{ |
209 |
this.Cursor = Cursors.WaitCursor; |
210 |
|
211 |
var docs = this.radGridViewDocument.Rows.Where(x => (x.DataBoundItem is Document doc) && doc.Checked). |
212 |
Select(x => (x.DataBoundItem as Document)).ToList(); |
213 |
var verification = this.LayoutValidation.Controls[0] as Controls.Verification; |
214 |
verification.CompareDrawings(docs, true); |
215 |
} |
216 |
finally |
217 |
{ |
218 |
this.Cursor = Cursors.Default; |
219 |
} |
220 |
} |
221 |
|
222 |
private void RadGridViewDocument_ViewRowFormatting(object sender, RowFormattingEventArgs e) |
223 |
{ |
224 |
if(e.RowElement is GridRowElement) |
225 |
{ |
226 |
if (e.RowElement.RowInfo.DataBoundItem is Document doc) |
227 |
{ |
228 |
if (!doc.IsValid) |
229 |
{ |
230 |
e.RowElement.ForeColor = Color.Gray; |
231 |
e.RowElement.Font = Program.UnmatchedFont; |
232 |
} |
233 |
else |
234 |
{ |
235 |
e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local); |
236 |
e.RowElement.Font = Program.MatchedFont; |
237 |
} |
238 |
} |
239 |
} |
240 |
else |
241 |
{ |
242 |
e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local); |
243 |
e.RowElement.ResetValue(LightVisualElement.FontProperty, ValueResetFlags.Local); |
244 |
} |
245 |
} |
246 |
|
247 |
private void RadGridViewDocument_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e) |
248 |
{ |
249 |
radGridViewDocument.BestFitColumns(); |
250 |
} |
251 |
|
252 |
private void RadBrowseEditorAVEVAFolder_ValueChanged(object sender, EventArgs e) |
253 |
{ |
254 |
if(Directory.Exists(this.radBrowseEditorAVEVAFolder.Value)) |
255 |
{ |
256 |
Program.AVEVAPIDFolder = this.radBrowseEditorAVEVAFolder.Value; |
257 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Path", "AVEVA P&ID Folder", Program.AVEVAPIDFolder); |
258 |
|
259 |
var AVEVAFiles = Directory.GetFiles(Program.AVEVAPIDFolder, "*.dwg"); |
260 |
|
261 |
var AutoCADFiles = new List<string>(); |
262 |
if (Directory.Exists(this.radBrowseEditorAutoCADFolder.Value)) |
263 |
{ |
264 |
AutoCADFiles.AddRange(Directory.GetFiles(this.radBrowseEditorAutoCADFolder.Value, "*.dwg")); |
265 |
} |
266 |
|
267 |
MakeDocumentList(AutoCADFiles, AVEVAFiles); |
268 |
} |
269 |
} |
270 |
|
271 |
private void RadBrowseEditorAutoCADFolder_ValueChanged(object sender, EventArgs e) |
272 |
{ |
273 |
if (Directory.Exists(this.radBrowseEditorAutoCADFolder.Value)) |
274 |
{ |
275 |
Program.AutoCADFolder = this.radBrowseEditorAutoCADFolder.Value; |
276 |
Classes.ID2Helper.IniWriteValue(Program.IniFilePath, "Path", "AutoCAD Folder", Program.AutoCADFolder); |
277 |
|
278 |
var AutoCADFiles = Directory.GetFiles(Program.AutoCADFolder, "*.dwg"); |
279 |
|
280 |
var AVEVAFiles = new List<string>(); |
281 |
if (Directory.Exists(this.radBrowseEditorAVEVAFolder.Value)) |
282 |
{ |
283 |
AVEVAFiles.AddRange(Directory.GetFiles(this.radBrowseEditorAVEVAFolder.Value, "*.dwg")); |
284 |
} |
285 |
|
286 |
MakeDocumentList(AutoCADFiles, AVEVAFiles); |
287 |
} |
288 |
} |
289 |
|
290 |
private void MakeDocumentList(IList<string> AutoCADFiles, IList<string> AVEVAFiles) |
291 |
{ |
292 |
radGridViewDocument.DataSource = null; |
293 |
|
294 |
Program.Documents.Clear(); |
295 |
AutoCADFiles.ForAll(x => Program.Documents.Add(new Document(Path.GetFileNameWithoutExtension(x).ToUpper()) { AutoCADFileName = Path.GetFileNameWithoutExtension(x).ToUpper()})); |
296 |
|
297 |
var addings = new List<Document>(); |
298 |
foreach(var file in AVEVAFiles) |
299 |
{ |
300 |
string FileName = Path.GetFileNameWithoutExtension(file).ToUpper(); |
301 |
var doc = Program.Documents.Find(x => x.AutoCADFileName == FileName); |
302 |
if(doc != null) |
303 |
{ |
304 |
doc.AVEVAFileName = FileName; |
305 |
} |
306 |
else |
307 |
{ |
308 |
addings.Add(new Document(FileName) { AVEVAFileName = FileName }); |
309 |
} |
310 |
} |
311 |
|
312 |
addings.ForAll(x => Program.Documents.Add(x)); |
313 |
|
314 |
radGridViewDocument.DataSource = Program.Documents; |
315 |
} |
316 |
#endregion |
317 |
|
318 |
private void RadDropDownList_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) |
319 |
{ |
320 |
if (sender is RadDropDownList ddl) |
321 |
{ |
322 |
if (ddl.SelectedValue != null) |
323 |
{ |
324 |
if (string.IsNullOrEmpty(ddl.SelectedValue.ToString())) |
325 |
{ |
326 |
ddl.BackColor = Color.White; |
327 |
ddl.ForeColor = Color.Black; |
328 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular); |
329 |
} |
330 |
else |
331 |
{ |
332 |
ddl.BackColor = Color.DarkSlateBlue; |
333 |
ddl.ForeColor = Color.Yellow; |
334 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
335 |
} |
336 |
} |
337 |
} |
338 |
} |
339 |
|
340 |
private void RadTextBoxDocumentNo_KeyUp(object sender, KeyEventArgs e) |
341 |
{ |
342 |
if (sender is RadTextBox txtBox) |
343 |
{ |
344 |
if (txtBox.Text.Length > 0) |
345 |
{ |
346 |
txtBox.BackColor = Color.DarkSlateBlue; |
347 |
txtBox.ForeColor = Color.Yellow; |
348 |
txtBox.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
349 |
} |
350 |
else |
351 |
{ |
352 |
txtBox.BackColor = Color.White; |
353 |
txtBox.ForeColor = Color.Black; |
354 |
txtBox.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular); |
355 |
} |
356 |
} |
357 |
} |
358 |
|
359 |
/* |
360 |
private void GetCheckedList() |
361 |
{ |
362 |
RadGridView grid = this.radGridViewDocuments; |
363 |
|
364 |
//var checkers = grid.Rows.Where(x => |
365 |
//{ |
366 |
// return x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value); |
367 |
//}).Select(x => x.DataBoundItem as Documents).ToList(); |
368 |
|
369 |
//var viewRows = new Queue<GridViewRowInfo>(this.radGridViewDocuments.MasterTemplate.DataView.Where(x => x.Cells["spq"); |
370 |
var viewRows = grid.MasterTemplate.DataView; |
371 |
|
372 |
var checkers = viewRows.Where(x => |
373 |
{ |
374 |
return x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value); |
375 |
}).ToList(); |
376 |
|
377 |
var rows = new GridViewDataRowInfo[checkers.Count]; |
378 |
checkers.CopyTo(rows, 0); |
379 |
|
380 |
if (rows.Length > 0) |
381 |
{ |
382 |
grid.BeginUpdate(); |
383 |
|
384 |
int nLoop = 0; |
385 |
rows.ForAll(x => |
386 |
{ |
387 |
grid.Rows.Remove(rows[nLoop]); |
388 |
nLoop++; |
389 |
}); |
390 |
|
391 |
grid.EndUpdate(); |
392 |
} |
393 |
|
394 |
|
395 |
//grid.Rows.re grid.Rows.ToList().Intersect(checkers) |
396 |
|
397 |
|
398 |
//RadMessageBox.Show($"{checkers.Count()}", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
399 |
//RadMessageBox.Show($"{this.documents.Count}", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
400 |
this.lbSelectAndTotal.Text = $"{grid.MasterTemplate.DataView.Count} / {this.TotalCount} (Selected / Total)"; |
401 |
} |
402 |
*/ |
403 |
|
404 |
#region ColumnGroup |
405 |
private void InitColumnGroupsViewDefinition(RadGridView gridView) |
406 |
{ |
407 |
ColumnGroupsViewDefinition columnGroupsView = new ColumnGroupsViewDefinition(); |
408 |
|
409 |
List<string> chkColNames = new List<string>() { "Checked" }; |
410 |
|
411 |
List<string> docLinkColNames = new List<string>() { "AutoCADLink", "ID2Connection", "PDFLink", "MarkupLink", "AVEVALink", "Compare" }; |
412 |
List<string> docInfoColNames = new List<string>() { "RefProjectCode", "System", "SubSystemCode", "DocumentNo", "PersonInCharge", "Worker", "AVEVAPersonInCharge", "AVEVAWorker", "JobLevel", "RevisonNo" }; |
413 |
List<string> rvToColNames = new List<string>() { "ToIsDiscussion", "ToRemarks", "ToCreator", "ToCapture" }; |
414 |
List<string> rvFrColNames = new List<string>() { "FrReviewStatus", "FrRemarks", "FrCreator", "FrCapture" }; |
415 |
List<string> wkID2ColNames = new List<string>() { "ID2StartDate", "ID2EndDate", "ID2Status", "ID2Issues", "ID2Capture", "ReplyModifications", "ReplyRequester" }; |
416 |
List<string> wkAVEVAColNames = new List<string>() { "IsConvert", "AVEVAConvertDate", "AVEVAWorkDate", "AVEVAStatus", "AVEVAIssues" }; |
417 |
List<string> valProdColNames = new List<string>() { "AVEVAReviewDate", "ProdReviewer", "ProdIsResult", "ProdRemarks" }; |
418 |
List<string> valCntColNames = new List<string>() { "ClientReviewer", "ClientIsResult", "ClientRemarks" }; |
419 |
List<string> dtColNames = new List<string>() { "DTIsGateWay", "DTIsImport", "DTIsRegSystem", "DTRemarks" }; |
420 |
|
421 |
//체크 |
422 |
GridViewColumnGroup chkColGrp = new GridViewColumnGroup("√") { IsPinned = true }; |
423 |
GridViewColumnGroupRow chkColGrpRow = new GridViewColumnGroupRow(); |
424 |
chkColGrpRow.ColumnNames.AddRange(chkColNames); |
425 |
chkColGrp.Rows.Add(chkColGrpRow); |
426 |
|
427 |
//도면 |
428 |
GridViewColumnGroup docColGrp = new GridViewColumnGroup("도면 "); |
429 |
GridViewColumnGroup docLinkColGrp = new GridViewColumnGroup("프로그램 연동"); |
430 |
GridViewColumnGroup docInfoColGrp = new GridViewColumnGroup("도면정보"); |
431 |
|
432 |
GridViewColumnGroupRow docLinkColGrpRow = new GridViewColumnGroupRow(); |
433 |
docLinkColGrpRow.ColumnNames.AddRange(docLinkColNames); |
434 |
|
435 |
GridViewColumnGroupRow docInfoColGrpRow = new GridViewColumnGroupRow(); |
436 |
docInfoColGrpRow.ColumnNames.AddRange(docInfoColNames); |
437 |
|
438 |
docLinkColGrp.Rows.Add(docLinkColGrpRow); |
439 |
docColGrp.Groups.Add(docLinkColGrp); |
440 |
docInfoColGrp.Rows.Add(docInfoColGrpRow); |
441 |
docColGrp.Groups.Add(docInfoColGrp); |
442 |
|
443 |
//검토 |
444 |
GridViewColumnGroup rvColGrp = new GridViewColumnGroup("검토", "review"); |
445 |
GridViewColumnGroup rvToColGrp = new GridViewColumnGroup("도프텍"); |
446 |
GridViewColumnGroup rvFrColGrp = new GridViewColumnGroup("삼성"); |
447 |
|
448 |
GridViewColumnGroupRow rvToColGrpRow = new GridViewColumnGroupRow(); |
449 |
rvToColGrpRow.ColumnNames.AddRange(rvToColNames); |
450 |
|
451 |
GridViewColumnGroupRow rvFrColGrpRow = new GridViewColumnGroupRow(); |
452 |
rvFrColGrpRow.ColumnNames.AddRange(rvFrColNames); |
453 |
|
454 |
rvToColGrp.Rows.Add(rvToColGrpRow); |
455 |
rvFrColGrp.Rows.Add(rvFrColGrpRow); |
456 |
|
457 |
rvColGrp.Groups.Add(rvToColGrp); |
458 |
rvColGrp.Groups.Add(rvFrColGrp); |
459 |
|
460 |
//작업 |
461 |
GridViewColumnGroup wkColGrp = new GridViewColumnGroup("작업", "work"); |
462 |
GridViewColumnGroup wkID2ColGrp = new GridViewColumnGroup("ID2"); |
463 |
GridViewColumnGroup wkAVEVAColGrp = new GridViewColumnGroup("AVEVA"); |
464 |
|
465 |
GridViewColumnGroupRow wkID2ColGrpRow = new GridViewColumnGroupRow(); |
466 |
wkID2ColGrpRow.ColumnNames.AddRange(wkID2ColNames); |
467 |
|
468 |
GridViewColumnGroupRow wkAVEVAColGrpRow = new GridViewColumnGroupRow(); |
469 |
wkAVEVAColGrpRow.ColumnNames.AddRange(wkAVEVAColNames); |
470 |
|
471 |
wkID2ColGrp.Rows.Add(wkID2ColGrpRow); |
472 |
wkAVEVAColGrp.Rows.Add(wkAVEVAColGrpRow); |
473 |
|
474 |
wkColGrp.Groups.Add(wkID2ColGrp); |
475 |
wkColGrp.Groups.Add(wkAVEVAColGrp); |
476 |
|
477 |
//Validation |
478 |
GridViewColumnGroup valColGrp = new GridViewColumnGroup("Validation", "validation"); |
479 |
GridViewColumnGroup valProdColGrp = new GridViewColumnGroup("도프텍"); |
480 |
GridViewColumnGroup valCntColGrp = new GridViewColumnGroup("삼성전자"); |
481 |
|
482 |
GridViewColumnGroupRow valProdColGrpRow = new GridViewColumnGroupRow(); |
483 |
valProdColGrpRow.ColumnNames.AddRange(valProdColNames); |
484 |
|
485 |
GridViewColumnGroupRow valCntColGrpRow = new GridViewColumnGroupRow(); |
486 |
valCntColGrpRow.ColumnNames.AddRange(valCntColNames); |
487 |
|
488 |
valProdColGrp.Rows.Add(valProdColGrpRow); |
489 |
valCntColGrp.Rows.Add(valCntColGrpRow); |
490 |
|
491 |
valColGrp.Groups.Add(valProdColGrp); |
492 |
valColGrp.Groups.Add(valCntColGrp); |
493 |
|
494 |
//AVEVA Net |
495 |
GridViewColumnGroup dtColGrp = new GridViewColumnGroup("AVEVA Net\n(Digital Twin)", "avevanet"); |
496 |
|
497 |
GridViewColumnGroupRow dtColGrpRow = new GridViewColumnGroupRow(); |
498 |
dtColGrpRow.ColumnNames.AddRange(dtColNames); |
499 |
|
500 |
dtColGrp.Rows.Add(dtColGrpRow); |
501 |
|
502 |
//Group 추가 |
503 |
columnGroupsView.ColumnGroups.Add(chkColGrp); |
504 |
columnGroupsView.ColumnGroups.Add(docColGrp); |
505 |
columnGroupsView.ColumnGroups.Add(wkColGrp); |
506 |
columnGroupsView.ColumnGroups.Add(rvColGrp); |
507 |
columnGroupsView.ColumnGroups.Add(valColGrp); |
508 |
columnGroupsView.ColumnGroups.Add(dtColGrp); |
509 |
|
510 |
gridView.MasterTemplate.ViewDefinition = columnGroupsView; |
511 |
} |
512 |
#endregion |
513 |
} |
514 |
} |
515 |
|
516 |
public class FilterColumn |
517 |
{ |
518 |
public string Name { get; set; } |
519 |
public string FieldName { get; set; } |
520 |
public bool IsSelect { get; set; } |
521 |
} |