|
@@ -12,6 +12,18 @@ namespace Jdas_Mbic
|
12
|
12
|
{
|
13
|
13
|
public partial class JdasMbic : Form
|
14
|
14
|
{
|
|
15
|
+ const double Table_Dbm_DefaultValue = 31.5;
|
|
16
|
+ const int Table_DL_DefaultValue = 5;
|
|
17
|
+ const int Table_UL_DefaultValue = -15;
|
|
18
|
+ const int Table_Temp_DefaultValue = -10;
|
|
19
|
+
|
|
20
|
+ enum DLUL_Category
|
|
21
|
+ {
|
|
22
|
+ DL_DET = 0,
|
|
23
|
+ UL_DET
|
|
24
|
+ };
|
|
25
|
+
|
|
26
|
+
|
15
|
27
|
public JdasMbic()
|
16
|
28
|
{
|
17
|
29
|
InitializeComponent();
|
|
@@ -19,21 +31,22 @@ namespace Jdas_Mbic
|
19
|
31
|
|
20
|
32
|
private void JdasMbic_Load(object sender, EventArgs e)
|
21
|
33
|
{
|
22
|
|
- HeaderIndexNumSet();
|
|
34
|
+ ATT_TableLayoutSetting();
|
23
|
35
|
}
|
24
|
|
- const double TableDbmDefaultValue = 31.5;
|
25
|
|
- private void HeaderIndexNumSet()
|
|
36
|
+
|
|
37
|
+ private void ATT_TableLayoutSetting()
|
26
|
38
|
{
|
27
|
|
- double TempDbmData = 0;
|
28
|
|
- for (int i = 0; i < 65; i++)
|
|
39
|
+ double TempDbmData = Table_Dbm_DefaultValue;
|
|
40
|
+ string tempstr = "";
|
|
41
|
+ for (int i = 0; i < 64; i++)
|
29
|
42
|
{
|
30
|
43
|
dataGridView_TableSetting.Rows.Add();
|
31
|
|
- dataGridView_TableSetting[0, i].Value = Convert.ToString(TempDbmData);
|
32
|
|
- TempDbmData = TableDbmDefaultValue - 0.5;
|
|
44
|
+ tempstr = string.Format("{0:0.0}", TempDbmData);
|
|
45
|
+ dataGridView_TableSetting[0, i].Value = Convert.ToString(tempstr) + " dBm"; ;
|
|
46
|
+ TempDbmData = TempDbmData - 0.5;
|
33
|
47
|
|
34
|
48
|
}
|
35
|
49
|
|
36
|
|
- // dataGridView_TableSetting.RowHeadersWidth = 70;
|
37
|
50
|
foreach (DataGridViewRow row in this.dataGridView_TableSetting.Rows)
|
38
|
51
|
{
|
39
|
52
|
row.HeaderCell.Value = String.Format("{0}", row.Index + 1);
|
|
@@ -41,11 +54,62 @@ namespace Jdas_Mbic
|
41
|
54
|
this.dataGridView_TableSetting.AutoResizeRowHeadersWidth(
|
42
|
55
|
DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
|
43
|
56
|
this.dataGridView_TableSetting.TopLeftHeaderCell.Value = "No.";
|
44
|
|
- //init = true;
|
45
|
|
- // SetDoNotSort(dataGridView1);
|
46
|
|
- // dataGridView_TableSetting.Columns["DB"].ReadOnly = true;
|
47
|
|
- //dataGridView1.RowHeadersWidth = 30;
|
48
|
|
- // dataGridView1.RowHeadersAlign = 20;
|
|
57
|
+ dataGridView_TableSetting.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
58
|
+ dataGridView_TableSetting.ClearSelection();
|
|
59
|
+ }
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+ private void DET_TableLayoutSetting(DLUL_Category cat)
|
|
63
|
+ {
|
|
64
|
+ string tempstr = "";
|
|
65
|
+ DLUL_Category tempenum = cat;
|
|
66
|
+
|
|
67
|
+ switch (tempenum) {
|
|
68
|
+ case DLUL_Category.DL_DET:
|
|
69
|
+ double Temp_DL_Data = Table_DL_DefaultValue;
|
|
70
|
+ for (int i = 0; i < 31; i++)
|
|
71
|
+ {
|
|
72
|
+ dataGridView_TableSetting.Rows.Add();
|
|
73
|
+ tempstr = string.Format("{0:0}", Temp_DL_Data);
|
|
74
|
+ dataGridView_TableSetting[0, i].Value = Convert.ToString(tempstr) + " dBm";
|
|
75
|
+ Temp_DL_Data = Temp_DL_Data - 1;
|
|
76
|
+
|
|
77
|
+ }
|
|
78
|
+ break;
|
|
79
|
+ case DLUL_Category.UL_DET:
|
|
80
|
+ double Temp_UL_Data = Table_UL_DefaultValue;
|
|
81
|
+ for (int i = 0; i < 46; i++)
|
|
82
|
+ {
|
|
83
|
+ dataGridView_TableSetting.Rows.Add();
|
|
84
|
+ tempstr = string.Format("{0:0}", Temp_UL_Data);
|
|
85
|
+ dataGridView_TableSetting[0, i].Value = Convert.ToString(tempstr) + " dBm";
|
|
86
|
+ Temp_UL_Data = Temp_UL_Data - 1;
|
|
87
|
+
|
|
88
|
+ }
|
|
89
|
+ break;
|
|
90
|
+ }
|
|
91
|
+
|
|
92
|
+ }
|
|
93
|
+ private void Temp_TableLayoutSetting()
|
|
94
|
+ {
|
|
95
|
+ string tempstr = "";
|
|
96
|
+
|
|
97
|
+ double Temp_Data = Table_Temp_DefaultValue;
|
|
98
|
+ for (int i = 0; i < 46; i++)
|
|
99
|
+ {
|
|
100
|
+ dataGridView_TableSetting.Rows.Add();
|
|
101
|
+ tempstr = string.Format("{0:0}", Temp_Data);
|
|
102
|
+ dataGridView_TableSetting[0, i].Value = Convert.ToString(tempstr) + " ℃";
|
|
103
|
+ Temp_Data = Temp_Data - 1;
|
|
104
|
+
|
|
105
|
+ }
|
|
106
|
+ foreach (DataGridViewRow row in this.dataGridView_TableSetting.Rows)
|
|
107
|
+ {
|
|
108
|
+ row.HeaderCell.Value = String.Format("{0}", row.Index + 1);
|
|
109
|
+ }
|
|
110
|
+ this.dataGridView_TableSetting.AutoResizeRowHeadersWidth(
|
|
111
|
+ DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
|
|
112
|
+ this.dataGridView_TableSetting.TopLeftHeaderCell.Value = "No.";
|
49
|
113
|
dataGridView_TableSetting.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
50
|
114
|
dataGridView_TableSetting.ClearSelection();
|
51
|
115
|
}
|
|
@@ -54,5 +118,93 @@ namespace Jdas_Mbic
|
54
|
118
|
{
|
55
|
119
|
|
56
|
120
|
}
|
|
121
|
+ /*
|
|
122
|
+ *
|
|
123
|
+ * TABLE Setting Area
|
|
124
|
+ *
|
|
125
|
+ */
|
|
126
|
+ private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
|
127
|
+ {
|
|
128
|
+ ComboBox comboBox = (ComboBox)sender;
|
|
129
|
+ string tempstr = comboBox.Text;
|
|
130
|
+
|
|
131
|
+ switch (tempstr)
|
|
132
|
+ {
|
|
133
|
+ case "ATT_DL1":
|
|
134
|
+ case "ATT_UL1":
|
|
135
|
+ case "ATT_DL2":
|
|
136
|
+ case "ATT_UL2":
|
|
137
|
+ case "ATT_DL3":
|
|
138
|
+ case "ATT_UL3":
|
|
139
|
+ case "ATT_DL4":
|
|
140
|
+ case "ATT_UL4":
|
|
141
|
+ dataGridView_TableSetting.Rows.Clear();
|
|
142
|
+ ATT_TableLayoutSetting();
|
|
143
|
+ break;
|
|
144
|
+ case "DET_DL1":
|
|
145
|
+ case "DET_DL2":
|
|
146
|
+ case "DET_DL3":
|
|
147
|
+ case "DET_DL4":
|
|
148
|
+ dataGridView_TableSetting.Rows.Clear();
|
|
149
|
+ DET_TableLayoutSetting(DLUL_Category.DL_DET);
|
|
150
|
+ break;
|
|
151
|
+ case "DET_UL1":
|
|
152
|
+ case "DET_UL2":
|
|
153
|
+ case "DET_UL3":
|
|
154
|
+ case "DET_UL4":
|
|
155
|
+ dataGridView_TableSetting.Rows.Clear();
|
|
156
|
+ DET_TableLayoutSetting(DLUL_Category.UL_DET);
|
|
157
|
+ break;
|
|
158
|
+ case "TEMP_DL1":
|
|
159
|
+ case "TEMP_UL1":
|
|
160
|
+ case "TEMP_DL2":
|
|
161
|
+ case "TEMP_UL2":
|
|
162
|
+ case "TEMP_DL3":
|
|
163
|
+ case "TEMP_UL3":
|
|
164
|
+ case "TEMP_DL4":
|
|
165
|
+ case "TEMP_UL4":
|
|
166
|
+ dataGridView_TableSetting.Rows.Clear();
|
|
167
|
+ Temp_TableLayoutSetting();
|
|
168
|
+ break;
|
|
169
|
+ default:
|
|
170
|
+ MessageBox.Show("존재하지 않는 ComboBox 입니다.\r\n 확인해주세요.");
|
|
171
|
+ break;
|
|
172
|
+ }
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+ }
|
|
176
|
+
|
|
177
|
+ private void button_MultiSet_Click(object sender, EventArgs e)
|
|
178
|
+ {
|
|
179
|
+ Int32 selectedCellCount =
|
|
180
|
+ dataGridView_TableSetting.GetCellCount(DataGridViewElementStates.Selected);
|
|
181
|
+ if (selectedCellCount > 0)
|
|
182
|
+ {
|
|
183
|
+ if (dataGridView_TableSetting.AreAllCellsSelected(true))
|
|
184
|
+ {
|
|
185
|
+ MessageBox.Show("All cells are selected", "Selected Cells");
|
|
186
|
+ }
|
|
187
|
+ else
|
|
188
|
+ {
|
|
189
|
+ System.Text.StringBuilder sb =
|
|
190
|
+ new System.Text.StringBuilder();
|
|
191
|
+
|
|
192
|
+ for (int i = 0;
|
|
193
|
+ i < selectedCellCount; i++)
|
|
194
|
+ {
|
|
195
|
+ sb.Append("Row: ");
|
|
196
|
+ sb.Append(dataGridView_TableSetting.SelectedCells[i].RowIndex
|
|
197
|
+ .ToString());
|
|
198
|
+ sb.Append(", Column: ");
|
|
199
|
+ sb.Append(dataGridView_TableSetting.SelectedCells[i].ColumnIndex
|
|
200
|
+ .ToString());
|
|
201
|
+ sb.Append(Environment.NewLine);
|
|
202
|
+ }
|
|
203
|
+
|
|
204
|
+ sb.Append("Total: " + selectedCellCount.ToString());
|
|
205
|
+ MessageBox.Show(sb.ToString(), "Selected Cells");
|
|
206
|
+ }
|
|
207
|
+ }
|
|
208
|
+ }
|
57
|
209
|
}
|
58
|
210
|
}
|