개정판 10cd10e9
issue #0000
Setup Project
- 다른 프로젝트그룹에서 선택 되거나 ID2 Project 목록에 문제로 선택 할 수 없는 프로젝트 목록은
rowcolor 적용
Change-Id: Ie307068745f0b6e8bffb081df684cbdd2fc564c3
ID2.Manager/ID2.Manager/Forms/SetupProject.cs | ||
---|---|---|
22 | 22 |
readonly Informations informations = Informations.Instance; |
23 | 23 |
ProjectInfo ProjectInfo = null; |
24 | 24 |
|
25 |
private Color ReadOnlyColColor = (Brushes.LightGray as SolidBrush).Color; |
|
26 |
|
|
25 | 27 |
public SetupProject() : this(null) { } |
26 | 28 |
|
27 | 29 |
public SetupProject(ProjectInfo projectInfo) |
... | ... | |
38 | 40 |
this.Load += SetupProject_Load; |
39 | 41 |
this.radButtonSave.Click += RadButtonSave_Click; |
40 | 42 |
this.radButtonColse.Click += RadButtonColse_Click; |
43 |
this.radGridViewID2Project.RowFormatting += RadGridViewID2Project_RowFormatting; |
|
41 | 44 |
} |
42 | 45 |
|
43 | 46 |
private void SetupProject_Load(object sender, EventArgs e) |
... | ... | |
57 | 60 |
this.radTextBoxDescription.Text = this.ProjectInfo.Description; |
58 | 61 |
} |
59 | 62 |
|
60 |
this.radGridViewID2Project.DataSource = id2Project; |
|
63 |
this.radGridViewID2Project.DataSource = new BindingList<ID2ProjectInfo>(id2Project); |
|
64 |
} |
|
65 |
|
|
66 |
private void RadGridViewID2Project_RowFormatting(object sender, RowFormattingEventArgs e) |
|
67 |
{ |
|
68 |
var result = e.RowElement.RowInfo.DataBoundItem as ID2ProjectInfo; |
|
61 | 69 |
|
62 |
foreach (var row in this.radGridViewID2Project.Rows)
|
|
70 |
if (result != null)
|
|
63 | 71 |
{ |
64 |
var id2NameCol = row.Cells["Name"]; |
|
65 |
var id2ChkCol = row.Cells["Checked"]; |
|
72 |
List<ProjectInfo> prjs = informations.ProjectList.Where(x => x.Level.Equals(2)).ToList(); |
|
73 |
|
|
74 |
var id2NameCol = e.RowElement.RowInfo.Cells["Name"]; |
|
75 |
var id2ChkCol = e.RowElement.RowInfo.Cells["Checked"]; |
|
76 |
|
|
77 |
string ID2Name = result.Name ?? string.Empty; |
|
66 | 78 |
|
67 |
string ID2Name = id2NameCol.Value == null ? string.Empty : id2NameCol.Value.ToString(); |
|
68 | 79 |
if (string.IsNullOrEmpty(ID2Name)) |
69 | 80 |
{ |
70 | 81 |
id2ChkCol.Value = false; |
... | ... | |
91 | 102 |
{ |
92 | 103 |
id2ChkCol.Value = true; |
93 | 104 |
id2ChkCol.ReadOnly = false; |
105 |
|
|
94 | 106 |
} |
95 | 107 |
else |
96 | 108 |
{ |
... | ... | |
102 | 114 |
} |
103 | 115 |
} |
104 | 116 |
} |
117 |
|
|
118 |
if (id2ChkCol.ReadOnly) |
|
119 |
{ |
|
120 |
e.RowElement.DrawFill = true; |
|
121 |
e.RowElement.GradientStyle = GradientStyles.Solid; |
|
122 |
e.RowElement.BackColor = this.ReadOnlyColColor; |
|
123 |
} |
|
124 |
else |
|
125 |
{ |
|
126 |
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local); |
|
127 |
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); |
|
128 |
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); |
|
129 |
} |
|
105 | 130 |
} |
106 | 131 |
} |
107 | 132 |
|
내보내기 Unified diff