Переглянути джерело

Serial Tx Rx UI 표시 Form Get 함수 추가 /Serail Tx Rx UI Function 추가 /

YJ 6 роки тому
батько
коміт
fa235704d3

+ 14 - 1
Basic_Terminal/Func/Serial.cs

@@ -12,6 +12,7 @@ namespace RF_TRIO_PLL_ZIG
12
 {
12
 {
13
     class Serial
13
     class Serial
14
     {
14
     {
15
+        Main_Form main_form;
15
         private System.IO.Ports.SerialPort serialPort;
16
         private System.IO.Ports.SerialPort serialPort;
16
         private Debug Debug = new Debug();    // Teminal Text Wnd Open
17
         private Debug Debug = new Debug();    // Teminal Text Wnd Open
17
         public string Serial_Name { get => serialPort.PortName;  set => serialPort.PortName = value;}
18
         public string Serial_Name { get => serialPort.PortName;  set => serialPort.PortName = value;}
@@ -74,9 +75,11 @@ namespace RF_TRIO_PLL_ZIG
74
             return arr_byteStr;
75
             return arr_byteStr;
75
 #endif
76
 #endif
76
         }
77
         }
77
-       
78
+        private delegate void BoolSet();
78
         public void Serial_DataRecvFunction(object sender, SerialDataReceivedEventArgs e)
79
         public void Serial_DataRecvFunction(object sender, SerialDataReceivedEventArgs e)
79
         {
80
         {
81
+            //this.main_form.RX_Light_ON();
82
+            main_form.Invoke(new BoolSet(main_form.RX_Light_ON));
80
             if (this.Debug.Created && Debug.RadioButton_ascii.Checked == true)
83
             if (this.Debug.Created && Debug.RadioButton_ascii.Checked == true)
81
             {
84
             {
82
                 string data = serialPort.ReadExisting();
85
                 string data = serialPort.ReadExisting();
@@ -129,6 +132,7 @@ namespace RF_TRIO_PLL_ZIG
129
                     {
132
                     {
130
                         serialPort.Open();
133
                         serialPort.Open();
131
                         Btn_Portonoff.Text = "Port Close";
134
                         Btn_Portonoff.Text = "Port Close";
135
+                        Debug.Debug_Main_Form_Get(this.main_form);
132
                     }
136
                     }
133
                     else
137
                     else
134
                     {
138
                     {
@@ -162,6 +166,8 @@ namespace RF_TRIO_PLL_ZIG
162
             try
166
             try
163
             {
167
             {
164
                 serialPort.Write(data,0,data.Length);
168
                 serialPort.Write(data,0,data.Length);
169
+                main_form.pictureBox_R_TX.Visible = false;
170
+                main_form.pictureBox_G_TX.Visible = true;
165
             }
171
             }
166
             catch (System.Exception ex)
172
             catch (System.Exception ex)
167
             {
173
             {
@@ -172,6 +178,8 @@ namespace RF_TRIO_PLL_ZIG
172
         {
178
         {
173
             try { serialPort.Write(buffer, 0, count); }
179
             try { serialPort.Write(buffer, 0, count); }
174
             catch { MessageBox.Show("Port Open Failed!!!"); }
180
             catch { MessageBox.Show("Port Open Failed!!!"); }
181
+            main_form.Invoke(new BoolSet(main_form.TX_Light_ON));
182
+            
175
         }
183
         }
176
         public void FileDownloadClass_Get(object filedownload)
184
         public void FileDownloadClass_Get(object filedownload)
177
         {
185
         {
@@ -202,5 +210,10 @@ namespace RF_TRIO_PLL_ZIG
202
             if (this.Debug.Created)
210
             if (this.Debug.Created)
203
                 this.Debug.ascii_to_hex_radiobuttonConvert();
211
                 this.Debug.ascii_to_hex_radiobuttonConvert();
204
         }
212
         }
213
+        
214
+        public void Serial_Main_Form_Get(object frm)
215
+        {
216
+            this.main_form = (Main_Form)frm;
217
+        }
205
     }
218
     }
206
 }
219
 }

+ 6 - 0
Basic_Terminal/Wnd/Debug.cs

@@ -13,6 +13,7 @@ namespace RF_TRIO_PLL_ZIG
13
 {
13
 {
14
     public partial class Debug : Form
14
     public partial class Debug : Form
15
     {
15
     {
16
+        Main_Form main_form;
16
         int LineLimit = 500;
17
         int LineLimit = 500;
17
         [DllImport("user32.dll")]
18
         [DllImport("user32.dll")]
18
         public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
19
         public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
@@ -30,6 +31,7 @@ namespace RF_TRIO_PLL_ZIG
30
 #if true
31
 #if true
31
         public void Data_Recv_Str(string text)
32
         public void Data_Recv_Str(string text)
32
         {
33
         {
34
+           
33
             int nLimitLines = Convert.ToInt32(LineLimit); //제한 라인 수
35
             int nLimitLines = Convert.ToInt32(LineLimit); //제한 라인 수
34
             try
36
             try
35
             {
37
             {
@@ -170,5 +172,9 @@ namespace RF_TRIO_PLL_ZIG
170
             radioButton_ascii.Checked = true;
172
             radioButton_ascii.Checked = true;
171
             radioButton_hex.Checked = false;
173
             radioButton_hex.Checked = false;
172
         }
174
         }
175
+        public void Debug_Main_Form_Get(object frm)
176
+        {
177
+            this.main_form = (Main_Form)frm;
178
+        }
173
     }
179
     }
174
 }
180
 }

+ 24 - 4
Basic_Terminal/Wnd/Main_Form.Designer.cs

@@ -1322,6 +1322,7 @@
1322
             this.pictureBox_PATH_3_5G_L_ON.Size = new System.Drawing.Size(38, 36);
1322
             this.pictureBox_PATH_3_5G_L_ON.Size = new System.Drawing.Size(38, 36);
1323
             this.pictureBox_PATH_3_5G_L_ON.TabIndex = 96;
1323
             this.pictureBox_PATH_3_5G_L_ON.TabIndex = 96;
1324
             this.pictureBox_PATH_3_5G_L_ON.TabStop = false;
1324
             this.pictureBox_PATH_3_5G_L_ON.TabStop = false;
1325
+            this.pictureBox_PATH_3_5G_L_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1325
             // 
1326
             // 
1326
             // pictureBox_PATH_3_5G_L_OFF
1327
             // pictureBox_PATH_3_5G_L_OFF
1327
             // 
1328
             // 
@@ -1331,6 +1332,7 @@
1331
             this.pictureBox_PATH_3_5G_L_OFF.Size = new System.Drawing.Size(38, 36);
1332
             this.pictureBox_PATH_3_5G_L_OFF.Size = new System.Drawing.Size(38, 36);
1332
             this.pictureBox_PATH_3_5G_L_OFF.TabIndex = 96;
1333
             this.pictureBox_PATH_3_5G_L_OFF.TabIndex = 96;
1333
             this.pictureBox_PATH_3_5G_L_OFF.TabStop = false;
1334
             this.pictureBox_PATH_3_5G_L_OFF.TabStop = false;
1335
+            this.pictureBox_PATH_3_5G_L_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1334
             // 
1336
             // 
1335
             // pictureBox_PATH_3_5G_H_ON
1337
             // pictureBox_PATH_3_5G_H_ON
1336
             // 
1338
             // 
@@ -1340,6 +1342,7 @@
1340
             this.pictureBox_PATH_3_5G_H_ON.Size = new System.Drawing.Size(38, 36);
1342
             this.pictureBox_PATH_3_5G_H_ON.Size = new System.Drawing.Size(38, 36);
1341
             this.pictureBox_PATH_3_5G_H_ON.TabIndex = 96;
1343
             this.pictureBox_PATH_3_5G_H_ON.TabIndex = 96;
1342
             this.pictureBox_PATH_3_5G_H_ON.TabStop = false;
1344
             this.pictureBox_PATH_3_5G_H_ON.TabStop = false;
1345
+            this.pictureBox_PATH_3_5G_H_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1343
             // 
1346
             // 
1344
             // pictureBox_PATH_3_5G_H_OFF
1347
             // pictureBox_PATH_3_5G_H_OFF
1345
             // 
1348
             // 
@@ -1349,6 +1352,7 @@
1349
             this.pictureBox_PATH_3_5G_H_OFF.Size = new System.Drawing.Size(38, 36);
1352
             this.pictureBox_PATH_3_5G_H_OFF.Size = new System.Drawing.Size(38, 36);
1350
             this.pictureBox_PATH_3_5G_H_OFF.TabIndex = 96;
1353
             this.pictureBox_PATH_3_5G_H_OFF.TabIndex = 96;
1351
             this.pictureBox_PATH_3_5G_H_OFF.TabStop = false;
1354
             this.pictureBox_PATH_3_5G_H_OFF.TabStop = false;
1355
+            this.pictureBox_PATH_3_5G_H_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1352
             // 
1356
             // 
1353
             // pictureBox_PLL_ON_OFF_3_5G_L_ON
1357
             // pictureBox_PLL_ON_OFF_3_5G_L_ON
1354
             // 
1358
             // 
@@ -1358,6 +1362,7 @@
1358
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.Size = new System.Drawing.Size(38, 36);
1362
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.Size = new System.Drawing.Size(38, 36);
1359
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.TabIndex = 96;
1363
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.TabIndex = 96;
1360
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.TabStop = false;
1364
             this.pictureBox_PLL_ON_OFF_3_5G_L_ON.TabStop = false;
1365
+            this.pictureBox_PLL_ON_OFF_3_5G_L_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1361
             // 
1366
             // 
1362
             // pictureBox_PLL_ON_OFF_3_5G_L_OFF
1367
             // pictureBox_PLL_ON_OFF_3_5G_L_OFF
1363
             // 
1368
             // 
@@ -1367,6 +1372,7 @@
1367
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.Size = new System.Drawing.Size(38, 36);
1372
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.Size = new System.Drawing.Size(38, 36);
1368
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.TabIndex = 96;
1373
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.TabIndex = 96;
1369
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.TabStop = false;
1374
             this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.TabStop = false;
1375
+            this.pictureBox_PLL_ON_OFF_3_5G_L_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1370
             // 
1376
             // 
1371
             // pictureBox_PLL_ON_OFF_3_5G_H_ON
1377
             // pictureBox_PLL_ON_OFF_3_5G_H_ON
1372
             // 
1378
             // 
@@ -1376,6 +1382,7 @@
1376
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.Size = new System.Drawing.Size(38, 36);
1382
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.Size = new System.Drawing.Size(38, 36);
1377
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.TabIndex = 96;
1383
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.TabIndex = 96;
1378
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.TabStop = false;
1384
             this.pictureBox_PLL_ON_OFF_3_5G_H_ON.TabStop = false;
1385
+            this.pictureBox_PLL_ON_OFF_3_5G_H_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1379
             // 
1386
             // 
1380
             // pictureBox_PLL_ON_OFF_3_5G_H_OFF
1387
             // pictureBox_PLL_ON_OFF_3_5G_H_OFF
1381
             // 
1388
             // 
@@ -1385,6 +1392,7 @@
1385
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.Size = new System.Drawing.Size(38, 36);
1392
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.Size = new System.Drawing.Size(38, 36);
1386
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.TabIndex = 96;
1393
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.TabIndex = 96;
1387
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.TabStop = false;
1394
             this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.TabStop = false;
1395
+            this.pictureBox_PLL_ON_OFF_3_5G_H_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1388
             // 
1396
             // 
1389
             // pictureBox_PATH_3_5G_UL_ON
1397
             // pictureBox_PATH_3_5G_UL_ON
1390
             // 
1398
             // 
@@ -1394,6 +1402,7 @@
1394
             this.pictureBox_PATH_3_5G_UL_ON.Size = new System.Drawing.Size(38, 36);
1402
             this.pictureBox_PATH_3_5G_UL_ON.Size = new System.Drawing.Size(38, 36);
1395
             this.pictureBox_PATH_3_5G_UL_ON.TabIndex = 96;
1403
             this.pictureBox_PATH_3_5G_UL_ON.TabIndex = 96;
1396
             this.pictureBox_PATH_3_5G_UL_ON.TabStop = false;
1404
             this.pictureBox_PATH_3_5G_UL_ON.TabStop = false;
1405
+            this.pictureBox_PATH_3_5G_UL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1397
             // 
1406
             // 
1398
             // pictureBox_PATH_3_5G_UL_OFF
1407
             // pictureBox_PATH_3_5G_UL_OFF
1399
             // 
1408
             // 
@@ -1403,6 +1412,7 @@
1403
             this.pictureBox_PATH_3_5G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1412
             this.pictureBox_PATH_3_5G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1404
             this.pictureBox_PATH_3_5G_UL_OFF.TabIndex = 96;
1413
             this.pictureBox_PATH_3_5G_UL_OFF.TabIndex = 96;
1405
             this.pictureBox_PATH_3_5G_UL_OFF.TabStop = false;
1414
             this.pictureBox_PATH_3_5G_UL_OFF.TabStop = false;
1415
+            this.pictureBox_PATH_3_5G_UL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1406
             // 
1416
             // 
1407
             // pictureBox_PATH_3_5G_DL_ON
1417
             // pictureBox_PATH_3_5G_DL_ON
1408
             // 
1418
             // 
@@ -1412,6 +1422,7 @@
1412
             this.pictureBox_PATH_3_5G_DL_ON.Size = new System.Drawing.Size(38, 36);
1422
             this.pictureBox_PATH_3_5G_DL_ON.Size = new System.Drawing.Size(38, 36);
1413
             this.pictureBox_PATH_3_5G_DL_ON.TabIndex = 96;
1423
             this.pictureBox_PATH_3_5G_DL_ON.TabIndex = 96;
1414
             this.pictureBox_PATH_3_5G_DL_ON.TabStop = false;
1424
             this.pictureBox_PATH_3_5G_DL_ON.TabStop = false;
1425
+            this.pictureBox_PATH_3_5G_DL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1415
             // 
1426
             // 
1416
             // pictureBox_PATH_3_5G_DL_OFF
1427
             // pictureBox_PATH_3_5G_DL_OFF
1417
             // 
1428
             // 
@@ -1421,6 +1432,7 @@
1421
             this.pictureBox_PATH_3_5G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1432
             this.pictureBox_PATH_3_5G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1422
             this.pictureBox_PATH_3_5G_DL_OFF.TabIndex = 96;
1433
             this.pictureBox_PATH_3_5G_DL_OFF.TabIndex = 96;
1423
             this.pictureBox_PATH_3_5G_DL_OFF.TabStop = false;
1434
             this.pictureBox_PATH_3_5G_DL_OFF.TabStop = false;
1435
+            this.pictureBox_PATH_3_5G_DL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1424
             // 
1436
             // 
1425
             // pictureBox_PATH_2_1G_UL_ON
1437
             // pictureBox_PATH_2_1G_UL_ON
1426
             // 
1438
             // 
@@ -1430,6 +1442,7 @@
1430
             this.pictureBox_PATH_2_1G_UL_ON.Size = new System.Drawing.Size(38, 36);
1442
             this.pictureBox_PATH_2_1G_UL_ON.Size = new System.Drawing.Size(38, 36);
1431
             this.pictureBox_PATH_2_1G_UL_ON.TabIndex = 96;
1443
             this.pictureBox_PATH_2_1G_UL_ON.TabIndex = 96;
1432
             this.pictureBox_PATH_2_1G_UL_ON.TabStop = false;
1444
             this.pictureBox_PATH_2_1G_UL_ON.TabStop = false;
1445
+            this.pictureBox_PATH_2_1G_UL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1433
             // 
1446
             // 
1434
             // pictureBox_PATH_2_1G_UL_OFF
1447
             // pictureBox_PATH_2_1G_UL_OFF
1435
             // 
1448
             // 
@@ -1439,6 +1452,7 @@
1439
             this.pictureBox_PATH_2_1G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1452
             this.pictureBox_PATH_2_1G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1440
             this.pictureBox_PATH_2_1G_UL_OFF.TabIndex = 96;
1453
             this.pictureBox_PATH_2_1G_UL_OFF.TabIndex = 96;
1441
             this.pictureBox_PATH_2_1G_UL_OFF.TabStop = false;
1454
             this.pictureBox_PATH_2_1G_UL_OFF.TabStop = false;
1455
+            this.pictureBox_PATH_2_1G_UL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1442
             // 
1456
             // 
1443
             // pictureBox_PATH_2_1G_DL_ON
1457
             // pictureBox_PATH_2_1G_DL_ON
1444
             // 
1458
             // 
@@ -1448,6 +1462,7 @@
1448
             this.pictureBox_PATH_2_1G_DL_ON.Size = new System.Drawing.Size(38, 36);
1462
             this.pictureBox_PATH_2_1G_DL_ON.Size = new System.Drawing.Size(38, 36);
1449
             this.pictureBox_PATH_2_1G_DL_ON.TabIndex = 96;
1463
             this.pictureBox_PATH_2_1G_DL_ON.TabIndex = 96;
1450
             this.pictureBox_PATH_2_1G_DL_ON.TabStop = false;
1464
             this.pictureBox_PATH_2_1G_DL_ON.TabStop = false;
1465
+            this.pictureBox_PATH_2_1G_DL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1451
             // 
1466
             // 
1452
             // pictureBox_PATH_2_1G_DL_OFF
1467
             // pictureBox_PATH_2_1G_DL_OFF
1453
             // 
1468
             // 
@@ -1457,6 +1472,7 @@
1457
             this.pictureBox_PATH_2_1G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1472
             this.pictureBox_PATH_2_1G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1458
             this.pictureBox_PATH_2_1G_DL_OFF.TabIndex = 96;
1473
             this.pictureBox_PATH_2_1G_DL_OFF.TabIndex = 96;
1459
             this.pictureBox_PATH_2_1G_DL_OFF.TabStop = false;
1474
             this.pictureBox_PATH_2_1G_DL_OFF.TabStop = false;
1475
+            this.pictureBox_PATH_2_1G_DL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1460
             // 
1476
             // 
1461
             // pictureBox_PATH_1_8G_UL_ON
1477
             // pictureBox_PATH_1_8G_UL_ON
1462
             // 
1478
             // 
@@ -1466,6 +1482,7 @@
1466
             this.pictureBox_PATH_1_8G_UL_ON.Size = new System.Drawing.Size(38, 36);
1482
             this.pictureBox_PATH_1_8G_UL_ON.Size = new System.Drawing.Size(38, 36);
1467
             this.pictureBox_PATH_1_8G_UL_ON.TabIndex = 96;
1483
             this.pictureBox_PATH_1_8G_UL_ON.TabIndex = 96;
1468
             this.pictureBox_PATH_1_8G_UL_ON.TabStop = false;
1484
             this.pictureBox_PATH_1_8G_UL_ON.TabStop = false;
1485
+            this.pictureBox_PATH_1_8G_UL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1469
             // 
1486
             // 
1470
             // pictureBox_PATH_1_8G_UL_OFF
1487
             // pictureBox_PATH_1_8G_UL_OFF
1471
             // 
1488
             // 
@@ -1475,6 +1492,7 @@
1475
             this.pictureBox_PATH_1_8G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1492
             this.pictureBox_PATH_1_8G_UL_OFF.Size = new System.Drawing.Size(38, 36);
1476
             this.pictureBox_PATH_1_8G_UL_OFF.TabIndex = 96;
1493
             this.pictureBox_PATH_1_8G_UL_OFF.TabIndex = 96;
1477
             this.pictureBox_PATH_1_8G_UL_OFF.TabStop = false;
1494
             this.pictureBox_PATH_1_8G_UL_OFF.TabStop = false;
1495
+            this.pictureBox_PATH_1_8G_UL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1478
             // 
1496
             // 
1479
             // pictureBox_PATH_1_8G_DL_ON
1497
             // pictureBox_PATH_1_8G_DL_ON
1480
             // 
1498
             // 
@@ -1484,6 +1502,7 @@
1484
             this.pictureBox_PATH_1_8G_DL_ON.Size = new System.Drawing.Size(38, 36);
1502
             this.pictureBox_PATH_1_8G_DL_ON.Size = new System.Drawing.Size(38, 36);
1485
             this.pictureBox_PATH_1_8G_DL_ON.TabIndex = 96;
1503
             this.pictureBox_PATH_1_8G_DL_ON.TabIndex = 96;
1486
             this.pictureBox_PATH_1_8G_DL_ON.TabStop = false;
1504
             this.pictureBox_PATH_1_8G_DL_ON.TabStop = false;
1505
+            this.pictureBox_PATH_1_8G_DL_ON.Click += new System.EventHandler(this.Power_OnOff_Set);
1487
             // 
1506
             // 
1488
             // pictureBox_PATH_1_8G_DL_OFF
1507
             // pictureBox_PATH_1_8G_DL_OFF
1489
             // 
1508
             // 
@@ -1493,6 +1512,7 @@
1493
             this.pictureBox_PATH_1_8G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1512
             this.pictureBox_PATH_1_8G_DL_OFF.Size = new System.Drawing.Size(38, 36);
1494
             this.pictureBox_PATH_1_8G_DL_OFF.TabIndex = 96;
1513
             this.pictureBox_PATH_1_8G_DL_OFF.TabIndex = 96;
1495
             this.pictureBox_PATH_1_8G_DL_OFF.TabStop = false;
1514
             this.pictureBox_PATH_1_8G_DL_OFF.TabStop = false;
1515
+            this.pictureBox_PATH_1_8G_DL_OFF.Click += new System.EventHandler(this.Power_OnOff_Set);
1496
             // 
1516
             // 
1497
             // label79
1517
             // label79
1498
             // 
1518
             // 
@@ -2043,7 +2063,6 @@
2043
         private System.Windows.Forms.Label label3;
2063
         private System.Windows.Forms.Label label3;
2044
         private System.Windows.Forms.Label label2;
2064
         private System.Windows.Forms.Label label2;
2045
         private System.Windows.Forms.GroupBox groupBox17;
2065
         private System.Windows.Forms.GroupBox groupBox17;
2046
-        private System.Windows.Forms.PictureBox pictureBox_G_TX;
2047
         private System.Windows.Forms.Label label78;
2066
         private System.Windows.Forms.Label label78;
2048
         private System.Windows.Forms.Label label77;
2067
         private System.Windows.Forms.Label label77;
2049
         private System.Windows.Forms.Label label76;
2068
         private System.Windows.Forms.Label label76;
@@ -2054,7 +2073,6 @@
2054
         private System.Windows.Forms.Label label71;
2073
         private System.Windows.Forms.Label label71;
2055
         private System.Windows.Forms.Label label70;
2074
         private System.Windows.Forms.Label label70;
2056
         private System.Windows.Forms.Label label69;
2075
         private System.Windows.Forms.Label label69;
2057
-        private System.Windows.Forms.PictureBox pictureBox_R_RX;
2058
         private System.Windows.Forms.Label label79;
2076
         private System.Windows.Forms.Label label79;
2059
         private System.Windows.Forms.PictureBox pictureBox15;
2077
         private System.Windows.Forms.PictureBox pictureBox15;
2060
         private System.Windows.Forms.Label label80;
2078
         private System.Windows.Forms.Label label80;
@@ -2118,8 +2136,6 @@
2118
         public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_DL_ON;
2136
         public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_DL_ON;
2119
         public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_ON;
2137
         public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_ON;
2120
         private System.Windows.Forms.GroupBox groupBox12;
2138
         private System.Windows.Forms.GroupBox groupBox12;
2121
-        private System.Windows.Forms.PictureBox pictureBox_R_TX;
2122
-        private System.Windows.Forms.PictureBox pictureBox_G_RX;
2123
         private System.Windows.Forms.GroupBox groupBox_TDD;
2139
         private System.Windows.Forms.GroupBox groupBox_TDD;
2124
         private System.Windows.Forms.Label label24;
2140
         private System.Windows.Forms.Label label24;
2125
         private System.Windows.Forms.Label label22;
2141
         private System.Windows.Forms.Label label22;
@@ -2127,6 +2143,10 @@
2127
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_UL_OFF;
2143
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_UL_OFF;
2128
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_DL_ON;
2144
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_DL_ON;
2129
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_UL_ON;
2145
         private System.Windows.Forms.PictureBox pictureBox_TDD_T_SYNC_UL_ON;
2146
+        public System.Windows.Forms.PictureBox pictureBox_G_TX;
2147
+        public System.Windows.Forms.PictureBox pictureBox_R_RX;
2148
+        public System.Windows.Forms.PictureBox pictureBox_R_TX;
2149
+        public System.Windows.Forms.PictureBox pictureBox_G_RX;
2130
     }
2150
     }
2131
 }
2151
 }
2132
 
2152
 

+ 78 - 3
Basic_Terminal/Wnd/Main_Form.cs

@@ -48,7 +48,7 @@ namespace RF_TRIO_PLL_ZIG
48
         {
48
         {
49
             bool ret = false;
49
             bool ret = false;
50
             ret = Serial_connectiondisable(serial.Serial_PortOpen(ref button_PortOpen, ref comboBox_Port));
50
             ret = Serial_connectiondisable(serial.Serial_PortOpen(ref button_PortOpen, ref comboBox_Port));
51
-            if (ret == true && timer.Enabled == false)
51
+            if (ret == false && timer.Enabled == false)
52
             { 
52
             { 
53
                 timer.Start(); //타이머를 발동시킨다.
53
                 timer.Start(); //타이머를 발동시킨다.
54
             }
54
             }
@@ -60,6 +60,8 @@ namespace RF_TRIO_PLL_ZIG
60
             {
60
             {
61
                 /*NOP*/
61
                 /*NOP*/
62
             }
62
             }
63
+            serial.Serial_Main_Form_Get(this);
64
+            
63
 
65
 
64
         }
66
         }
65
 
67
 
@@ -78,10 +80,39 @@ namespace RF_TRIO_PLL_ZIG
78
             comboBox_baudrate.Enabled = on_off;
80
             comboBox_baudrate.Enabled = on_off;
79
             return on_off;
81
             return on_off;
80
         }
82
         }
81
-
83
+        private delegate void BoolSet();
84
+        
85
+        public void TX_Light_ON()
86
+        {
87
+            
88
+            this.pictureBox_G_TX.Visible = true;
89
+            this.pictureBox_R_TX.Visible = false;
90
+        }
91
+        public void TX_Light_OFF()
92
+        {
93
+            this.pictureBox_R_TX.Visible = true;
94
+            this.pictureBox_G_TX.Visible = false;
95
+        }
96
+        public void RX_Light_ON()
97
+        {
98
+            this.pictureBox_G_RX.Visible = true;
99
+            this.pictureBox_R_RX.Visible = false;
100
+        }
101
+        public void RX_Light_OFF()
102
+        {
103
+            this.pictureBox_R_RX.Visible = true;
104
+            this.pictureBox_G_RX.Visible = false;
105
+        }
82
         private void timer_Tick(object sender, EventArgs e)
106
         private void timer_Tick(object sender, EventArgs e)
83
         {
107
         {
84
-
108
+            if (this.pictureBox_G_TX.Visible == true)
109
+            {
110
+                TX_Light_OFF();
111
+            }
112
+            if(this.pictureBox_G_RX.Visible == true)
113
+            {
114
+                RX_Light_OFF();
115
+            }
85
         }
116
         }
86
 
117
 
87
         private void button_Set_Click(object sender, EventArgs e)
118
         private void button_Set_Click(object sender, EventArgs e)
@@ -147,5 +178,49 @@ namespace RF_TRIO_PLL_ZIG
147
             pictureBox_TDD_T_SYNC_UL_ON.Visible = !pictureBox_TDD_T_SYNC_UL_ON.Visible;
178
             pictureBox_TDD_T_SYNC_UL_ON.Visible = !pictureBox_TDD_T_SYNC_UL_ON.Visible;
148
             pictureBox_TDD_T_SYNC_DL_OFF.Visible = !pictureBox_TDD_T_SYNC_DL_OFF.Visible;
179
             pictureBox_TDD_T_SYNC_DL_OFF.Visible = !pictureBox_TDD_T_SYNC_DL_OFF.Visible;
149
         }
180
         }
181
+        const byte PATH_1_8G_DL = 0;
182
+        const byte PATH_1_8G_UL = 1;
183
+        const byte PATH_2_1G_DL = 2;
184
+        const byte PATH_2_1G_UL = 3;
185
+        const byte PATH_3_5G_DL = 4;
186
+        const byte PATH_3_5G_UL = 5;
187
+        const byte PATH_3_5G_H = 6;
188
+        const byte PATH_3_5G_L = 7;
189
+        const byte PLL_POWER_ONOFF_3_5G_H = 8;
190
+        const byte PLL_POWER_ONOFF_3_5G_L = 9;
191
+
192
+        private void Power_OnOff_Set(object sender, EventArgs e)
193
+        {
194
+            byte temp_tag = 0;
195
+            PictureBox pictureBox = (PictureBox)sender;
196
+            temp_tag = Convert.ToByte(pictureBox.Tag);
197
+            switch (temp_tag)
198
+            {
199
+                case PATH_1_8G_DL:
200
+                    break;
201
+                case PATH_1_8G_UL:
202
+                    break;
203
+                case PATH_2_1G_DL:
204
+                    break;
205
+                case PATH_2_1G_UL:
206
+                    break;
207
+                case PATH_3_5G_DL:
208
+                    break;
209
+                case PATH_3_5G_UL:
210
+                    break;
211
+                case PATH_3_5G_H:
212
+                    break;
213
+                case PATH_3_5G_L:
214
+                    break;
215
+                case PLL_POWER_ONOFF_3_5G_H:
216
+                    break;
217
+                case PLL_POWER_ONOFF_3_5G_L:
218
+                    break;
219
+
220
+
221
+            }
222
+            pictureBox.Visible = !pictureBox.Visible;
223
+            bluecell_BootProtocol.Bluecell_BtnSet(this.serial, this);
224
+        }
150
     }
225
     }
151
 }
226
 }