Kaynağa Gözat

[WallPadEmergency, WallPadGlobalScreen, WallPadHomeCtrl]
1.5.29소스로 업데이트

jglee 3 yıl önce
ebeveyn
işleme
ce978276ed
23 değiştirilmiş dosya ile 10552 ekleme ve 9778 silme
  1. 3 2
      WallPadEmergency/src/main/AndroidManifest.xml
  2. 3 2
      WallPadEnergyCtrl/src/main/AndroidManifest.xml
  3. 5 1
      WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/MainActivity.java
  4. 3 3
      WallPadGlobalScreen/src/main/AndroidManifest.xml
  5. 186 61
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/MainActivity.java
  6. 54 17
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/DataClasses.java
  7. 74 22
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/Global.java
  8. 12 8
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/ImageStringDataConvert.java
  9. 62 20
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/screen/BLACKOUT_EMERGENCY_LIGHT.java
  10. 154 48
      WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/screen/CTRL_LIGHT_LIVINGROOM.java
  11. 45 45
      WallPadHomeCtrl/src/main/AndroidManifest.xml
  12. 3172 3125
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/MainActivity.java
  13. 397 397
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/declare/Common.java
  14. 34 2
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/declare/ID.java
  15. 18 18
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_airquality/AirQualityMainScreen.java
  16. 160 0
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_concent/ConcentPopupScreen.java
  17. 584 584
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_gas/GasMainScreen.java
  18. 37 8
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_gas/HybridCookTopMainScreen.java
  19. 1732 1732
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_heating/HeatingV2MainScreen.java
  20. 109 26
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightEtcEachMainScreen.java
  21. 71 20
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightEtcEachPopupRoomScreen.java
  22. 1296 1296
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightHdcLivMainScreen.java
  23. 2341 2341
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_venti/VentiMainScreen.java

+ 3 - 2
WallPadEmergency/src/main/AndroidManifest.xml

@@ -1,10 +1,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpademergency"
     android:versionCode="01"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.29.01">
 
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
     <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
     <uses-permission android:name="android.permission.WAKE_LOCK" />

+ 3 - 2
WallPadEnergyCtrl/src/main/AndroidManifest.xml

@@ -1,10 +1,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadenergyctrl"
     android:versionCode="01"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.29.01">
 
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
-	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 	<uses-permission android:name="android.permission.WRITE_SETTINGS"/> 
 	<uses-permission android:name="android.permission.WAKE_LOCK" />
 	<uses-permission android:name="android.permission.INTERNET"/>

+ 5 - 1
WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/MainActivity.java

@@ -1484,7 +1484,11 @@ public class MainActivity extends WpadActivity {
         {
             Log.i(TAG, "[LoadDefaultMenuList] - RemoteMeter Screen ADD ~~~");
             arrayList.add(API_Menu.SubMenuEnergy.Name_RemoteMeter); ChildCount++;
-            arrayList.add(API_Menu.SubMenuEnergy.Name_EnergyMgr); ChildCount++;
+            if(Version.getModelType() != Version.MODEL_TYPE.IHN_1010GL_I_2443ALT)
+            {
+                arrayList.add(API_Menu.SubMenuEnergy.Name_EnergyMgr); ChildCount++;
+            }
+
         }
 
         /*if(realUse[0] == 1)

+ 3 - 3
WallPadGlobalScreen/src/main/AndroidManifest.xml

@@ -1,10 +1,12 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadglobalscreen"
     android:versionCode="17"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.29.01">
 
     <uses-feature android:name="android.hardware.camera" />
 
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
@@ -12,8 +14,6 @@
     <uses-permission android:name="android.permission.CAMERA" />
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.GET_TASKS" />
 

+ 186 - 61
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/MainActivity.java

@@ -36,6 +36,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.API_Menu;
 import com.artncore.commons.define;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import java.util.List;
 import java.util.Timer;
@@ -143,9 +144,13 @@ public class MainActivity extends WpadActivity {
             super.removeBrActionFilter(strBLACKOUT_RELEASED);
 
             super.onDestroy();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onDestroy()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -193,9 +198,13 @@ public class MainActivity extends WpadActivity {
                 finishScreen();
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -221,9 +230,14 @@ public class MainActivity extends WpadActivity {
             super.onKeyDown(keyCode, event);
             LOG("[onKeyDown] keyCode [" + keyCode + "], event [" + event + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onKeyDown()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -233,9 +247,14 @@ public class MainActivity extends WpadActivity {
         try {
             super.onChangeScreen(nScreenId);
             return setChangeScreen(nScreenId, false);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onChangeScreen(nScreenId)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -292,9 +311,14 @@ public class MainActivity extends WpadActivity {
 
             Global.nCurrentScreenID = nNextScreen;   // 변경된 ScreenID를 저장한다.
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setChangeScreen(int nNextScreen, boolean bRemoveOnly)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -331,9 +355,13 @@ public class MainActivity extends WpadActivity {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -345,9 +373,13 @@ public class MainActivity extends WpadActivity {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -381,9 +413,14 @@ public class MainActivity extends WpadActivity {
                 nAutoScreenChangeTime = nAutoScreenChangeTimeout;
             }
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setAutoScreenChange(context, nScreenID, nTimeout) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -394,9 +431,14 @@ public class MainActivity extends WpadActivity {
             if (nAutoScreenChangeTime > 0) nAutoScreenChangeTime = nAutoScreenChangeTimeout;
 //            LOG("[extendAutoScreenChangeTime] nAutoScreenChangeTime [" + nAutoScreenChangeTime + "], nAutoScreenChangeTimeout [" + nAutoScreenChangeTimeout + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] extendAutoScreenChangeTime() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -411,9 +453,14 @@ public class MainActivity extends WpadActivity {
                 AutoScreenChangeTimer = null;
             }
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] cancelAutoScreenChange() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -431,9 +478,13 @@ public class MainActivity extends WpadActivity {
                     AutoScreenChangeTimer = null;
                     sendHandlerMsg(HANDLERMSG.AUTOSCREENCHANGE, nAutoScreenChangeNextID, 0);
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] AutoScreenChangeCntDN().run() : " + e);
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -448,9 +499,13 @@ public class MainActivity extends WpadActivity {
             else {
                 Log.i(TAG, "[startDeviceService] ========== Already Running!! [wallpaddevservice.ServiceMain] ==========");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] startDeviceService()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -464,9 +519,14 @@ public class MainActivity extends WpadActivity {
                 }
             }
             return false;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isDeviceServiceRunning(String strServiceName)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -492,9 +552,14 @@ public class MainActivity extends WpadActivity {
         try {
             if (strValue.equals("true")) return true;
             else return false;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] convertStringtoBoolean(String strValue)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -503,9 +568,14 @@ public class MainActivity extends WpadActivity {
         try {
             if (bValue) return "true";
             else return "false";
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "false";
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] convertBooleantoString(boolean strValue)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return "false";
         }
     }
@@ -515,9 +585,13 @@ public class MainActivity extends WpadActivity {
     public static void playConfigTouch() {
         try {
             mSound.Play(SND.effect.TOUCH_UNLATCHED);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playConfigTouch()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -531,9 +605,13 @@ public class MainActivity extends WpadActivity {
             mIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
             mIntent.setComponent(mComponentName);
             startActivity(mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runGoogleLauncher() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -550,9 +628,13 @@ public class MainActivity extends WpadActivity {
             intent.setComponent(cnn);
             startActivity(intent);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] startSystemReboot() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -599,9 +681,14 @@ public class MainActivity extends WpadActivity {
 //            LOG_INFO("[getTopActivity] getClassName = " + mTaskInfo.get(0).topActivity.getClassName());
 //            LOG_INFO("[getTopActivity] getPackageName = " + mComponentName.getPackageName());
             return mComponentName.getPackageName();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getTopActivity()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -628,9 +715,13 @@ public class MainActivity extends WpadActivity {
                     return true;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isThisAppTop()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -660,9 +751,13 @@ public class MainActivity extends WpadActivity {
                     return true;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isPackageTop(String strPackageName)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -725,9 +820,14 @@ public class MainActivity extends WpadActivity {
                 Log.w(TAG, "[isWallPadMainTop] WallPadMain is NOT Top!!");
                 return false;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isWallPadMainTop()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -746,9 +846,13 @@ public class MainActivity extends WpadActivity {
 
             runWallPadCallAPK(eCallOwner, eEventType, eCallType);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runCallAPK(CALLTYPE calltype)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -768,9 +872,13 @@ public class MainActivity extends WpadActivity {
             else {
                 Log.w(TAG, "[runWallPadCallAPK] WallPadCall is already running!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runWallPadCallAPK(CALLOWNER eCallOwner, CALLEVENTTYPE eEventType, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -783,9 +891,6 @@ public class MainActivity extends WpadActivity {
             try {
                 Log.i(TAG, "[startCallServiceThread.run()] ===== START =====");
                 // SIP/PSTN/Subphone 서비스 실행
-                //Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.SIPStun.StartService");
-                //getApplicationContext().startService(sipServiceLauncher);
-
                 Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
                 getApplicationContext().startService(sipServiceLauncher);
 
@@ -795,9 +900,13 @@ public class MainActivity extends WpadActivity {
                 Intent SubPhoneServiceLauncher = new Intent ("kr.co.icontrols.callengine.subphone.SubPhoneSerialManager.StartService");
                 getApplicationContext().startService(SubPhoneServiceLauncher);
                 Log.i(TAG, "[startCallServiceThread.run()] ===== END =====");
-            } catch(Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] startCallServiceThread()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
                 e.getStackTrace();
             }
         }
@@ -829,9 +938,13 @@ public class MainActivity extends WpadActivity {
             else {
                 Log.w(TAG, "[runWallPadHomeCtrlAPK] WallPadHomeCtrl is already running!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runWallPadHomeCtrlAPK(CTRLTYPE eCTRLType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -844,9 +957,13 @@ public class MainActivity extends WpadActivity {
             else {
                 Log.w(TAG, "[runWallPadHomeCtrlAPK] WallPadHomeCtrl is already running!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runWallPadHomeCtrlAPK(CTRLTYPE eCTRLType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -857,9 +974,13 @@ public class MainActivity extends WpadActivity {
             boolean bResult = DBMGR.setGlobalScreenAPKRun(bRun);
             Log.d(TAG, "[setGlobalScreenAppRunningStatus] bResult : " + bResult);
             DBMGR.closeDB();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setGlobalScreenAppRunningStatus(boolean bRun)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             DBMGR.closeDB();
         }
     }
@@ -868,9 +989,13 @@ public class MainActivity extends WpadActivity {
         try {
             Log.d(TAG, "[finishScreen] ===== START =====");
             super.finish();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] finishScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 54 - 17
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/DataClasses.java

@@ -14,6 +14,7 @@ package kr.co.icontrols.wallpadglobalscreen.global;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
 import java.util.ArrayList;
 
 public final class DataClasses {
@@ -561,7 +562,11 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < ValueTable.size(); i++) {
-                LOG("[ConfigValueTable] Name [" + getConfigValue(i).NAME() + "], Count [" + getConfigValue(i).CNT() + "], Value [" + getConfigValue(i).VALUE() + "], ETC [" + getConfigValue(i).ETC() + "]");
+                ConfigValue item = getConfigValue(i);
+                if(item!=null)
+                {
+                    LOG("[ConfigValueTable] Name [" + item.NAME() + "], Count [" + item.CNT() + "], Value [" + item.VALUE() + "], ETC [" + item.ETC() + "]");
+                }
             }
         }
 
@@ -605,7 +610,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < LineTable.size(); i++) {
-                LOG("[LineInfoTable] Name [" + getLineInfo(i).NAME() + "], Low [" + getLineInfo(i).LOW() + "], High [" + getLineInfo(i).HIGH() + "], ETC [" + getLineInfo(i).ETC() + "]");
+                LineInfo item = getLineInfo(i);
+                if(item!=null)
+                    LOG("[LineInfoTable] Name [" + item.NAME() + "], Low [" + item.LOW() + "], High [" + item.HIGH() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -646,7 +653,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < SubTable.size(); i++) {
-                LOG("[SubInfoTable] ID [" + getSubInfo(i).ID() + "], IP [" + getSubInfo(i).IP() + "], ETC [" + getSubInfo(i).ETC() + "]");
+                SubInfo item = getSubInfo(i);
+                if(item!=null)
+                    LOG("[SubInfoTable] ID [" + item.ID() + "], IP [" + item.IP() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -684,7 +693,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < ElevDisableTable.size(); i++) {
-                LOG("[ElevDisableFloorTable] Floor [" + getElevDisableInfo(i).FLOOR() + "], ETC [" + getElevDisableInfo(i).ETC() + "]");
+                ElevDisableFloor item =  getElevDisableInfo(i);
+                if(item!=null)
+                    LOG("[ElevDisableFloorTable] Floor [" + item.FLOOR() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -725,7 +736,12 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < GuardTable.size(); i++) {
-                LOG("[GuardListTable] Name [" + getGuardInfo(i).NAME() + "], Value [" + getGuardInfo(i).IP() + "], ETC [" + getGuardInfo(i).ETC() + "]");
+                GuardList item = getGuardInfo(i);
+                if(item!=null)
+                {
+                    LOG("[GuardListTable] Name [" + item.NAME() + "], Value [" + item.IP() + "], ETC [" + item.ETC() + "]");
+                }
+
             }
         }
 
@@ -1070,10 +1086,15 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < AccessKeyTables.size(); i++) {
-                LOG("[AccessKeyInfoTable] Index [" + getAccessKeyInfo(i).getIndex() + "], SN [" + getAccessKeyInfo(i).getSN() + "], UID [" + getAccessKeyInfo(i).getUID() + "], Type [" + getAccessKeyInfo(i).getType() + "], " +
-                        "SiteCode [" + getAccessKeyInfo(i).getSitecode() + "], Dong [" + getAccessKeyInfo(i).getDong() + "], Ho [" + getAccessKeyInfo(i).getHo() + "], KeyNum [" + getAccessKeyInfo(i).getKeyNo() + "], " +
-                        "IssueCnt [" + getAccessKeyInfo(i).getIssueCnt() + "], IssuedDate [" + getAccessKeyInfo(i).getIssuedDate() + "], LastUseDate [" + getAccessKeyInfo(i).getLastUseDate() + "], " +
-                        "Message [" + getAccessKeyInfo(i).getMessage() + "]");
+                AccessKeyInfo item = getAccessKeyInfo(i);
+                if(item!=null)
+                {
+                    LOG("[AccessKeyInfoTable] Index [" + item.getIndex() + "], SN [" + item.getSN() + "], UID [" + item.getUID() + "], Type [" + item.getType() + "], " +
+                            "SiteCode [" + item.getSitecode() + "], Dong [" + item.getDong() + "], Ho [" + item.getHo() + "], KeyNum [" + item.getKeyNo() + "], " +
+                            "IssueCnt [" + item.getIssueCnt() + "], IssuedDate [" + item.getIssuedDate() + "], LastUseDate [" + item.getLastUseDate() + "], " +
+                            "Message [" + item.getMessage() + "]");
+                }
+
             }
         }
 
@@ -1199,8 +1220,12 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < AlarmInfoTables.size(); i++) {
-                LOG("[AlarmInfoTable] sName [" + getAlarmInfo(i).getName() + "], sAlarmType [" + getAlarmInfo(i).getAlarmType() + "], sRemoteIP [" + getAlarmInfo(i).getRemoteIP() + "], " +
-                        "sChecked [" + getAlarmInfo(i).getChecked() + "], sETC [" + getAlarmInfo(i).getETC() + "], sTimestamp [" + getAlarmInfo(i).getTimestamp() + "]");
+                AlarmInfo item = getAlarmInfo(i);
+                if(item !=null)
+                {
+                    LOG("[AlarmInfoTable] sName [" + item.getName() + "], sAlarmType [" + item.getAlarmType() + "], sRemoteIP [" + item.getRemoteIP() + "], " +
+                            "sChecked [" + item.getChecked() + "], sETC [" + item.getETC() + "], sTimestamp [" + item.getTimestamp() + "]");
+                }
             }
         }
 
@@ -1349,9 +1374,14 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < CallHistoryInfoTables.size(); i++) {
-                LOG("[CallHistoryInfoTable] sName [" + getCallHistoryInfo(i).getName() + "], sCallResult [" + getCallHistoryInfo(i).getCallResult() + "], sRemoteIP [" + getCallHistoryInfo(i).getRemoteIP() + "], " +
-                        "sSIPID [" + getCallHistoryInfo(i).getSIPID() + "], sChecked [" + getCallHistoryInfo(i).getChecked() + "], sETC [" + getCallHistoryInfo(i).getETC() + "], " +
-                        "sTimestamp [" + getCallHistoryInfo(i).getTimestamp() + "]");
+                CallHistoryInfo item = getCallHistoryInfo(i);
+                if(item!=null)
+                {
+                    LOG("[CallHistoryInfoTable] sName [" + item.getName() + "], sCallResult [" + item.getCallResult() + "], sRemoteIP [" + item.getRemoteIP() + "], " +
+                            "sSIPID [" + item.getSIPID() + "], sChecked [" + item.getChecked() + "], sETC [" + item.getETC() + "], " +
+                            "sTimestamp [" + item.getTimestamp() + "]");
+                }
+
             }
         }
 
@@ -1400,7 +1430,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < LightStatusTables.size(); i++) {
-                LOG("[LightStatusTable] hLightID [" + String.format("%02X", getLightStatus(i).getLightID()) + "], hOnOff [" + String.format("%02X", getLightStatus(i).getOnOff()) + "], hDim [" + String.format("%02X", getLightStatus(i).getDim()) + "], hColor [" + String.format("%02X", getLightStatus(i).getColor()) + "]");
+                LightStatus item = getLightStatus(i);
+                if(item!=null)
+                    LOG("[LightStatusTable] hLightID [" + String.format("%02X", item.getLightID()) + "], hOnOff [" + String.format("%02X", item.getOnOff()) + "], hDim [" + String.format("%02X", item.getDim()) + "], hColor [" + String.format("%02X", item.getColor()) + "]");
             }
         }
 
@@ -1618,9 +1650,14 @@ public final class DataClasses {
                     else strResult += " " + String.format("%02X", hdata[i]);
                 }
                 return strResult;
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] HextoString(hdata) : " + e);
-                e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                //e.printStackTrace();
                 return null;
             }
         }

+ 74 - 22
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/Global.java

@@ -18,7 +18,9 @@ import android.util.Log;
 import android.view.WindowManager;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
+import com.util.LogUtil;
 
+import java.security.SecureRandom;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -60,9 +62,14 @@ public final class Global
         try {
             mContext = context;
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setGlobalContext(context) " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -90,9 +97,14 @@ public final class Global
                 Log.d(TAG, "[ZeroPadding_Head] strOriginalString(" + strOriginalString.length() +") is longer than nOutLength(" + nOutLength + ")");
                 return strResult;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return strResult;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[ZeroPadding_Head] (Exception) ZeroPadding_Head(...) + e");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return strResult;
         }
     }
@@ -107,9 +119,14 @@ public final class Global
                 else strResult += " " + HextoString((byte) hdata[i]);
             }
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] HextoString(hdata) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -126,9 +143,14 @@ public final class Global
                 strResult += HextoString((byte) hdata[i]) + " ";
             }
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] printHexs(hdata, nLength) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -137,9 +159,14 @@ public final class Global
     public static String HextoString(byte data) {
         try {
             return String.format("%02X", data);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] HextoString(data) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -163,9 +190,14 @@ public final class Global
                 hResult[i] = (byte)Integer.parseInt(strTargetData.substring(2 * i, 2 * i + 2), 16);
             }
             return hResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] StringToHex(TargetData) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -185,9 +217,14 @@ public final class Global
                 mStringBuffer.append(strHexNum.substring(strHexNum.length() - 2));
             }
             return mStringBuffer.toString();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] HexToString(hTargetData) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -200,7 +237,8 @@ public final class Global
                 checkDate = sdf.parse(calendar);
             } catch (ParseException e) {
                 Log.e(TAG, "[ParseException] isValidCalendar(calendar) : " + e);
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
             if (!sdf.format(checkDate).equals(calendar)) {
@@ -208,9 +246,14 @@ public final class Global
                 return false;
             }
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isValidCalendar(calendar) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -220,21 +263,30 @@ public final class Global
         try {
             LOG("[ctrlLCDBrightness] nLevel [" + nLevel + "]");
             Settings.System.putInt(mContext.getContentResolver(), "screen_brightness", LCD_BrightnessLevel[nLevel -1]);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlScreenBrightness(nLevel) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
     public static int makeRandomMin() {
         try {
             LOG("[makeRandomMin] ===== START =====");
-            Random mRandom = new Random();
+            SecureRandom mRandom = new SecureRandom();
             int nRandomMin = Math.abs(mRandom.nextInt(59) + 1);
             LOG("[checkSyncSystemClock] nRandomMin = " + nRandomMin);
             return nRandomMin;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 30;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] makeRandomMin() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 30;
         }
     }

+ 12 - 8
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/global/ImageStringDataConvert.java

@@ -19,16 +19,20 @@ public class ImageStringDataConvert {
         File dirFile=new File(path);
         File []fileList=dirFile.listFiles();
 
-        for(File tempFile : fileList) {
-            if(tempFile.isFile())
-            {
-                String tempPath=tempFile.getParent();
-                String tempFileName=tempFile.getName();
-                System.out.println("Path="+tempPath);
-                System.out.println("FileName="+tempFileName);
-                Log.d(TAG, tempPath + "," + tempFileName);
+        if(fileList!=null)
+        {
+            for(File tempFile : fileList) {
+                if(tempFile.isFile())
+                {
+                    String tempPath=tempFile.getParent();
+                    String tempFileName=tempFile.getName();
+                    System.out.println("Path="+tempPath);
+                    System.out.println("FileName="+tempFileName);
+                    Log.d(TAG, tempPath + "," + tempFileName);
+                }
             }
         }
+
     }
 
     public static Bitmap decode(String encodedImage)

+ 62 - 20
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/screen/BLACKOUT_EMERGENCY_LIGHT.java

@@ -20,6 +20,7 @@ import kr.co.icontrols.wallpadglobalscreen.R;
 import kr.co.icontrols.wallpadglobalscreen.global.Common.POSITION;
 import kr.co.icontrols.wallpadglobalscreen.global.ID;
 import kr.co.icontrols.wallpadsupport.WpadImageView;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadsupport.WpadScale;
 import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
@@ -99,18 +100,26 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
             ViewRegistration(layout, TXT_INSTRUCTION_02, getPosition(ID.SCREENS.BLACKOUT_EMERGENCY_LIGHT.ELEMENTS.TEXTS.TXT_INSTRUCTION_02).X, getPosition(ID.SCREENS.BLACKOUT_EMERGENCY_LIGHT.ELEMENTS.TEXTS.TXT_INSTRUCTION_02).Y);
             TXT_INSTRUCTION_02.setText(strInstruction_02);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] BLACKOUT_EMERGENCY_LIGHT(Context context, RelativeLayout layout, WallPadAPI wallpadapi, int operationMode, Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void init() {
         try {
             saveScreenBrightness();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] init()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,9 +130,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
             fScreenBrightness = mLayoutParams.screenBrightness;
             mLayoutParams.screenBrightness = 1F;
             ((Activity)this.getContext()).getWindow().setAttributes(mLayoutParams);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] saveScreenBrightness()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -133,9 +146,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
             WindowManager.LayoutParams mLayoutParams = ((Activity)this.getContext()).getWindow().getAttributes();
             mLayoutParams.screenBrightness = fScreenBrightness;
             ((Activity)this.getContext()).getWindow().setAttributes(mLayoutParams);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] restoreScreenBrightness()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -152,9 +169,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
         try {
             String strActionName = intent.getAction();
             LOG("[onBrReceive] strActionName = " + strActionName);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -164,9 +185,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
         try {
             LOG("[onClose] ========== START ==========");
             restoreScreenBrightness();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -175,9 +200,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
         super.Close();
         try {
             LOG("[Close] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -194,9 +223,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
                     ((MainActivity)mContext).sendHandlerMsg(MainActivity.HANDLERMSG.FINISHAPP, 0, 0);
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -229,9 +262,14 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -239,9 +277,13 @@ public class BLACKOUT_EMERGENCY_LIGHT extends WpadScreen {
     private void finishScreen() {
         try {
             super.finish();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] finishScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 154 - 48
WallPadGlobalScreen/src/main/java/kr/co/icontrols/wallpadglobalscreen/screen/CTRL_LIGHT_LIVINGROOM.java

@@ -23,6 +23,7 @@ import android.view.View;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadglobalscreen.global.Common;
 import kr.co.icontrols.wallpadglobalscreen.global.Common.POSITION;
 import kr.co.icontrols.wallpadglobalscreen.R;
@@ -449,9 +450,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             else {
                 Log.w(TAG, "[onBrReceive] Not supported ActionName [" + strActionName + "]");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -543,7 +548,8 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                             mData_KnxLiv.ControlType = false;
                             displaySeekbarThumb(!mData_KnxLiv.ControlType);
                             setKNXLivinglightSeekbar(true);
-                            mKnx_LivingRoomLightAPI.SetControlMode(false);
+                            if(mKnx_LivingRoomLightAPI!=null)
+                                mKnx_LivingRoomLightAPI.SetControlMode(false);
                         }
                     }
                     else if (TargetId == ID.SCREENS.CTRL_LIGHT_LIVINGROOM.ELEMENTS.BTNS.SELECT_COLOR) {
@@ -556,7 +562,8 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                             mData_KnxLiv.ControlType = true;
                             displaySeekbarThumb(!mData_KnxLiv.ControlType);
                             setKNXLivinglightSeekbar(false);
-                            mKnx_LivingRoomLightAPI.SetControlMode(true);
+                            if(mKnx_LivingRoomLightAPI!=null)
+                                mKnx_LivingRoomLightAPI.SetControlMode(true);
                         }
                     }
                     else {
@@ -567,9 +574,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     Log.w(TAG, "[onTouchEvent] Not supported distribution type. -> " + Declare.CurrentDistributionPanelType);
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -583,9 +594,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             else {
                 Log.w(TAG, "[printKNXLivingLightStatus] mKnx_LivingRoomLightAPI is null!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] printKNXLivingLightStatus())");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -613,9 +628,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             else {
                 Log.w(TAG, "[printKNXLivingLightStatus] mKnx_LivingRoomLightAPI is null!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setKNXLivinglightSeekbar(boolean bDim)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -632,9 +651,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             else {
                 Log.w(TAG, "[getKNXLivinglightOnOff] mKnx_LivingRoomLightAPI is null!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getKNXLivinglightOnOff()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -642,9 +665,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
     private void finishScreen() {
         try {
             super.finish();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] finishScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -720,9 +747,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                         Sound().Play(SND.effect.TOUCH_LATCHED);
                     }
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] mOnSeekBarChangeListener.onStopTrackingTouch");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -772,10 +803,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
         if (Declare.CurrentDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
             try {
                 mSdb_LivingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -100;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[loadDeviceAPI] - [Exception Error] mWallPadAPI.Get_Sdb_LivingRoomLightAPI");
                 Log.e(TAG, "[loadDeviceAPI] - " + e.toString());
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -100;
             }
 
@@ -787,10 +823,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
         else if (Declare.CurrentDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
             try {
                 mKnx_LivingRoomLightAPI = mWallPadAPI.Get_Knx_LivingRoomLightAPI();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -100;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[loadDeviceAPI] - [Exception Error] mWallPadAPI.mKnx_LivingRoomLightAPI");
                 Log.e(TAG, "[loadDeviceAPI] - " + e.toString());
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -100;
             }
 
@@ -830,10 +871,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     LOG("[registerBR] - regChangedBR START");
                     mSdb_LivingRoomLightAPI.regChangedBR(BR_NAME);
                     LOG("[registerBR] - regChangedBR END");
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -101;
+                }
+                catch (Exception e) {
                     Log.e(TAG, "[registerBR] - [Exception Error] mLivingRoomEnergyMeterV2API.regChangedBR");
                     Log.e(TAG, "[registerBR] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return -101;
                 }
                 super.addBrActionFilter(BR_NAME);
@@ -844,10 +890,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     LOG("[registerBR] - unregChangedBR START");
                     mSdb_LivingRoomLightAPI.unregChangedBR(BR_NAME);
                     LOG("[registerBR] - unregChangedBR END");
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -102;
+                }
+                catch (Exception e) {
                     Log.e(TAG, "[registerBR] - [Exception Error] lightApi.unregChangedBR");
                     Log.e(TAG, "[registerBR] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return -102;
                 }
                 super.removeBrActionFilter(BR_NAME);
@@ -867,10 +918,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     LOG("[registerBR] - regChangedBR START");
                     mKnx_LivingRoomLightAPI.regChangedBR(BR_NAME);
                     LOG("[registerBR] - regChangedBR END");
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -101;
+                }
+                catch (Exception e) {
                     Log.e(TAG, "[registerBR] - [Exception Error] mKnx_LivingRoomLightAPI.regChangedBR");
                     Log.e(TAG, "[registerBR] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return -101;
                 }
                 super.addBrActionFilter(BR_NAME);
@@ -881,10 +937,15 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     LOG("[registerBR] - unregChangedBR START");
                     mKnx_LivingRoomLightAPI.unregChangedBR(BR_NAME);
                     LOG("[registerBR] - unregChangedBR END");
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -102;
+                }
+                catch (Exception e) {
                     Log.e(TAG, "[registerBR] - [Exception Error] lightApi.unregChangedBR");
                     Log.e(TAG, "[registerBR] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return -102;
                 }
                 super.removeBrActionFilter(BR_NAME);
@@ -920,9 +981,14 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     Log.e(TAG, "[updateDeviceStatus] ret (" + ret + ")   ErrorCode = " + mSdb_LivingRoomLightAPI.ErrorCode.ErrStr());
                     return -2;
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -100;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] updateDeviceStatus()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -100;
             }
 
@@ -942,9 +1008,14 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                     Log.e(TAG, "[updateDeviceStatus] ret (" + ret + ")   ErrorCode = " + mKnx_LivingRoomLightAPI.ErrorCode.ErrStr());
                     return -2;
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -100;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] updateDeviceStatus()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -100;
             }
 
@@ -1089,9 +1160,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             else {
                 Log.w(TAG, "[updateDisplay] mSdb_LivingRoomLightAPI is null!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateDisplay()");
-            e.printStackTrace();;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);;
         }
     }
 
@@ -1138,9 +1213,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                 Log.w(TAG, "[GetmData_LightOnOff] Not supported distribution type. -> " + Declare.CurrentDistributionPanelType);
                 return false;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GetmData_LightOnOff()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -1197,9 +1276,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             imageView.setImageBitmap(size);
             SEEKBAR_CTRL_LIGHT.setThumb(imageView.getDrawable());
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displaySeekbarThumb(boolean bDim)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1248,9 +1331,14 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             int LightCount = Get_Light_info[2];
 
             return LightCount;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[DB_GetLightCount] Exception Error");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
         }
     }
@@ -1318,9 +1406,14 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -1423,9 +1516,14 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
                 Log.w(TAG, "[loadDeviceAPI] Not supported distribution type. -> " + Declare.CurrentDistributionPanelType);
                 return false;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registorBRName_LivingEM(boolean bRegi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1436,9 +1534,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             Intent intent = new Intent();
             intent.setAction(BR_WALLPAD_DIAL_GLOBALSCREEN_TOUCH);
             getContext().sendBroadcast(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendGlobalScreenActions()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1451,9 +1553,13 @@ public class CTRL_LIGHT_LIVINGROOM extends WpadScreen {
             BTN_SELECT_COLOR.setButtonFrontImage();
             IMG_BACK_BAR.setButtonFrontImage();
             displaySeekbarThumb(!mData_SdbLiv.ControlType);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setScreenColorCtrl(boolean bColorCtrl)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 45 - 45
WallPadHomeCtrl/src/main/AndroidManifest.xml

@@ -1,45 +1,45 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="kr.co.icontrols.wallpadhomectrl"
-    android:versionCode="17"
-    android:versionName="2021.05.28.01">
-
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
-	<uses-permission android:name="android.permission.WRITE_SETTINGS"/> 
-	<uses-permission android:name="android.permission.WAKE_LOCK" />
-	<uses-permission android:name="android.permission.INTERNET"/>
-    
-    <application
-        android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        
-        <activity
-            android:name="kr.co.icontrols.wallpadhomectrl.MainActivity"
-            android:launchMode="singleTop"
-            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-            android:label="@string/app_name"
-         
-            >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        
-        <activity 
-            android:name="kr.co.icontrols.wallpadhomectrl.PopupActivity"
-            android:theme="@style/Theme.PopupActivity"
-            android:configChanges="orientation|keyboard"
-        />
-
-        <activity
-            android:name="kr.co.icontrols.wallpadhomectrl.ManualActivity"
-            android:configChanges="orientation|keyboard"
-            android:theme="@style/Theme.PopupActivity" />
-
-    </application>
-
-</manifest>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="kr.co.icontrols.wallpadhomectrl"
+    android:versionCode="17"
+    android:versionName="2021.05.29.01">
+
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
+	<uses-permission android:name="android.permission.WRITE_SETTINGS"/> 
+	<uses-permission android:name="android.permission.WAKE_LOCK" />
+	<uses-permission android:name="android.permission.INTERNET"/>
+    
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        
+        <activity
+            android:name="kr.co.icontrols.wallpadhomectrl.MainActivity"
+            android:launchMode="singleTop"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+            android:label="@string/app_name"
+         
+            >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        
+        <activity 
+            android:name="kr.co.icontrols.wallpadhomectrl.PopupActivity"
+            android:theme="@style/Theme.PopupActivity"
+            android:configChanges="orientation|keyboard"
+        />
+
+        <activity
+            android:name="kr.co.icontrols.wallpadhomectrl.ManualActivity"
+            android:configChanges="orientation|keyboard"
+            android:theme="@style/Theme.PopupActivity" />
+
+    </application>
+
+</manifest>

+ 3172 - 3125
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/MainActivity.java

@@ -1,3125 +1,3172 @@
-package kr.co.icontrols.wallpadhomectrl;
-
-import android.annotation.SuppressLint;
-import android.app.ActivityManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.os.CountDownTimer;
-import android.os.Handler;
-import android.os.Message;
-import android.os.PowerManager;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.View.OnTouchListener;
-import android.view.animation.AccelerateInterpolator;
-import android.view.animation.Animation;
-import android.view.animation.Animation.AnimationListener;
-import android.view.animation.TranslateAnimation;
-import android.widget.Button;
-import android.widget.ExpandableListView;
-import android.widget.ExpandableListView.OnGroupClickListener;
-import android.widget.ExpandableListView.OnGroupCollapseListener;
-import android.widget.ExpandableListView.OnGroupExpandListener;
-import android.widget.RelativeLayout;
-
-import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.WallPadDataMgr.WallpadStatusData;
-import com.artncore.WallPadDataMgr.wallpaddbmgr;
-import com.artncore.commons.API_Menu;
-import com.artncore.commons.API_Menu.MenuListDataClass;
-import com.artncore.commons.API_Menu.MenuListDataClass.ChildIDMapping;
-import com.artncore.commons.DataClasses;
-import com.artncore.commons.define;
-import com.artncore.wallpadapi.KnxVentiAPI;
-import com.artncore.wallpadapi.LedDimmingKCC_API;
-import com.artncore.wallpadapi.MultiSwitchAPI;
-import com.artncore.wallpadapi.VentiAPI;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.util.LogUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import kr.co.icontrols.v40ioctl.V40IF;
-import kr.co.icontrols.wallpadhomectrl.declare.Common;
-import kr.co.icontrols.wallpadhomectrl.declare.ID;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_aircon.SystemAirconMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_airquality.AirQualityMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_airquality.DustInfoScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentHdcNEachMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentKnxMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_curtain.CurTainV1MainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_doorlock.DoorLockMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_elecrange.ElectricRangeMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.CookTopConcentMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.GasMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.HybridCookTopMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_heating.HeatingV1MainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_heating.HeatingV2MainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightEtcEachMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightEtcLivMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivConifgScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivKnxMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcNEachMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightKnxMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentiEasymodeScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_purity.PurityMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_knx_venti.KnxVentiEasymodeScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_knx_venti.KnxVentiMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentiMainScreen;
-import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentilationMainScreen;
-import kr.co.icontrols.wallpadsupport.Version;
-import kr.co.icontrols.wallpadsupport.WpadActivity;
-import kr.co.icontrols.wallpadsupport.WpadImageView;
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-import kr.co.icontrols.wallpadsupport.WpadScale;
-import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-import kr.co.icontrols.wallpadsupport.WpadTextView;
-import kr.co.icontrols.wallpadsupport.WpadUtil;
-
-import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_FINGERPRINT;
-import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_NORMAL;
-import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_RF;
-
-
-/**
- * @description 월패드 [설정기능] 메인화면 이다.<br>
- * 상단의 Top 메뉴, [홈] [돌아가기]<br>
- * 좌측의 Tab 메뉴, [환경설정] [화면청소] [비밀번호변경] ... 등 선택 메뉴<br>
- * 를 여기서 처리한다.
- */
-public class MainActivity extends WpadActivity {
-	private final static String TAG = "MainActivity";
-
-	private final boolean DEBUG_LOG_ON = true;
-
-	private void DebugLogOutput(String s)
-	{
-		if (DEBUG_LOG_ON) Log.d(TAG, s);
-	}
-
-	// =================================================================================================
-	// [[ Declaration ]] region
-	// =================================================================================================
-	protected Context mContext = null;
-
-	public Context getContext()
-	{
-		return mContext;
-	}
-
-	private WallPadAPI wpapi = null;
-	private int OPERATION_MODE = Common.MODE;
-	private WallpadStatusData wdb = null;
-
-	// Layout
-	private RelativeLayout AllLayout;               // 화면 전체
-	private RelativeLayout TopLayout;               // 상단 메뉴
-	private RelativeLayout ScreenLayout;            // 메인 화면
-	private RelativeLayout MenuLayout;              // 메뉴 화면
-
-	// Top Menu
-	private WpadImageView TopBackground;
-	private WpadTextView TopTitle;
-	private WpadImageView TopHomeBtn, TopBackBtn, TopMenuBtn, TopBoilerBtn;
-	private WpadImageView TopAirBackBtn, BTN_TOP_BACK_VENTIL;
-	private WpadImageView TopDimmingBtn[];
-	public static WpadImageView TopManualBtn;
-	private WpadImageView Hide1Btn, Hide2Btn;
-
-	// Main
-	private WpadImageView ScreenBackground;
-
-	// Menu
-	private WpadImageView MenuBackground;
-	private WpadImageView MenuClose;
-	private WpadTextView MenuTitle;
-	private static ExpandableListView mListView;
-	private Menu_AdptMain adptMain;
-	private MenuListDataClass menueListDataClass;
-	private Menu mMenu = null; //WPadAPI의 Menu class
-	private boolean MenuOpen = false;
-
-	// HideMenu
-	private int mHideMenuEntryStatus = 0;
-	private static boolean mHideMenuOn = false;
-	public static boolean getHideMenuOn() { return mHideMenuOn; }
-	private CountDownTimer mHideMenuTimer = null;
-
-	// PopupActivityRun
-	private static boolean PopupActivityRun = false;
-
-	public static boolean getPopupActivityRun()
-	{
-		return PopupActivityRun;
-	}
-
-	public static void setPopupActivityRun(boolean run)
-	{
-		PopupActivityRun = run;
-	}
-
-	// CurrentScreenId
-	private int mCurrentScreenId = -1;
-	private int mTempCurrentScreenId = -1;
-	public static int mCurrentManualScreenId = -1;
-
-	// Screen
-	private LightHdcLivMainScreen lightHdcLivMainScreen = null;
-    private LightHdcLivKnxMainScreen lightHdcLivKnxMainScreen = null;
-    private LightKnxMainScreen lightKnxMainScreen = null;
-	private KnxVentiMainScreen KnxVentiMainScreen = null;
-	private VentiMainScreen ventiMainScreen = null;
-	private VentilationMainScreen ventilationMainScreen = null;
-	private KnxVentiMainScreen knxVentiMainScreen = null;
-	private KnxVentiEasymodeScreen knxVentiEasymodeScreen= null;
-	private VentiEasymodeScreen ventiEasymodeScreen= null;
-	private GasMainScreen gasMainScreen = null;
-	private DoorLockMainScreen doorLockMainScreen = null;
-	private HeatingV2MainScreen heatingV2MainScreen = null;
-	private HeatingV1MainScreen heatingV1MainScreen = null;
-	private LightHdcLivConifgScreen lightHdcLivConifgScreen = null;
-	private LightEtcEachMainScreen lightEtcEachMainScreen = null;
-	private LightEtcLivMainScreen lightEtcLivMainScreen = null;
-	private LightHdcNEachMainScreen lightHdcNEachMainScreen = null;
-	private AirQualityMainScreen airQualityMainScreen = null;
-	private DustInfoScreen dustInfoScreen = null;
-	private ConcentMainScreen concentMainScreen = null;
-	private ConcentKnxMainScreen concentKnxMainScreen = null;
-
-	private HybridCookTopMainScreen hybridCookTopMainScreen = null;
-	
-	private ConcentHdcNEachMainScreen concentHdcNEachMainScreen = null;
-	private ElectricRangeMainScreen electricRangeMainScreen = null;
-	private CookTopConcentMainScreen cookTopConcentMainScreen = null;
-	private SystemAirconMainScreen systemAirconMainScreen = null;
-    private PurityMainScreen purityMainScreen = null;
-
-	private CurTainV1MainScreen curTainV1MainScreen = null;
-
-	//API
-	public WallpadStatusData GetDBObj() {
-		return wdb;
-	}
-
-	// 명칭 관련
-	public static final int HEATING = 1;
-	public static final int LIGHT = 2;
-
-	private String[] mRoomNameList_Light = null; //조명 방 명칭
-	private String[] mRoomNameList_Heating = null; //난방 방 명칭
-	private String[] mDefaultRoomNameList = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
-	private String[] mDefaultRoomNameList_Light = new String[]{"거실", "주방", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
-	private String[] mDefaultRoomNameList_Light_SK = new String[]{"거실", "주방", "안방", "침실1", "침실2", "침실3", "침실4", "침실5", "침실6", "침실7", "침실8"};
-	private String[] mDefaultRoomNameList_Heating = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
-	private String[] mDefaultRoomNameList_Heating_SK = new String[]{"거실", "안방", "침실1", "침실2", "침실3", "침실4", "침실5", "침실6", "침실7", "침실8"};
-	private String[] mDefaultRoomNameList_Heating_easymode = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
-
-	private int[][] KCC_DimmBtnOffArray =
-			{
-					{R.drawable.btn_top_dimm_normal_off, R.drawable.btn_top_dimm_normal_pressed},
-					{R.drawable.btn_top_dimm_study_off, R.drawable.btn_top_dimm_study_pressed},
-					{R.drawable.btn_top_dimm_sensi_off, R.drawable.btn_top_dimm_sensi_pressed},
-					{R.drawable.btn_top_dimm_rest_off, R.drawable.btn_top_dimm_rest_pressed}
-			};
-	private int[][] KCC_DimmBtnOnArray =
-			{
-					{R.drawable.btn_top_dimm_normal_selected, R.drawable.btn_top_dimm_normal_pressed},
-					{R.drawable.btn_top_dimm_study_selected, R.drawable.btn_top_dimm_study_pressed},
-					{R.drawable.btn_top_dimm_sensi_selected, R.drawable.btn_top_dimm_sensi_pressed},
-					{R.drawable.btn_top_dimm_rest_selected, R.drawable.btn_top_dimm_rest_pressed},
-			};
-	private LedDimmingKCC_API ledDimmingAPI = null;
-	private class DimData {
-		LedDimmingKCC_API.Data DimData;
-		public DimData()
-		{
-			DimData = null;
-		}
-	}
-	private DimData mDimData = null;
-	private byte [] mLevelArray = { 100, 70, 50, 20 };
-
-	private boolean bMultiConcentExist = false;
-	boolean bKitchenLightonLivingEM = false;   // 거실EM에 주방등 연결 여부
-
-	public static PowerManager mPowerManager;
-	public static V40IF mV40IF;
-
-
-	//Value
-	public int KccDimUse = 0;
-//	int SmartDistUse = -1;
-//	boolean KnxDistUse = false;
-	public static int nDistributionPanelType = Version.DISTRIBUTION_MODEL.OTHER;
-
-	private VentiAPI mVentilAPI = null;
-	private KnxVentiAPI mKnxVentilAPI = null;
-	DataClasses.Venti VentilStatus;
-
-	// =================================================================================================
-	// [[ Activity Life Cycle ]] region
-	// =================================================================================================
-
-	/**
-	 * Activity Constructors
-	 */
-	@Override
-    protected void onCreate(Bundle savedInstanceState) {
-		Log.i(TAG, "[onCreate] -------------------------------------------------------------");
-		Log.i(TAG, "[onCreate] ------------------ [START - MainActivity] -------------------");
-		Log.i(TAG, "[onCreate] -------------------------------------------------------------");
-
-		super.onCreate(savedInstanceState);
-
-		// @ AutoScale 설정
-		WpadScale.setAutoScale(true);
-
-		if (Common.CHECK_DEV_SERVICE) StartDevService();
-
-		super.AppVersionLogOut();   // [APP Version] + [WallPadSupport Lib Version] 을 로그로 출력한다.
-		Log.i("[onCreate] Version", "<><><><>  WallPadAPI     Version = [" + define.WALLPADAPI_VERSION + "] " + "<><><><>");
-
-		// 1. 변수 초기화
-		DebugLogOutput("[Create] - Step1 : Data Create");
-		PopupActivityRun = false;
-		ManualActivityRun = false;
-		mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
-		mV40IF = new V40IF();
-		mContext = this;
-		mDimData = new DimData();
-
-		mHideMenuOn = false;
-
-		// 2. 자동 종료 셋팅
-		DebugLogOutput("[Create] - Step2 : Auto Finish Setting");
-		//     2-1. 자동종료 타이머 셋팅
-		if (Common.FINISH_TIME_ENABLE) super.setFinishTimerCreate(Common.FINISH_TIME_SEC);
-		Common.ctrlLCDOnOff(true);
-
-		// 3. API 호출
-		DebugLogOutput("[Create] - Step3 : API Call");
-		if (Common.GetDeviceSampleMode(this)) OPERATION_MODE = Common.MODE_BUSINESS_SAMPLE;
-		else OPERATION_MODE = Common.MODE_NOMAL;
-
-		//     3.1. wpapi 생성
-        if (OPERATION_MODE == Common.MODE_NOMAL) {
-			Log.d(TAG, "[onCreate] OperationMode = MODE_NOMAL");
-            try {
-				wpapi = new WallPadAPI(this);
-            } catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
-			}
-		}
-		else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-			Log.d(TAG, "[onCreate] OperationMode = MODE_BUSINESS_SAMPLE");
-            try {
-				wpapi = new WallPadAPI(this);
-            } catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
-			}
-		}
-
-        try {
-			wdb = new WallpadStatusData(this);
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e);
-		}
-
-		getConstructionFunction();
-		GetRoomName();
-		//mMultiConentCheckHandler.sendEmptyMessage(0); // 멀티스위치 콘센트 유무 확인
-
-		// 4. Layout registration
-		DebugLogOutput("[Create] - Step4 : Layout registration");
-
-		//     4-1. mainLayout
-		AllLayout = new RelativeLayout(this);
-		RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WpadScale.getWidthPixels(), WpadScale.getHeightPixels());
-		AllLayout.setLayoutParams(params);
-		AllLayout.setId(ID.main.layout.ALL);
-		super.setAllLayoutRegistration(AllLayout);
-
-		//     4-2. TopLayout
-		TopLayout = new RelativeLayout(this);
-		WpadUtil.LayoutRegistration(AllLayout, TopLayout, 1280, 110, 0, 0, ID.main.layout.TOP);
-
-		//     4-4. ScreenLayout
-		ScreenLayout = new RelativeLayout(this);
-		WpadUtil.LayoutRegistration(AllLayout, ScreenLayout, 1280, 690, 0, 110, ID.main.layout.SCREEN);
-
-		ScreenBackground = new WpadImageView(this, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, R.drawable.bg_body, ID.main.image.SCREEN_BACKGROUND);
-		ViewRegistration(ScreenLayout, ScreenBackground, 0, 0);
-
-		// 5. Top Menu - ImageView registration
-		DebugLogOutput("[Create] - Step5 : Top Menu - ImageView registration");
-		TopBackground = new WpadImageView(this, TOUCH_KIND.NONE, 1280, 110, R.drawable.bg_topbar, R.drawable.bg_topbar, ID.main.image.TOP_BACKGROUND);
-		ViewRegistration(TopLayout, TopBackground, 0, 0);
-
-
-		TopTitle = new WpadTextView(this, false, 247 + 600, 80, Gravity.LEFT, Color.WHITE, Common.fontsize._44, true, ID.main.text.TITLE);
-
-		ViewRegistration(TopLayout, TopTitle, 133, 15);
-
-		TopHomeBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_home_normal, R.drawable.topbar_icon_home_pressed, ID.main.button.HOME);
-		ViewRegistration(TopLayout, TopHomeBtn, 1145, 0);
-
-		TopMenuBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_menu_normal, R.drawable.topbar_icon_menu_pressed, ID.main.button.MENU);
-		ViewRegistration(TopLayout, TopMenuBtn, 0, 0);
-
-		TopManualBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_manual_normal, R.drawable.topbar_icon_manual_pressed, ID.main.button.MANUAL);
-		setManualBtnVisible(getManualUse(), 1019);
-
-		TopBackBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.BACK);
-		ViewRegistration(TopLayout, TopBackBtn, 1019, 0);
-		setTopBackBtnVisible(false);
-
-		TopBoilerBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.top_but_boiler_normal, R.drawable.top_but_boiler_pressed, ID.main.button.BOILER);
-		ViewRegistration(TopLayout, TopBoilerBtn, 1019, 0);
-		setTopBoilerBtnVisible(false);
-
-		TopAirBackBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.AIRQBACK);
-		ViewRegistration(TopLayout, TopAirBackBtn, 1019, 0);
-		setAIRBackBtnVisible(false);
-
-		BTN_TOP_BACK_VENTIL = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.VENTILBACK);
-		ViewRegistration(TopLayout, BTN_TOP_BACK_VENTIL, 1019, 0);
-		setVentilBackBtnVisible(false);
-
-		Hide1Btn = new WpadImageView(this, TOUCH_KIND.BUTTON_M, 100, 110, 0, 0, ID.main.button.HIDE1);
-		ViewRegistration(TopLayout, Hide1Btn, 530, 0);
-		Hide2Btn = new WpadImageView(this, TOUCH_KIND.BUTTON_M, 100, 110, 0, 0, ID.main.button.HIDE2);
-		ViewRegistration(TopLayout, Hide2Btn, 650, 0);
-
-		TopDimmingBtn = new WpadImageView[4];
-        for (int i = 0; i < TopDimmingBtn.length; i++) {
-			TopDimmingBtn[i] = new WpadImageView(this, TOUCH_KIND.BUTTON, 76, 76, KCC_DimmBtnOffArray[i], KCC_DimmBtnOnArray[i], ID.main.button.DIMM_NORMAL + i);
-			ViewRegistration(TopLayout, TopDimmingBtn[i], 445 + (i*100), 17);
-		}
-		setKccDimmBtnVisible(false);
-
-		WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
-		bKitchenLightonLivingEM = wpdds.Get_LivingEm_KitchenLight_Use();
-		wpdds.closeDB();
-
-		// 6. Menu Loading
-		//     6-1. 메뉴 정보를 가져온다 (DB에서 가져온다)
-		DebugLogOutput("[Create] - Step6 : Side Menu - Insert Menu List");
-		wallpaddbmgr WallpadDBMGR = new wallpaddbmgr(getApplicationContext());
-		menueListDataClass = WallpadDBMGR.GetMenuList();
-		WallpadDBMGR.closeDB();
-
-		//WallPadMain에서 MenuList를 넣어주지 않아 아래 테스트 코드를 넣음
-		menueListDataClass = null;
-
-        if (menueListDataClass == null) {
-			Log.e(TAG, "[onCreate] menueListDataClass == null, Load Default List");
-			menueListDataClass = loadDefaultMenuList();
-		}
-		else {
-			for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
-				Log.d(TAG, "[onCreate] i [" + i + "], ID [" + menueListDataClass.idMappingTable[i].Id + ", NAME [" + menueListDataClass.idMappingTable[i].Name + "]");
-			}
-		}
-
-		//     6-2. 시작 화면을 main APP으로 부터 받아서 처리한다.
-		VentilStatus = new DataClasses.Venti();
-
-		mMenu = new Menu();
-		mMenu = super.getIntentParsingMenu(getIntent());
-        if (mMenu == null) {
-			Log.i(TAG, "[onCreate] mMenu = null");
-			if (OPERATION_MODE == Common.MODE_NOMAL) {
-				mTempCurrentScreenId = API_Menu.SubMenuCtrl.HDC_LivingLamp;
-				setTitleName(mTempCurrentScreenId);
-				mWallPadApiCheckHandler.sendEmptyMessage(0);
-			}
-			else {
-				setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
-			}
-		}
-		else {
-			Log.i(TAG, "[onCreate] mMenu != null");
-			if (OPERATION_MODE == Common.MODE_NOMAL) {
-				mTempCurrentScreenId = mMenu.getStartId();
-				setTitleName(mTempCurrentScreenId);
-				mWallPadApiCheckHandler.sendEmptyMessage(0);
-			}
-			else {
-				mTempCurrentScreenId = mMenu.getStartId();
-				setTitleName(mTempCurrentScreenId);
-				mWallPadApiCheckHandler.sendEmptyMessage(0);
-
-				/*boolean result = setChangeScreen(mMenu.getStartId(), false);
-				Log.i(TAG, "Menu Sample result = " + result);
-
-				if (result == false)
-				{
-					setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
-				}*/
-			}
-		}
-
-		// 7. Draw
-		DebugLogOutput("[Create] - Step7 : setContentView");
-		setContentView(AllLayout);
-
-		// 8. Window ReSize
-		DebugLogOutput("[Create] - Step8 : Window ReSize");
-		//super.WindowReSize(Common.SCREEN_SIZE_MAIN_W, Common.SCREEN_SIZE_MAIN_H, false);
-
-		// 9. BR Receiver 등록(메뉴에서 다른 화면이 눌린 경우 BR처리)
-		reg_Receiver();
-
-		WallpadDeviceSet wds = new WallpadDeviceSet(getContext());
-		int gateway = wds.GetGatewayModelKindInfo();
-		nDistributionPanelType = wds.Get_DistributionPannelType_Info();
-		wds.closeDB();
-
-		if (gateway == Version.GATEWAY_MODEL.IGW_200) {
-			Log.i(TAG, "[onCreate] IGW_200 SET @@@@@@@@@@@@@@@@@@@@");
-		}
-		else if (gateway == Version.GATEWAY_MODEL.IGW_300) {
-			Log.i(TAG, "[onCreate] IGW_300 SET @@@@@@@@@@@@@@@@@@@@");
-		}
-		else {
-			Log.i(TAG, "[onCreate] GATEWAY OTHER @@@@@@@@@@@@@@@@@@@@");
-		}
-
-		/*if( (SmartDistUse == 1) && (KnxDistUse == false) ) // 스마트분전반 O / KNX 분전반 X
-		{
-			SdbAPI sdbAPI = Get_SdbController();
-			if(sdbAPI == null) return -1;
-			ret = sdbAPI.Refresh(SdbAPI.DEVICE_INDEX.ENERGY_CONT, define.DEVICE_ALL_OR_NOTHING);
-			if(ret < 0) return -2;
-
-			if(sdbAPI.data.EnergyController.Data.BatchOffStatus == Sdb_DataClasses.BATCHOFF_STATUS.SET) return 0;
-			else return 1;
-		}
-		else if( (SmartDistUse == 0) && (KnxDistUse == true) ) // 스마트분전반 X / KNX 분전반 O
-		{
-			KnxAPI knxAPI = Get_KnxController();
-			if(knxAPI == null) return -1;
-			ret = knxAPI.Refresh(KnxAPI.DEVICE_INDEX.MASTER_CONT, define.DEVICE_ALL_OR_NOTHING);
-			if(ret < 0) return -2;
-
-			if(knxAPI.data.MasterController.Data.BatchOffStatus == KNX_DataClasses.BATCHOFF_STATUS.SET) return 0;
-			else return 1;
-		}
-		else // 그밖의 경우, 스마트분전반을 기본으로 로딩.
-		{
-			SdbAPI sdbAPI = Get_SdbController();
-			if(sdbAPI == null) return -1;
-			ret = sdbAPI.Refresh(SdbAPI.DEVICE_INDEX.ENERGY_CONT, define.DEVICE_ALL_OR_NOTHING);
-			if(ret < 0) return -2;
-
-			if(sdbAPI.data.EnergyController.Data.BatchOffStatus == Sdb_DataClasses.BATCHOFF_STATUS.SET) return 0;
-			else return 1;
-		}*/
-
-		Log.i(TAG, "[onCreate] End onCreate -------------------------------------------------");
-	}
-
-	/**
-	 * (임시코드) WallPadAPI 초기생성시 Connect 에 시간이 걸리며, <br>
-	 * WallPadAPI 초기화후 바로 Get_GasValveController 등을 사용하여  API 를 가져올수 없기에, <br>
-	 * 본 딜레이 코드를 임시로 적용한다.
-	 */
-	@SuppressLint("HandlerLeak")
-	protected Handler mWallPadApiCheckHandler = new Handler() {
-		@SuppressLint("HandlerLeak")
-		@Override
-		public void handleMessage(Message msg) {
-			try {
-				if (msg.what == 0) {
-					if (wpapi != null) {
-						//Log.d(TAG, "Handler go");
-						if (wpapi.Check_Connect()) {
-							if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-								mKnxVentilAPI = wpapi.Get_KnxVentiController();
-								// KNX 환기
-								if (mKnxVentilAPI != null) {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mKnxVentilAPI is not null!!");
-									updateKnxVentilatorData(false);
-								}
-								else {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mKnxVentilAPI is null!!");
-									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-								}
-
-								mVentilAPI = wpapi.Get_VentiController();
-								if (mVentilAPI != null) {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is not null!!");
-									updateVentilatorData(false);
-								}
-								else {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is null!!");
-									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-								}
-							}
-							else {
-								// 일반 환기
-								mVentilAPI = wpapi.Get_VentiController();
-								if (mVentilAPI != null) {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is not null!!");
-									updateVentilatorData(false);
-								}
-								else {
-									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is null!!");
-									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-								}
-							}
-
-							// KCC 디밍제어기 사용여부 확인
-							WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
-							int nKCCDimmingUsage = wdst.GetDeviceSetted("KCC디밍제어기"); // 1: 사용안함 / 2: 사용함
-							int[] nLightType = wdst.Get_Light_info();
-							wdst.closeDB();
-
-							if (nKCCDimmingUsage == WallpadDeviceSet.DEV_DATA_ENABLE) {
-								ledDimmingAPI = wpapi.Get_KCCDimmingController();
-								if (ledDimmingAPI != null) {
-									ledDimmingAPI.regChangedBR(ID.main.BR_KCC_DIM);
-									if (ledDimmingAPI.Refresh((byte)0, false) >= 0) {
-										mDimData.DimData = ledDimmingAPI.data;
-									}
-									Draw_Update_DimmBtn();
-								}
-								else {
-									Log.w(TAG, "[mWallPadApiCheckHandler] ledDimmingAPI is null!!");
-									//mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-								}
-							}
-
-							if (nLightType[0] == WallpadDeviceSet.DO_USE) {
-								if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
-									// 조명 : 멀티스위치인 경우
-									try {
-										MultiSwitchAPI mMultiSwitchAPI = wpapi.Get_MultiSwitchController();
-										if (mMultiSwitchAPI.Refresh((byte) 0xFF, false) >= 0) {
-											Log.i(TAG, "[mWallPadApiCheckHandler] Multi Refresh ----> true @@@@@@@@@@@@@");
-											if (mMultiSwitchAPI.isExist_ConcentDevice()) {
-												Log.i(TAG, "[mWallPadApiCheckHandler] Multi concent ----> true @@@@@@@@@@@@@");
-												bMultiConcentExist = true; // 콘센트 있는지 확인
-											}
-										}
-									} catch (RuntimeException re) {
-										LogUtil.errorLogInfo("", TAG, re);
-									}
-									catch (Exception e) {
-										Log.e(TAG, e.toString());
-									}
-								}
-							}
-							mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
-						}
-						else {
-							mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-						}
-					}
-					else {
-						Log.w(TAG, "[mWallPadApiCheckHandler] wpapi is null!!");
-					}
-				}
-				else if (msg.what == 1) {
-					Log.d(TAG, "Handler finish");
-					menueListDataClass = loadDefaultMenuList(); // 다시 메뉴를 만들어 질까? ??????
-
-					boolean result = setChangeScreen(mTempCurrentScreenId, false);
-					if (result == false) {
-						setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
-					}
-				}
-			} catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[Exception] mWallPadApiCheckHandler.handleMessage(Message msg)");
-				//e.printStackTrace();
-            	LogUtil.errorLogInfo("", TAG, e);
-			}
-		}
-	};
-
-	boolean multiConcentFindRoutine = false;
-	@SuppressLint("HandlerLeak")
-	protected Handler mMultiConentCheckHandler = new Handler()
-	{
-		@SuppressLint("HandlerLeak")
-		@Override
-        public void handleMessage(Message msg) {
-            if (msg.what == 0) {
-                if (wpapi != null) {
-					//Log.d(TAG, "Handler go");
-                    if (wpapi.Check_Connect()) {
-						WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
-						int[] lightType = wdst.Get_Light_info();
-						wdst.closeDB();
-
-                        if (lightType[0] == WallpadDeviceSet.DO_USE) {
-							if (lightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
-								// 조명 : 멀티스위치인 경우,
-                                try {
-									MultiSwitchAPI MSAPI = wpapi.Get_MultiSwitchController();
-                                    if (MSAPI.Refresh((byte) 0xFF, false) >= 0) {
-										Log.i(TAG, "Multi Refresh ----> true @@@@@@@@@@@@@");
-                                        if (MSAPI.isExist_ConcentDevice()) {
-											Log.i(TAG, "Multi concent ----> true @@@@@@@@@@@@@");
-											bMultiConcentExist = true; // 콘센트 있는지 확인
-										}
-									}
-								} catch (RuntimeException re) {
-									LogUtil.errorLogInfo("", TAG, re);
-								}
-								catch (Exception e) {
-									Log.e(TAG, e.toString());
-								}
-                            }
-							else {
-								mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
-							}
-						}
-						mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
-                    }
-                    else {
-						mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
-					}
-				}
-			}
-			else if (msg.what == 1) {
-				Log.d(TAG, "Handler finish");
-				multiConcentFindRoutine = true;
-				menueListDataClass = loadDefaultMenuList(); // 다시 메뉴를 만들어 질까? ??????
-			}
-		}
-	};
-
-
-	/* ================================================================================================
-* [Manual Activity] Section
-================================================================================================ */
-	public static ManualActivity mManualActivity;
-
-	public void setManualBtnVisible(boolean bEnable, int marginLeft) {
-		try {
-			Log.d(TAG, "[setManualBtnVisible] bEnable [" + bEnable + "], marginLeft [" + marginLeft + "]");
-			if (bEnable) {
-				TopManualBtn.setVisibility(View.VISIBLE);
-				ViewRegistration(TopLayout, TopManualBtn, marginLeft, 0);
-			}
-			else {
-				TopManualBtn.setVisibility(View.INVISIBLE);
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setManualBtnVisible(boolean bEnable, int marginLeft)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * 매뉴얼 버튼 사용 유무
-	 * @return boolean 타입 - true: 사용, false: 미사용
-	 */
-	public boolean getManualUse() {
-		try {
-			WallpadDeviceSet devSet = new WallpadDeviceSet(mContext);
-			String[] DBinfo = devSet.GetSettingData("매뉴얼");
-			devSet.closeDB();
-
-			if (DBinfo != null) {
-				if (DBinfo[1].indexOf("사용함") > 0) {
-					Log.d(TAG, "[getManualUse] Use Manual");
-					return true;
-				}
-				else {
-					// 미사용
-					Log.d(TAG, "[getManualUse] Not Use Manual [1]");
-					return false;
-				}
-			}
-			else {
-				// 미사용
-				Log.d(TAG, "[getManualUse] Not Use Manual [2]");
-				return false;
-			}
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] getManualUse()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return false;
-	}
-
-	// ManualActivityRun
-	private static boolean ManualActivityRun = false;
-
-	public static boolean getManualActivityRun() {
-		Log.d(TAG, "[getManualActivityRun] ManualActivityRun: " + ManualActivityRun);
-		return ManualActivityRun;
-	}
-
-    public static void setManualActivityRun(boolean run) {
-		ManualActivityRun = run;
-		if (!ManualActivityRun) resetCurrentManualScreenID();
-	}
-
-    public boolean StartManual(int screenId) {
-		try {
-			Log.d(TAG, "[StartManual] ScreenId [" + screenId + "], mCurrentManualScreenId [" + mCurrentManualScreenId + "]");
-			if (getManualActivityRun()) {
-				mCurrentManualScreenId = screenId;
-				return ((WpadActivity) (ManualActivity.getContext())).ChangeScreen(screenId);
-			}
-			else {
-				if (mCurrentManualScreenId == screenId) return false;
-				mCurrentManualScreenId = screenId;
-				setManualActivityRun(true);
-				Intent intent = new Intent(mContext, ManualActivity.class);
-				intent.putExtra("ScreenId", screenId);
-
-				if (mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V2) {
-					intent.putExtra("HeatInfo", heatingV2MainScreen.Heating_Manual_Str);
-				}
-				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_EachLamp) {
-					intent.putExtra("EtcMultiInfo", "RoomCount:"+lightEtcEachMainScreen.TotalRoomCount + "/" + "KccDim:" + KccDimUse );
-				}
-				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Concent) {
-					intent.putExtra("ConcentInfo", "ConcentCount:"+concentMainScreen.mConDeviceCount );
-				}
-				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.ChangAir_Normal) {
-					if (GetEasyModeUXUse() == true) {
-						intent.putExtra("VentiInfo", ventiEasymodeScreen.VentiManual_Str);
-					}
-					else {
-						if (ventiMainScreen != null) intent.putExtra("VentiInfo", ventiMainScreen.VentiManual_Str);
-					}
-				}
-
-				overridePendingTransition(0, 0);
-				startActivityForResult(intent, 0);
-				return true;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] StartManual(int screenId)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public static void resetCurrentManualScreenID() {
-		try {
-			mCurrentManualScreenId = -1;
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] resetCurrentManualScreenID()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public static void FinishManualActivity() {
-		Log.i(TAG, "[FinishManualActivity]");
-		try {
-			if (mManualActivity != null) {
-				mCurrentManualScreenId = -1;
-				mManualActivity.finish();
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] FinishManualActivity()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * onDestroy
-	 */
-	@Override
-	protected void onDestroy() {
-		try {
-			setChangeScreen(mCurrentScreenId, true);
-
-			if (wdb != null) wdb.closeDB();
-
-			if (mWallPadApiCheckHandler != null) {
-				mWallPadApiCheckHandler.removeMessages(0);
-			}
-			this.unregisterReceiver(mWallPadAlertBR);
-			this.unregisterReceiver(mWallPadJogBR);
-			this.unregisterReceiver(mKccDimmBR);
-
-			if (ledDimmingAPI != null) {
-				ledDimmingAPI.unregChangedBR(ID.main.BR_KCC_DIM);
-				super.removeBrActionFilter(ID.main.BR_KCC_DIM);
-			}
-
-			if (getManualUse()) {
-				FinishManualActivity();
-			}
-
-			super.setFinishTimerDestroy();
-			super.onDestroy();
-
-			Log.i(TAG, "*************************************************************");
-			Log.i(TAG, "****************** [END   - MainActivity] *******************");
-			Log.i(TAG, "*************************************************************");
-
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] onDestroy()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * onResume
-	 */
-	@Override
-    protected void onResume() {
-		super.onResume();
-
-		if (wpapi != null) wpapi.Resume();
-		DebugLogOutput("@@@@@@@@ [onResume] @@@@@@@@");
-	}
-
-	/**
-	 * onPause
-	 */
-	@Override
-    protected void onPause() {
-		super.onPause();
-
-		if (wpapi != null) wpapi.Pause();
-		DebugLogOutput("@@@@@@@@ [onPause] @@@@@@@@");
-	}
-
-
-    /* ================================================================================================
-	 * [BroadcastReceiver] Section
-     ================================================================================================ */
-
-	/**
-	 * BroadcastReceiver.onReceive for [WpadActivity]
-	 */
-	@Override
-    protected void onBrReceive(Intent intent) {
-		super.onBrReceive(intent);
-
-		String strActionName = intent.getAction();
-		DebugLogOutput("[onBrReceive] strActionName [" + intent.getAction() + "]");
-
-        if (strActionName.equals(ID.main.BR_KCC_DIM)) {
-			DebugLogOutput("[onBrReceive] ID.main.BR_KCC_DIM");
-			Device_Update_Dimming(false, (byte)0);
-			Draw_Update_DimmBtn();
-		}
-	}
-
-
-    /* ================================================================================================
-     * [Touch & Key Event] Section
-     ================================================================================================ */
-
-	/**
-	 * TouchEvent for [WpadActivity]
-	 */
-	@Override
-    protected void onTouchEvent(View v, MotionEvent event) {
-		super.onTouchEvent(v, event);
-		try {
-			int TargetId = v.getId();
-			int MoveEvent = event.getAction();
-
-			//DebugLogOutput("onTouch - " + "id : " + v.getId() + " / Action : " + event.getAction());
-			if (MoveEvent == MotionEvent.ACTION_UP) {
-				if (TargetId == ID.main.button.HOME) {
-					DebugLogOutput("onTouchEvent [HOME] BUTTON !!!");
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-
-					Intent intent = new Intent();
-					intent.putExtra("Finish_Kind", "HomeButton");
-					setResult(RESULT_OK, intent);
-					finish();
-				}
-				else if (TargetId == ID.main.button.BACK) {
-					DebugLogOutput("onTouchEvent [BACK] BUTTON !!!");
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-
-					/**
-					 *[수정필요]Back Button 필요한 화면은 아래 부분 추가 후 사용 필요
-					 * **/
-                /*
-                if(mCurrentScreenId == API_Menu.SubMenuConfig.SmartKey)
-                {
-                    setChangeScreen(API_Menu.SubMenuConfig.Configuration, false);
-                }
-                */
-				}
-				else if (TargetId == ID.main.button.MENU) {
-					DebugLogOutput("onTouchEvent [MENU] BUTTON !!!");
-					Log.i(TAG, "MenuOpen = " + MenuOpen);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-					if (MenuOpen == true) {
-						return;
-					}
-
-					OpenMenuLayout();
-				}
-				else if (TargetId == ID.main.button.MENUCLOSE) {
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-					CloseMenuLayout();
-				}
-				else if (TargetId == ID.main.button.BOILER) {
-					DebugLogOutput("onTouchEvent [BOILER] BUTTON !!!");
-					if (StartPopup(ID.screen.HeatingV2PopupBoilerScreen)) {
-						Sound().Play(SND.effect.TOUCH_LATCHED);
-					}
-				}
-				else if (TargetId == ID.main.button.HIDE1 || TargetId == ID.main.button.HIDE2) {
-					HideMenuEntryProc(TargetId);
-				}
-				else if (TargetId == ID.main.button.AIRQBACK) {
-					DebugLogOutput("onTouchEvent [AIRQBACK] BUTTON !!!");
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-					setAIRBackBtnVisible(false);
-
-					setChangeScreen(API_Menu.SubMenuCtrl.Inner_AirQuality, false);
-				}
-				else if (TargetId == ID.main.button.VENTILBACK) {
-					DebugLogOutput("onTouchEvent [AIRQBACK] BUTTON !!!");
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-					setVentilBackBtnVisible(false);
-
-					setChangeScreen(API_Menu.SubMenuCtrl.ChangAir_Normal, false);
-				}
-				else if (TargetId >= ID.main.button.DIMM_NORMAL && TargetId <= ID.main.button.DIMM_REST) {
-					DebugLogOutput("onTouchEvent [DIMM_NORMAL] BUTTON !!!");
-
-					try {
-						// 디밍제어
-						int index = TargetId - ID.main.button.DIMM_NORMAL;
-						DebugLogOutput("onTouchEvent [DIM_LEV" + (index + 1) + "] BUTTON !!!");
-
-						if (mDimData.DimData.Device[0] == null) {
-							DebugLogOutput("null event");
-						}
-
-						if(mDimData.DimData.Device[0]!=null && mLevelArray!=null)
-						{
-							byte NowLevel = mDimData.DimData.Device[0].device.Level;
-							DebugLogOutput("NowLevel :" + NowLevel);
-							byte CtrlLevel = mLevelArray[index];
-							DebugLogOutput("CtrlLevel :" + CtrlLevel);
-
-							if (NowLevel == CtrlLevel) {
-								TopDimmingBtn[index].setButtonRearImage(); // 켜진 상태 그대로 유지
-							}
-							else if (NowLevel != CtrlLevel) {
-								int ret = Device_SetDimmingLevel(CtrlLevel);
-								if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-								else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-							}
-						}
-
-					} catch (RuntimeException re) {
-						Sound().Play(SND.effect.TOUCH_UNLATCHED);
-						LogUtil.errorLogInfo("", TAG, re);
-					}
-					catch (Exception ex) {
-						Sound().Play(SND.effect.TOUCH_UNLATCHED);
-						//ex.printStackTrace();
-						LogUtil.errorLogInfo("", TAG, ex);
-					}
-				}
-				else if (TargetId == ID.main.button.MANUAL) {
-					Log.i(TAG, "onTouchEvent [MANUAL] BUTTON [mCurrentScreenId = " + mCurrentScreenId + "]");
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-					if (mCurrentScreenId == API_Menu.SubMenuCtrl.HDC_LivingLamp) { StartManual(ID.MANUAL.MANUAL_HdcLivingLight); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.LivingLightConfig) { StartManual(ID.MANUAL.MANUAL_HdcLivingGroup); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_livingLamp) { StartManual(ID.MANUAL.MANUAL_EtcLivingLight); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp) {}
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_EachLamp) { StartManual(ID.MANUAL.MANUAL_EtcMultiLight); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V2 || mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V1) { StartManual(ID.MANUAL.MANUAL_Heating); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Gas) { StartManual(ID.MANUAL.MANUAL_Gas); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Cooktop_Concent) { StartManual(ID.MANUAL.MANUAL_CookTopConcent); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.DoorLockWL) { StartManual(ID.MANUAL.MANUAL_Doorlock); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.DoorLock485) { StartManual(ID.MANUAL.MANUAL_Doorlock); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Concent) { StartManual(ID.MANUAL.MANUAL_Concent); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.ChangAir_Normal) {
-						if (getAirSensorAPUsage() && VentilStatus.Support.InnerCycle && VentilStatus.Support.OutAirClean) {
-							if (nDistributionPanelType != Version.DISTRIBUTION_MODEL.KNX_DIST) StartManual(ID.MANUAL.MANUAL_Ventilation);
-						}
-						else {
-							if (GetEasyModeUXUse()) StartManual(ID.MANUAL.MANUAL_Easymode_Venti);
-							else {
-								if (VentilStatus.Support2.WindowVenti) StartManual(ID.MANUAL.MANUAL_Venti);
-								else StartManual(ID.MANUAL.MANUAL_Ventilation);
-							}
-						}
-					}
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Inner_AirQuality) { StartManual(ID.MANUAL.MANUAL_InAirQual); }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Inner_AirInfo) { /*StartManual(ID.MANUAL.MANUAL_AirInfo);*/ }
-					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Electric_Range) { StartManual(ID.MANUAL.MANUAL_ElecRange); }
-				}
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * H/W Key Event
-	 */
-	@Override
-	public boolean onKeyDown(int keyCode, KeyEvent event) {
-		Log.i(TAG, "[onKeyDown] keyCode : " + keyCode + ", Action : " + event.getAction());
-		return super.onKeyDown(keyCode, event);
-	}
-
-
-    /* ================================================================================================
-     * [TOP - Back] Section
-     ================================================================================================ */
-
-	/**
-	 * TOP 돌아가기 버튼 활성화 & 비활성화
-	 *
-	 * @param Enabled - true : 활성화,  false : 비활성화
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean setTopBackBtnVisible(boolean Enabled) {
-		try {
-			if (Enabled == true) {
-				if (TopBackBtn.getVisibility() != View.VISIBLE) TopBackBtn.setVisibility(View.VISIBLE);
-				TopBackBtn.bringToFront();
-			}
-			else {
-				if (TopBackBtn.getVisibility() != View.INVISIBLE) TopBackBtn.setVisibility(View.INVISIBLE);
-			}
-			return true;
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setTopBackBtnVisible(boolean Enabled)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-
-    /* ================================================================================================
-     * [Popup Activity] Section
-     ================================================================================================ */
-
-	/**
-	 * Popup Activity 를 시작시킨다.
-	 *
-	 * @param ScreenId - 팝업시작시 Screen ID
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean StartPopup(int ScreenId) {
-		if (getPopupActivityRun() == true) {
-			return ((WpadActivity) (PopupActivity.getContext())).ChangeScreen(ScreenId);
-		}
-		else {
-			setPopupActivityRun(true);
-			Intent intent = new Intent(mContext, PopupActivity.class);
-			intent.putExtra("ScreenId", ScreenId);
-
-			overridePendingTransition(0, 0);
-			startActivityForResult(intent, 0);
-			return true;
-		}
-	}
-
-	/**
-	 * Popup Activity 를 시작시킨다. (시작시 Intent Type 데이터를 전달한다)
-	 *
-	 * @param ScreenId - 팝업시작시 Screen ID
-	 * @param data     - 전달할 데이터
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean StartPopup(int ScreenId, Intent data) {
-		if (getPopupActivityRun() == true) { return false;
-		}
-		else {
-			setPopupActivityRun(true);
-			Intent intent = new Intent(mContext, PopupActivity.class);
-			intent.putExtra("ScreenId", ScreenId);
-
-			intent.putExtra("PopupScreenDataIntent", data);
-
-			overridePendingTransition(0, 0);
-			startActivityForResult(intent, 0);
-			return true;
-		}
-	}
-
-	/**
-	 * Activity Result Reception
-	 */
-	@Override
-	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-		super.onActivityResult(requestCode, resultCode, data);
-		try {
-			Log.d(TAG, "@@@@@@@@ [onActivityResult] @@@@@@@@");
-			if (resultCode == RESULT_OK) {
-				// PopupActivity 에서 FinishTimer 로 인하여 종료가 되었을 경우
-				// MainActivity 도 즉시 종료시킨다.
-				String code = (String) data.getExtras().get("Finish_Kind");
-				Log.d(TAG, "[onActivityResult] Finish_Kind : " + code);
-				if (code != null) {
-					if (code.equals("FinishTimer")) {
-						Log.d(TAG, "FinishTimer finish");
-						finish();
-					}
-				}
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] onActivityResult(int requestCode, int resultCode, Intent data)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-
-    /* ================================================================================================
-     * [Screen] Section
-     ================================================================================================ */
-
-	/**
-	 * Screen 에서 Screen 변경을 요청할 경우 호출된다.<br>
-	 * Override 사용하여 Screen 변경을  처리한다.<br>
-	 *
-	 * @param nScreenId - 변경할 Screen ID
-	 * @return (boolean) true : 성공, false : 실패
-	 */
-	@Override
-    protected boolean onChangeScreen(int nScreenId) {
-		super.onChangeScreen(nScreenId);
-		return setChangeScreen(nScreenId, false);
-	}
-
-	/**
-	 * @param nScreenId - 변경할 Screen ID
-	 * @return (boolean) true : 성공, false : 실패
-	 **/
-	private boolean setTitleName(int nScreenId) {
-		boolean ret = false;
-		try {
-			Log.d(TAG, "[setTitleName] nScreenId [" + nScreenId + "]");
-			switch (nScreenId) {
-				case API_Menu.SubMenuCtrl.HDC_LivingLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.HDC_EachLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.LivingLightConfig:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_LivingLightConfig);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.OutSide_livingLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.OutSide_EachLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Heating_V2:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Heating);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Gas:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.DoorLock485:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.DoorLockWL:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.ChangAir_Normal:
-				case API_Menu.SubMenuCtrl.ChangAir_LH:
-				case API_Menu.SubMenuCtrl.ChangAir_Hood:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Inner_AirQuality:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Inner_AirInfo:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Concent:
-				case API_Menu.SubMenuCtrl.HDCLivingNEach_Concent:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.SystemAircon:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_SystemAircon);
-					ret = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Purity:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Purity);
-					ret = true;
-					break;
-
-				default:
-					Log.e(TAG, "[Error] setTitleName - nScreenId Not found!!! (" + mCurrentScreenId + ")");
-					//mCurrentScreenId = -1;
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					ret = false;
-					break;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setTitleName(int nScreenId)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return ret;
-	}
-
-	/**
-	 * Screen 등록자<br>
-	 * ScreenLayout 에 현재 Screen 을 삭제하고, 새로운 Screen 을 등록시킨다.
-	 *
-	 * @param nScreenId  - 변경할 Screen ID
-	 * @param OnlyRemove - 현재 Screen 을 삭제만 할 경우 (onDestroy 에서 사용)
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-    private boolean setChangeScreen(int nScreenId, boolean OnlyRemove) {
-		DebugLogOutput("setChangeScreen - " + "CurrentSelectDeviceId : " + mCurrentScreenId + " / NextLayoutId : " + nScreenId + " / OnlyRemove : " + OnlyRemove);
-
-		// 1. 현재 Layout 삭제
-        if (mCurrentScreenId > 0) {
-			ScreenLayout.removeAllViews();
-			super.setCurrentScreen(null);
-		}
-
-		if (OnlyRemove) return true;
-
-		mCurrentScreenId = nScreenId;
-		setTopBackBtnVisible(false);
-
-		boolean result = false;
-
-	     //2. 새로운 Layout 표시
-        try {
-			setTitleName(nScreenId);
-
-            switch (nScreenId) {
-                /**
-                 * [수정필요]
-                 * Back Button 필요한 화면은 setTopBackBtnVisible(true) 호출 필요
-                 * 추가 또는 수정해야할 부분 1. - 스크린 별 layout 생성
-                 * **/
-
-                //추가 또는 수정해야할 부분 1. - 스크린 별 layout 생성
-                case API_Menu.SubMenuCtrl.HDC_LivingLamp: {
-                    if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
-                        //  스마트 분전반
-                        lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-                        super.setCurrentScreen(lightHdcLivMainScreen);
-                        setTopBoilerBtnVisible(false);
-                        setAIRBackBtnVisible(false);
-                        setKccDimmBtnVisible(false);
-						setVentilBackBtnVisible(false);
-                        result = true;
-                        break;
-                    }
-                    else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-                        // KNX 분전반
-						// madeinlab 새로 만든 스크린으로 적용한다.
-                        lightKnxMainScreen = new LightKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-                        super.setCurrentScreen(lightKnxMainScreen);
-                        setTopBoilerBtnVisible(false);
-                        setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(false);
-						setVentilBackBtnVisible(false);
-						setManualBtnVisible(false, 1019);
-						result = true;
-						break;
-					}
-				}
-
-				/*case API_Menu.SubMenuCtrl.HDC_EachLamp:
-				{
-					if( (SmartDistUse == 1) && (KnxDistUse == false) ) // 스마트분전반 O / KNX 분전반 X
-					{
-						lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-						super.setCurrentScreen(lightHdcLivMainScreen);
-						setTopBoilerBtnVisible(false);
-						setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(false);
-						result = true;
-						break;
-					}
-					else if( (SmartDistUse == 0) && (KnxDistUse == true) ) // 스마트분전반 X / KNX 분전반 O
-					{
-						lightHdcLivKnxMainScreen = new LightHdcLivKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-						super.setCurrentScreen(lightHdcLivKnxMainScreen);
-						setTopBoilerBtnVisible(false);
-						setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(false);
-						result = true;
-						break;
-					}
-				}*/
-
-				case API_Menu.SubMenuCtrl.LivingLightConfig:
-					lightHdcLivConifgScreen = new LightHdcLivConifgScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(lightHdcLivConifgScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-					//OutSide_EachLamp
-				case API_Menu.SubMenuCtrl.OutSide_EachLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					lightEtcEachMainScreen = new LightEtcEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-					super.setCurrentScreen(lightEtcEachMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(true);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.OutSide_livingLamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					lightEtcLivMainScreen = new LightEtcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(lightEtcLivMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(true);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-					lightHdcNEachMainScreen = new LightHdcNEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-					super.setCurrentScreen(lightHdcNEachMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(true);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-				case API_Menu.SubMenuCtrl.Heating_V1:
-				case API_Menu.SubMenuCtrl.Heating_V2:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Heating);
-					try {
-						if(wpapi.GetHeatingKind() == 1)
-						{
-							heatingV1MainScreen = new HeatingV1MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
-							super.setCurrentScreen(heatingV1MainScreen);
-							if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-								//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
-							}
-						}
-						else
-						{
-							heatingV2MainScreen = new HeatingV2MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
-							super.setCurrentScreen(heatingV2MainScreen);
-							if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-								//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
-							}
-						}
-					}
-					catch (Exception e)
-					{
-						heatingV2MainScreen = new HeatingV2MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
-						super.setCurrentScreen(heatingV2MainScreen);
-						if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-							//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
-						}
-					}
-
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Gas:
-//					try {
-//						if(wpapi.GetGasKind() == 1)
-//						{
-//							SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
-//							gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-//							super.setCurrentScreen(gasMainScreen);
-//						}
-//						else
-//						{
-//							SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
-//							hybridCookTopMainScreen = new HybridCookTopMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-//							super.setCurrentScreen(hybridCookTopMainScreen);
-//						}
-//					}
-//					catch (Exception e)
-//					{
-//						SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
-//						gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-//						super.setCurrentScreen(gasMainScreen);
-//					}
-
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
-					gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(gasMainScreen);
-
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.DoorLock485:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
-					doorLockMainScreen = new DoorLockMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.DoorLock485);
-					super.setCurrentScreen(doorLockMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.DoorLockWL:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
-					doorLockMainScreen = new DoorLockMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.DoorLockWL);
-					super.setCurrentScreen(doorLockMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.ChangAir_Normal:
-				case API_Menu.SubMenuCtrl.ChangAir_LH:
-				case API_Menu.SubMenuCtrl.ChangAir_Hood:
-					Log.e(TAG, "[setChangeScreen] getAirSensorAPUsage [" + getAirSensorAPUsage() + "], Support.InnerCycle [" + VentilStatus.Support.InnerCycle + "], Support.OutAirClean [" + VentilStatus.Support.OutAirClean + "]");
-					if (getAirSensorAPUsage() && VentilStatus.Support.InnerCycle && VentilStatus.Support.OutAirClean) {
-						if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-							//고급향은 환기가 3개임. KNX 쪽으로 우선 분기를 태움.
-							SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-							knxVentiMainScreen = new KnxVentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-							super.setCurrentScreen(knxVentiMainScreen);
-						}
-						else {
-							SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-							ventilationMainScreen = new VentilationMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-							super.setCurrentScreen(ventilationMainScreen);
-						}
-						setTopBoilerBtnVisible(false);
-						setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(false);
-						setVentilBackBtnVisible(false);
-						result = true;
-					}
-					else {
-						if (GetEasyModeUXUse() == true) {
-							SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-							ventiEasymodeScreen = new VentiEasymodeScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-							super.setCurrentScreen(ventiEasymodeScreen);;
-							setTopBoilerBtnVisible(false);
-							setAIRBackBtnVisible(false);
-							setKccDimmBtnVisible(false);
-							setVentilBackBtnVisible(false);
-							result = true;
-
-						}
-						else {
-							if (VentilStatus.Support2.WindowVenti) {
-								SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-								ventiMainScreen = new VentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-								super.setCurrentScreen(ventiMainScreen);
-							}
-							else {
-								if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-									knxVentiMainScreen = new KnxVentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-									super.setCurrentScreen(knxVentiMainScreen);
-									setManualBtnVisible(false, 1019);
-								}
-								else {
-									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-									ventilationMainScreen = new VentilationMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
-									super.setCurrentScreen(ventilationMainScreen);
-//									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
-//									ventiMainScreen = new VentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.ChangAir_Normal);
-//									super.setCurrentScreen(ventiMainScreen);
-								}
-							}
-							setTopBoilerBtnVisible(false);
-							setAIRBackBtnVisible(false);
-							setKccDimmBtnVisible(false);
-							setVentilBackBtnVisible(false);
-							result = true;
-						}
-					}
-					break;
-
-				case API_Menu.SubMenuCtrl.Inner_AirQuality:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
-					airQualityMainScreen = new AirQualityMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(airQualityMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Inner_AirInfo:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
-					dustInfoScreen = new DustInfoScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(dustInfoScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Concent:
-					if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-						SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
-						concentKnxMainScreen = new ConcentKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-						super.setCurrentScreen(concentKnxMainScreen);
-					}
-					else {
-						SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
-						concentMainScreen = new ConcentMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-						super.setCurrentScreen(concentMainScreen);
-					}
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					setManualBtnVisible(false, 1019);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.HDCLivingNEach_Concent:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
-					concentHdcNEachMainScreen = new ConcentHdcNEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-					super.setCurrentScreen(concentHdcNEachMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					setManualBtnVisible(false, 1019);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Electric_Range:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_ElectricRange);
-					electricRangeMainScreen = new ElectricRangeMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(electricRangeMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.Cooktop_Concent:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_CooktopConcent);
-					cookTopConcentMainScreen = new CookTopConcentMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(cookTopConcentMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				case API_Menu.SubMenuCtrl.SystemAircon:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_SystemAircon);
-					systemAirconMainScreen = new SystemAirconMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mDefaultRoomNameList);
-					super.setCurrentScreen(systemAirconMainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					setManualBtnVisible(false, 1019);
-					result = true;
-					break;
-
-                case API_Menu.SubMenuCtrl.Purity:
-                    SetTitleText(API_Menu.SubMenuCtrl.Name_Purity);
-                    purityMainScreen = new PurityMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mDefaultRoomNameList);
-                    super.setCurrentScreen(purityMainScreen);
-                    setTopBoilerBtnVisible(false);
-                    setAIRBackBtnVisible(false);
-                    setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-                    result = true;
-                    break;
-
-
-				case API_Menu.SubMenuCtrl.Curtain:
-					SetTitleText(API_Menu.SubMenuCtrl.Name_Curtain);
-					curTainV1MainScreen = new CurTainV1MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-					super.setCurrentScreen(curTainV1MainScreen);
-					setTopBoilerBtnVisible(false);
-					setAIRBackBtnVisible(false);
-					setKccDimmBtnVisible(false);
-					setVentilBackBtnVisible(false);
-					result = true;
-					break;
-
-				default:
-					Log.i(TAG, "[Error] setChangeScreen - nScreenId Not found!!! (" + mCurrentScreenId + ")");
-					if (Version.getGatewayUsage()) {
-						// 게이트웨이 사용
-						SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-						lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
-						super.setCurrentScreen(lightHdcLivMainScreen);
-						setTopBoilerBtnVisible(false);
-						setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(false);
-						setVentilBackBtnVisible(false);
-					}
-					else {
-						// 게이트웨이 미사용
-						SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
-						lightEtcEachMainScreen = new LightEtcEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
-						super.setCurrentScreen(lightEtcEachMainScreen);
-						setTopBoilerBtnVisible(false);
-						setAIRBackBtnVisible(false);
-						setKccDimmBtnVisible(true);
-						setVentilBackBtnVisible(false);
-					}
-
-					result = false;
-					break;
-					//mCurrentScreenId = -1;
-					//return false;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setChangeScreen(int nScreenId, boolean OnlyRemove)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-		return result;
-	}
-
-	/**
-	 * 상단 타이틀 텍스트 수정
-	 *
-	 * @param SetText (String) 수정할 타이틀 이름
-	 **/
-    private void SetTitleText(String SetText) {
-        if (SetText != null) {
-			TopTitle.setText(SetText);
-		}
-	}
-
-    /* ================================================================================================
-     * [Menu Layout] Section
-     ================================================================================================ */
-
-	/**
-	 * 메뉴 레이아웃 생성
-	 **/
-    private void OpenMenuLayout() {
-		Log.i(TAG, "Enter OpenMenuLayout !!!");
-
-        if (MenuOpen == true) {
-			Log.e(TAG, "MenuOpen");
-			return;
-		}
-
-        if (menueListDataClass == null) {
-			Log.e(TAG, "menueListDataClass is null");
-			return;
-		}
-
-		//0. 현재 ID 및 리스트 불러오기
-		String Title = API_Menu.GetGroupNameByID((mCurrentScreenId / 1000) * 1000);
-		String TempChildName = null;
-		int ChooseGroup = 0;
-		int ChooseChild = 0;
-
-        for (int i = 0; i < menueListDataClass.arrayGroup.size(); i++) {
-            if (menueListDataClass.arrayGroup.get(i).equals(Title)) {
-				ChooseGroup = i;
-				break;
-			}
-		}
-		Log.i(TAG, "[OpenMenuLayout] - ChooseGroup = " + ChooseGroup);
-
-        for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
-            if (menueListDataClass.idMappingTable[i].Id == mCurrentScreenId) {
-				TempChildName = menueListDataClass.idMappingTable[i].Name;
-				break;
-			}
-		}
-		Log.i(TAG, "[OpenMenuLayout] - TempChildName = " + TempChildName);
-
-        if (TempChildName == null) {
-			Log.e(TAG, "TempChildName is null");
-			return;
-		}
-
-        for (int i = 0; i < menueListDataClass.arrayChild.get(Title).size(); i++) {
-            if (menueListDataClass.arrayChild.get(Title).get(i).equals(TempChildName) == true) {
-				ChooseChild = i;
-				break;
-			}
-		}
-
-		//1. 기존 화면 투명도 변경
-		TopLayout.setAlpha(0.5f);
-		ScreenLayout.setAlpha(0.5f);
-
-		//2. Layout 생성 및 처리 이벤트 등록
-		MenuLayout = new RelativeLayout(this);
-		WpadUtil.LayoutRegistration(AllLayout, MenuLayout, 1280, 800, 0, 0, ID.main.layout.MENU);
-        MenuLayout.setOnTouchListener(new Button.OnTouchListener() {
-			@Override
-            public boolean onTouch(View v, MotionEvent event) {
-                if (event.getAction() == MotionEvent.ACTION_UP) {
-					setFinishTimerReset();
-					CloseMenuLayout();
-				}
-				return true;
-			}
-		});
-
-		//3. 배경 이미지 생성 및 에니메이션 등록
-		MenuBackground = new WpadImageView(this, TOUCH_KIND.BUTTON, 460, 800, R.drawable.bg_menu, R.drawable.bg_menu, ID.main.image.TAB_BACKGROUND);
-		TranslateAnimation anim = new TranslateAnimation(WpadScale.getWidth(-460), 0, 0, 0);
-		anim.setDuration(200);
-		anim.setInterpolator(new AccelerateInterpolator());
-		MenuLayout.setAnimation(anim);
-		ViewRegistration(MenuLayout, MenuBackground, 0, 0);
-
-		//4. 타이틀 등록
-		MenuTitle = new WpadTextView(this, false, 247, 80, Gravity.LEFT, Color.WHITE, Common.fontsize._44, true, ID.main.text.TITLE);
-		ViewRegistration(MenuLayout, MenuTitle, 133, 15);
-		MenuTitle.setText(Title);
-
-		//5. 종료 버튼 등록
-		MenuClose = new WpadImageView(this, TOUCH_KIND.BUTTON, 80, 80, R.drawable.topbar_icon_close_normal, R.drawable.topbar_icon_close_pressed, ID.main.button.MENUCLOSE);
-		MenuClose.setTouchDelayMs(1000);
-		ViewRegistration(MenuLayout, MenuClose, 380, 15);
-
-		//6. 리스트뷰 초기화 및 등록
-		mListView = new ExpandableListView(this);
-		ExpandableListView.LayoutParams params = new ExpandableListView.LayoutParams(WpadScale.getWidth(460), WpadScale.getHeight(690));
-		mListView.setLayoutParams(params);
-		mListView.setX(WpadScale.getWidth(0));
-		mListView.setY(WpadScale.getHeight(112));
-		mListView.setBackgroundColor(Color.BLACK);
-		mListView.setId(ID.main.liveview.lv);
-		mListView.setGroupIndicator(null);
-		mListView.setDividerHeight(0);
-		mListView.setDivider(null);
-		mListView.setFocusable(true);
-		mListView.setSmoothScrollbarEnabled(true);
-		mListView.setTranscriptMode(android.widget.AbsListView.TRANSCRIPT_MODE_DISABLED);
-		mListView.setScrollbarFadingEnabled(true);
-
-		MenuLayout.addView(mListView);
-		adptMain = new Menu_AdptMain(this, menueListDataClass.arrayGroup, menueListDataClass.arrayChild, ChooseGroup, ChooseChild);
-		mListView.setAdapter(adptMain);
-
-		//7. 선택된 그룹 열기
-		mListView.setSelectedGroup(ChooseGroup);
-		mListView.expandGroup(ChooseGroup);
-
-		// 8. 리스트뷰 터치 이벤트 등록
-        mListView.setOnTouchListener(new OnTouchListener() {
-
-			@Override
-            public boolean onTouch(View v, MotionEvent event) {
-				if ((event.getAction() == MotionEvent.ACTION_DOWN) ||
-                        (event.getAction() == MotionEvent.ACTION_UP)) {
-					WpadActivity.setFinishTimerReset();
-				}
-				return false;
-			}
-		});
-
-		// 9. 그룹 터치 이벤트 등록
-        mListView.setOnGroupClickListener(new OnGroupClickListener() {
-			@Override
-            public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
-				DebugLogOutput("group click = " + groupPosition);
-				WpadActivity.setFinishTimerReset();
-				return false;
-			}
-		});
-
-		// 10. 차일드 터치 이벤트 등록
-        /*
-        mListView.setOnChildClickListener(new OnChildClickListener()
-        {
-            @Override
-            public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)
-            {
-                DebugLogOutput("onChildClick");
-                DebugLogOutput("groupPosition = " + groupPosition);
-                DebugLogOutput("childPosition = " + childPosition);
-                WpadActivity.setFinishTimerReset();
-                return false;
-            }
-        });
-        */
-
-		// 11. 그룹 열리는 경우 이벤트
-        mListView.setOnGroupExpandListener(new OnGroupExpandListener() {
-			@Override
-            public void onGroupExpand(int groupPosition) {
-				DebugLogOutput("groupPosition Open Event = " + groupPosition);
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-				WpadActivity.setFinishTimerReset();
-			}
-		});
-
-		// 12. 그룹 닫히는 경우 이벤트
-        mListView.setOnGroupCollapseListener(new OnGroupCollapseListener() {
-			@Override
-            public void onGroupCollapse(int groupPosition) {
-				DebugLogOutput("groupPosition Close Event = " + groupPosition);
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-				WpadActivity.setFinishTimerReset();
-			}
-		});
-
-		// 13. MenuOpen True 설정
-		MenuOpen = true;
-	}
-
-	/**
-	 * 메뉴 layout 닫힘 처리
-	 **/
-    private void CloseMenuLayout() {
-        if (MenuOpen == false) {
-			return;
-		}
-
-		TranslateAnimation anim = new TranslateAnimation(0, WpadScale.getWidth(-460), 0, 0);
-		anim.setDuration(200);
-		anim.setInterpolator(new AccelerateInterpolator());
-        anim.setAnimationListener(new AnimationListener() {
-			@Override
-            public void onAnimationStart(Animation animation) {
-				MenuOpen = false;
-			}
-
-			@Override
-            public void onAnimationRepeat(Animation animation) {
-			}
-
-			@Override
-            public void onAnimationEnd(Animation animation) {
-				AllLayout.removeView(MenuLayout);
-				TopLayout.setAlpha(1.0f);
-				ScreenLayout.setAlpha(1.0f);
-			}
-		});
-
-		MenuLayout.startAnimation(anim);
-	}
-
-	/**
-	 * 메뉴 그룹 터치시 처리 (Menu_AdptMain에서 호출)
-	 **/
-    public static void SetListViewGroupExpand_Collapse(int GroupID, boolean ExpandEnable) {
-        if (ExpandEnable) {
-			mListView.expandGroup(GroupID);
-        }
-        else {
-			mListView.collapseGroup(GroupID);
-		}
-	}
-
-	/**
-	 * Menu정보가 DB에 없을 경우 불러올 스크린 로딩
-	 *
-	 * @return MenuListDataClass 타입의 초기정보
-	 **/
-	private MenuListDataClass loadDefaultMenuList() {
-		try {
-			MenuListDataClass tempMenuListDataClass = new MenuListDataClass();
-			tempMenuListDataClass.SetArrayGroup(API_Menu.SubMenuCtrl.Name);
-
-			ArrayList<String> arrayList = new ArrayList<String>();
-
-			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
-			int nAirQualitySensorUsage = mWallpadDeviceSet.GetDeviceSetted("센서AP");
-			int[] nLightType = mWallpadDeviceSet.Get_Light_info();
-			int[] nDoorlockType = mWallpadDeviceSet.Get_DoorLock_Info();
-			int[] nVentilType = mWallpadDeviceSet.Get_Ventil_Info();
-			int nHeatingUsage = mWallpadDeviceSet.Get_Temper_Info();
-			int nGasValveUsage = mWallpadDeviceSet.Get_GAS_Info();
-			boolean bElecCooktopUsage = mWallpadDeviceSet.Get_ElectricRange_Use();
-			boolean bCooktopOutletUsage = mWallpadDeviceSet.Get_CookTopConcent_Use();
-			int nSystemAirconUsage = mWallpadDeviceSet.Get_AirCON_Info();
-			int nPurityUsage = mWallpadDeviceSet.Get_Purity_Info();
-			mWallpadDeviceSet.closeDB();
-
-			WallpadStatusData mWallpadStatusData = new WallpadStatusData(getContext());
-			boolean bElecOutletUsage = mWallpadStatusData.Get_MultiSwitch_Concent_Use();
-			mWallpadStatusData.closeDB();
-
-			int nChildCnt = 0;
-
-			//[수정필요]
-			//추가 또는 수정해야할 부분 1. - Menu정보가 DB에 없을 경우 불러올 스크린 종류(시작)
-			if (nLightType[0] == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_Lamp);
-				nChildCnt++;
-			}
-
-			if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
-				Log.i(TAG, "bElecOutletUsage = " + bElecOutletUsage + " @@@@@@@@@@@@@@@@");
-				Log.i(TAG, "MultiConcentExist = " + bMultiConcentExist + " @@@@@@@@@@@@@@@@");
-				if ((OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) || (nLightType[0] == 1 && bElecOutletUsage && bMultiConcentExist)) {
-					arrayList.add(API_Menu.SubMenuCtrl.Name_Concent);
-					nChildCnt++;
-				}
-			}
-
-			if (nHeatingUsage == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_Heating);
-				nChildCnt++;
-			}
-
-			if (nGasValveUsage == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_Gas);
-				nChildCnt++;
-			}
-
-			if (bCooktopOutletUsage) {
-				// 쿡탑콘센트
-				arrayList.add(API_Menu.SubMenuCtrl.Name_CooktopConcent);
-				nChildCnt++;
-				Log.i(TAG, "cooktopConcentUse = " + bCooktopOutletUsage + " @@@@@@@@@@@@@@@@");
-				Log.i(TAG, "Name_CooktopConcent Added ~~~ " + " @@@@@@@@@@@@@@@@");
-			}
-
-			if (bElecCooktopUsage) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_ElectricRange);
-				nChildCnt++;
-			}
-
-			if (nDoorlockType[0] == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_DoorLock);
-				nChildCnt++;
-			}
-
-			if (nVentilType[0] == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_Venti);
-				nChildCnt++;
-			}
-
-			if (nSystemAirconUsage == WallpadDeviceSet.DO_USE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_SystemAircon);
-				nChildCnt++;
-			}
-			
-			//전동커튼
-			arrayList.add(API_Menu.SubMenuCtrl.Name_Curtain);
-			nChildCnt++;
-
-			if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
-					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I)
-			{
-				if (!bKitchenLightonLivingEM &&(nDistributionPanelType != Version.DISTRIBUTION_MODEL.KNX_DIST)) {
-					// knx분전반은 거실조명 그룹설정 메뉴에서 빠짐
-					arrayList.add(API_Menu.SubMenuCtrl.Name_LivingLightConfig);
-					nChildCnt++;
-				}
-
-				if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-					arrayList.add(API_Menu.SubMenuCtrl.Name_Concent);
-					nChildCnt++;
-				}
-
-				if (nPurityUsage == WallpadDeviceSet.DO_USE) {
-					arrayList.add(API_Menu.SubMenuCtrl.Name_Purity);
-					nChildCnt++;
-				}
-			}
-
-			if (nAirQualitySensorUsage == WallpadDeviceSet.DEV_DATA_ENABLE) {
-				arrayList.add(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
-				nChildCnt++;
-				arrayList.add(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
-				nChildCnt++;
-			}
-
-			//추가 또는 수정해야할 부분 1. - Menu정보가 DB에 없을 경우 불러올 스크린 종류(끝)
-			Log.i(TAG, "childCount = " + nChildCnt);
-
-			tempMenuListDataClass.SetArrayChild(API_Menu.SubMenuCtrl.Name, arrayList);
-			tempMenuListDataClass.idMappingTable = new ChildIDMapping[nChildCnt];
-			for (int i = 0; i < nChildCnt; i++) {
-				tempMenuListDataClass.idMappingTable[i] = new ChildIDMapping();
-
-				//[수정필요]
-				//추가 또는 수정해야할 부분 2. - 불러올 스크린의 ID를 임의로 입력(시작)
-				if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Lamp)) {
-					if (Version.getGatewayUsage()) {
-						if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
-							//  스마트 분전반
-							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
-							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-						}
-						else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-							// KNX 분전반
-							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
-							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-						}
-						else {
-							if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-									|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
-								tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp;
-								tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-							}
-							else
-							{
-								tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
-								tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-							}
-
-						}
-					}
-					else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-							|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
-						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp;
-						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-					}
-					else {
-						if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_LIVING) {
-							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.OutSide_livingLamp;
-							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-						}
-						else if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
-							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.OutSide_EachLamp;
-							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
-						}
-					}
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Concent)) {
-					if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
-						if ((OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) || (bElecOutletUsage && bMultiConcentExist)) {
-							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Concent;
-							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Concent;
-						}
-					}
-					else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
-						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Concent;
-						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Concent;
-					}
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Gas)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Gas;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Gas;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_CooktopConcent)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Cooktop_Concent;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_CooktopConcent;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_DoorLock)) {
-					if (nDoorlockType[1] == DOORLOCK_TYPE_NORMAL) {
-						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLock485;
-						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
-					}
-					else if (nDoorlockType[1] == DOORLOCK_TYPE_RF) {
-						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLockWL;
-						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
-					}
-					else if (nDoorlockType[1] == DOORLOCK_TYPE_FINGERPRINT) {
-						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLockWL;
-						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
-					}
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Venti)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.ChangAir_Normal;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Venti;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Heating)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Heating_V2;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Heating;
-				}
-				/*
-				//확인 필요
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Heating)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Heating_V1;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Heating;
-				}
-				*/
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Curtain)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Curtain;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Curtain;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_InnerAirQuality)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Inner_AirQuality;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_InnerAirQuality;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_InnerAirInfo)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Inner_AirInfo;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_InnerAirInfo;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_ElectricRange)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Electric_Range;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_ElectricRange;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_SystemAircon)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.SystemAircon;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_SystemAircon;
-				}
-				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_LivingLightConfig)) {
-					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.LivingLightConfig;
-					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_LivingLightConfig;
-				}
-				else {
-					Log.w(TAG, "[loadDefaultMenuList] arrayList.get(" + i + ") is not supported menu!!");
-				}
-				//추가 또는 수정해야할 부분 2. - 불러올 스크린의 ID를 임의로 입력(끝)
-			}
-			return tempMenuListDataClass;
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return null;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] loadDefaultMenuList()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return null;
-		}
-	}
-
-	/**
-	 * Menu Event intent filter 등록
-	 **/
-	private void reg_Receiver() {
-		try {
-			IntentFilter filter = new IntentFilter();
-			filter.addAction("MENU_EVENT");
-			registerReceiver(mWallPadAlertBR, filter);
-
-			filter = new IntentFilter();
-			filter.addAction(define.NOTIFY_DAIL);
-			filter.addAction("WALLPAD_DIAL_GLOBALSCREEN_TOUCH");
-			registerReceiver(mWallPadJogBR, filter);
-
-			filter = new IntentFilter();
-			filter.addAction(ID.main.BR_KCC_DIM);
-			registerReceiver(mKccDimmBR, filter);
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] reg_Receiver()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * 조그버튼 입력 받을 시 처리
-	 **/
-    BroadcastReceiver mWallPadJogBR = new BroadcastReceiver() {
-		@Override
-        public void onReceive(Context context, Intent intent) {
-			WpadActivity.setFinishTimerReset();
-		}
-	};
-
-	/**
-	 * KCC디밍조절기 BR 등록
-	 **/
-    BroadcastReceiver mKccDimmBR = new BroadcastReceiver() {
-		@Override
-        public void onReceive(Context context, Intent intent) {
-			WpadActivity.setFinishTimerReset();
-
-			DebugLogOutput("[mKccDimmBR] - onReceive - mKccDimmBR");
-			Device_Update_Dimming(false, (byte)0);
-			Draw_Update_DimmBtn();
-		}
-	};
-
-	/**
-	 * 메뉴에서 버튼 터치 처리
-	 **/
-    BroadcastReceiver mWallPadAlertBR = new BroadcastReceiver() {
-		@Override
-        public void onReceive(Context context, Intent intent) {
-		int groupPosition = intent.getIntExtra("groupPosition", -1);
-		int childPosition = intent.getIntExtra("childPosition", -1);
-
-		Log.i(TAG, "[mWallPadAlertBR] groupPosition :" + groupPosition + ", childPosition :" + childPosition);
-		if ((groupPosition >= 0) && (childPosition >= 0)) {
-			if (MenuOpen == true) {
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-				CloseMenuLayout();
-
-				if (menueListDataClass == null) {
-					return;
-				}
-				String childName = menueListDataClass.arrayChild.get(menueListDataClass.arrayGroup.get(groupPosition)).get(childPosition);
-				for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
-					if (menueListDataClass.idMappingTable[i].Name.equals(childName)) {
-						API_Menu api_Menu = new API_Menu();
-						int TempID = api_Menu.GetMyGroupID(getApplicationContext().getPackageName());
-						int ChildID = menueListDataClass.idMappingTable[i].Id;
-						int ChildGroupID = (ChildID / 1000) * 1000;
-						Log.i(TAG, "[mWallPadAlertBR] Child ID :" + ChildID);
-
-						if (TempID == 0) {
-							return;
-						}
-
-						if (ChildGroupID == TempID) {
-							//해당 APP내에서 스크린 전환 필요
-							//[수정필요]
-							if (OPERATION_MODE == Common.MODE_NOMAL) {
-								mTempCurrentScreenId = ChildID;
-								mWallPadApiCheckHandler.sendEmptyMessage(0);
-							}
-							else {
-								boolean result = setChangeScreen(ChildID, false);
-								if (result == false) {
-									setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
-								}
-							}
-							WpadActivity.setFinishTimerReset();
-						}
-						else {
-							//외부 앱 호출 후, 본 APP Finish 필요
-							api_Menu.startSubScreenActivity(getApplicationContext(), menueListDataClass.idMappingTable[i].Id, API_Menu.MENU_START_OPTION_1, api_Menu.GetAPK_Name_ByID(ChildGroupID));
-							Intent mIntent = new Intent();
-							mIntent.putExtra("Finish_Kind", "HomeButton");
-							MainActivity.this.setResult(RESULT_OK, mIntent);
-							finish();
-						}
-						break;
-					}
-				}
-			}
-		}
-		}
-	};
-
-	/**
-	 * 디바이스 서비스 APP 을 체크하여 실행되어있지 않을시 실행시킨다.
-	 */
-	private void StartDevService() {
-		try {
-			ActivityManager am = (ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
-			List<ActivityManager.RunningAppProcessInfo> appList = am.getRunningAppProcesses();
-
-			boolean DevServiceExist = false;
-            for (int i = 0; i < appList.size(); i++) {
-				ActivityManager.RunningAppProcessInfo rapi = appList.get(i);
-				Log.i(TAG, "App List i = " + i + " / name = " + rapi.getClass().getName());
-
-                if (rapi.processName.equals("com.artncore.deviceservice")) {
-					Log.d(TAG, "Filter 1 : Service already running");
-					DevServiceExist = true;
-					break;
-				}
-			}
-
-			ActivityManager am2 = (ActivityManager)getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
-			List<ActivityManager.RunningServiceInfo> rs = am2.getRunningServices(1000);
-
-            for (int i = 0; i < rs.size(); i++) {
-				ActivityManager.RunningServiceInfo rsi = rs.get(i);
-				//Log.d("run service","Package Name " + i + " = " + rsi.service.getPackageName());
-				//Log.d("run service","Class Name : " + i + " = " + rsi.service.getClassName());
-                if (rsi.service.getPackageName().equals("com.artncore.deviceservice")) {
-					Log.d(TAG, "Filter 2 : Service already running");
-					DevServiceExist = true;
-					break;
-				}
-			}
-
-            if (!DevServiceExist) {
-				Log.d(TAG, "Call Service Start");
-				Intent intent = new Intent("wallpaddevservice.ServiceMain");
-				startService(intent);
-
-                try {
-					Thread.sleep(3000);
-                } catch (RuntimeException re) {
-					LogUtil.errorLogInfo("", TAG, re);
-				}
-				catch (Exception e) {
-                	Log.e(TAG, "[Exception] StartDevService().sleep(...)");
-				}
-			}
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.w(TAG, "[Exception] StartDevService()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-
-	/**
-	 * DB 에서 룸이름 정보를 가져온다.
-	 *
-	 * @return (String []) null - 실패, not null
-	 */
-	private String[] getRoomNameFromDB() {
-		try {
-			WallpadStatusData wallpadStatusData = new WallpadStatusData(getContext().getApplicationContext());
-			String[] RoomNameList = wallpadStatusData.GetDevRoomName();
-			wallpadStatusData.closeDB();
-            if (RoomNameList == null) {
-				Log.e(TAG, "[getRoomNameFromDB] - RoomNameList is null !!!");
-				return null;
-			}
-
-            if (RoomNameList.length != 6) {
-				Log.e(TAG, "[getRoomNameFromDB.length Not Match (" + RoomNameList.length + ")");
-				return null;
-			}
-
-            if (DEBUG_LOG_ON) {
-				for (int i = 0; i < RoomNameList.length; i++)
-					DebugLogOutput("[getRoomNameFromDB] RoomNameList[" + i + "] " + RoomNameList[i]);
-			}
-
-			return RoomNameList;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] getRoomNameFromDB()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return null;
-	}
-
-	/**
-	 * DB 에서 룸이름 정보를 가져온다. 난방, 조명 개발 명칭 가져오기
-	 *
-	 * @param Device - int
-	 * @return (String []) null - 실패, not null
-	 */
-
-	private String[] getRoomNameFromDB(int Device) {
-		try {
-			String[] RoomNameList = null;
-			WallpadStatusData wallpadStatusData = new WallpadStatusData(getContext().getApplicationContext());
-
-            if (Device == HEATING) {
-				RoomNameList = wallpadStatusData.GetDevRoomName("heating");
-            }
-            else {
-				RoomNameList = wallpadStatusData.GetDevRoomName("light");
-			}
-
-			wallpadStatusData.closeDB();
-            if (RoomNameList == null) {
-				Log.e(TAG, "[DB_GetRoomName] - RoomNameList is null !!!");
-				return null;
-			}
-
-            if (RoomNameList.length != 6) {
-				Log.e(TAG, "[DB_GetRoomName] - RoomNameList.length Not Match (" + RoomNameList.length + ")");
-				return null;
-			}
-
-            if (DEBUG_LOG_ON) {
-				for (int i = 0; i < RoomNameList.length; i++)
-					DebugLogOutput("RoomNameList[" + i + "] " + RoomNameList[i]);
-			}
-
-			return RoomNameList;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] DB_GetRoomName(int Device)");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return null;
-	}
-
-	/**
-	 * DB에서 방 이름을 가져와서 방 명칭 관련 변수에 값을 넣는다.
-	 **/
-	private void GetRoomName() {
-		try {
-			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(getContext().getApplicationContext());
-			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
-			wallpadDeviceSet.closeDB();
-
-			Log.e(TAG, "[GetRoomName] UseEachRoomName = " + UseEachRoomName);
-
-			if (UseEachRoomName == false) {
-				// 명칭 통합사용
-				if (nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
-					// SK건설
-					mRoomNameList_Light = mDefaultRoomNameList_Light_SK;
-					mRoomNameList_Heating = mDefaultRoomNameList_Heating_SK;
-				}
-				else {
-					mRoomNameList_Light = getRoomNameFromDB();
-					if (mRoomNameList_Light == null) {
-						mRoomNameList_Light = mDefaultRoomNameList;
-					}
-
-					if (GetEasyModeUXUse()) {
-						mRoomNameList_Heating = mDefaultRoomNameList_Heating_easymode;
-					}
-					else {
-						mRoomNameList_Heating = getRoomNameFromDB();
-						if (mRoomNameList_Heating == null) {
-							mRoomNameList_Heating = mDefaultRoomNameList;
-						}
-					}
-				}
-			}
-			else {
-				// 명칭 난방, 조명 분리 사용
-				mRoomNameList_Light = getRoomNameFromDB(LIGHT);
-				if (mRoomNameList_Light == null) {
-					mRoomNameList_Light = mDefaultRoomNameList_Light;
-				}
-
-				if (GetEasyModeUXUse()) {
-					mRoomNameList_Heating = mDefaultRoomNameList_Heating_easymode;
-				}
-				else {
-					mRoomNameList_Heating = getRoomNameFromDB(HEATING);
-					if (mRoomNameList_Heating == null) {
-						mRoomNameList_Heating = mDefaultRoomNameList_Heating;
-					}
-				}
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetRoomName()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	/**
-	 * TOP 에 보일러 아이콘 활성화 & 비활성화
-	 *
-	 * @param Enabled - true : 활성화,  false : 비활성화
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean setTopBoilerBtnVisible(boolean Enabled) {
-		try {
-			if (Enabled == true) {
-				Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 0");
-                if (TopBoilerBtn.getVisibility() != View.VISIBLE) {
-					Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 1");
-					if (TopBackBtn.getVisibility() == View.VISIBLE) {
-						// 1019
-						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 2");
-						WpadUtil.ViewMove(TopBoilerBtn, 893, 0);
-						WpadUtil.ViewMove(TopManualBtn, 767, 0);
-                    }
-					else {
-						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 3-1");
-						WpadUtil.ViewMove(TopBoilerBtn, 1019, 0);
-						//WpadUtil.ViewMove(TopManualBtn, 893, 0);
-					}
-
-					if(TopBoilerBtn!=null) TopBoilerBtn.setVisibility(View.VISIBLE);
-					if(TopBoilerBtn!=null) TopBoilerBtn.bringToFront();
-
-                    if (TopBoilerBtn!=null && TopBoilerBtn.getVisibility() == View.VISIBLE) {
-						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 3-2");
-						WpadUtil.ViewMove(TopManualBtn, 893, 0);
-						//TopManualBtn.bringToFront();
-					}
-				}
-            }
-			else {
-				Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 4");
-                if (TopBoilerBtn.getVisibility() != View.INVISIBLE) {
-					Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 5");
-					TopBoilerBtn.setVisibility(View.INVISIBLE);
-
-                    if (TopBackBtn.getVisibility() == View.VISIBLE) {
-						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 6");
-						WpadUtil.ViewMove(TopManualBtn, 893, 0);
-                    }
-                    else {
-						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 7");
-						WpadUtil.ViewMove(TopManualBtn, 1019, 0);
-					}
-				}
-			}
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception ex) {
-			Log.e(TAG, "[Exception] setTopBoilerBtnVisible(boolean Enabled)");
-			//ex.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, ex);
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * 실내공기질 돌아가기 버튼 활성화 & 비활성화
-	 *
-	 * @param Enabled - true : 활성화,  false : 비활성화
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean setAIRBackBtnVisible(boolean Enabled) {
-		if (Enabled == true) {
-			if (TopAirBackBtn.getVisibility() != View.VISIBLE) TopAirBackBtn.setVisibility(View.VISIBLE);
-
-			TopAirBackBtn.bringToFront();
-
-            if (TopAirBackBtn.getVisibility() == View.VISIBLE) {
-				WpadUtil.ViewMove(TopManualBtn, 893, 0);
-			}
-			if(TopManualBtn!=null) TopManualBtn.setVisibility(View.INVISIBLE);
-		}
-		else {
-			if (TopAirBackBtn.getVisibility() != View.INVISIBLE) TopAirBackBtn.setVisibility(View.INVISIBLE);
-
-			if (TopAirBackBtn.getVisibility() == View.INVISIBLE) {
-				WpadUtil.ViewMove(TopManualBtn, 1019, 0);
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * 환기제어 돌아가기 버튼 활성화 & 비활성화
-	 *
-	 * @param Enabled - true : 활성화,  false : 비활성화
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-	public boolean setVentilBackBtnVisible(boolean Enabled) {
-		if (Enabled == true) {
-			if (BTN_TOP_BACK_VENTIL.getVisibility() != View.VISIBLE) BTN_TOP_BACK_VENTIL.setVisibility(View.VISIBLE);
-
-			BTN_TOP_BACK_VENTIL.bringToFront();
-
-			if (BTN_TOP_BACK_VENTIL.getVisibility() == View.VISIBLE) {
-				WpadUtil.ViewMove(TopManualBtn, 893, 0);
-			}
-
-			if(TopManualBtn!=null) TopManualBtn.setVisibility(View.INVISIBLE);
-		}
-		else {
-			if (BTN_TOP_BACK_VENTIL.getVisibility() != View.INVISIBLE) BTN_TOP_BACK_VENTIL.setVisibility(View.INVISIBLE);
-
-			if (BTN_TOP_BACK_VENTIL.getVisibility() == View.INVISIBLE) {
-				WpadUtil.ViewMove(TopManualBtn, 1019, 0);
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * 상단 KCC디밍조절 버튼 활성화 & 비활성화
-	 *
-	 * @param Enabled - true : 활성화,  false : 비활성화
-	 * @return (boolean) true : 성공,  false : 실패
-	 */
-    public void setKccDimmBtnVisible(boolean Enabled) {
-		WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
-		int dimmUse = wdst.GetDeviceSetted("KCC디밍제어기"); // 1: 사용안함 / 2: 사용함
-		wdst.closeDB();
-		Log.i(TAG, "[setKccDimmBtnVisible] - KCC Dimm : " + dimmUse);
-
-		// null, 사용안함 이면 안나오도록 한다.
-		if (dimmUse == 0 || dimmUse == 1) {
-			Log.w(TAG, "[setKccDimmBtnVisible] - KCC Dimm NOT USE !!!");
-			Enabled = false;
-			KccDimUse = 0;
-        }
-		else {
-			KccDimUse = 1;
-		}
-
-        for (int i = 0; i < TopDimmingBtn.length; i++) {
-            if (Enabled == true) {
-                if (TopDimmingBtn[i].getVisibility() != View.VISIBLE)
-                    TopDimmingBtn[i].setVisibility(View.VISIBLE);
-				TopDimmingBtn[i].bringToFront();
-            }
-            else {
-                if (TopDimmingBtn[i].getVisibility() != View.INVISIBLE)
-                    TopDimmingBtn[i].setVisibility(View.INVISIBLE);
-			}
-		}
-	}
-
-	/**
-	 * 조명제어기의 디밍 레벨을 조절한다.
-	 *
-	 * @param Level - 디밍레벨
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-    private int Device_SetDimmingLevel(byte Level) {
-		DebugLogOutput("[Device_SetAllDimmingLevel] - Start   (Level : " + Level + ")");
-
-		// 1. Api Load Check
-        if (ledDimmingAPI == null) {
-			Log.e(TAG, "[Device_SetAllDimmingLevel] ledDimmingAPI unload !!!");
-			return -1;
-		}
-
-		// 2. Param Range Check
-        if (mDimData.DimData.DeviceCnt == 0) {
-			Log.w(TAG, "[Device_SetAllDimmingLevel] mData.DeviceCnt == 0");
-			return -2;
-		}
-
-		// 3. Light Control
-        try {
-			int ret = ledDimmingAPI.SetDimmingLevel(0, Level);
-            if (ret < 0) {
-				Log.e(TAG, "[Device_SetAllDimmingLevel] SetAllDimmingLevel Error (" + ret + ")   ErrorCode = " + ledDimmingAPI.ErrorCode.ErrStr());
-				return -6;
-			}
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetAllDimmingLevel] - [Exception Error] ledDimmingAPI.SetAllDimmingLevel()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetAllDimmingLevel] - OK");
-
-		return 0;
-	}
-
-    private void Draw_Update_DimmBtn() {
-		// 디밍 표시
-		Log.i(TAG, "[Draw_Update_DimmBtn] - Dimming Draw Start");
-        if (mDimData.DimData == null) {
-			Log.w(TAG, "[Draw_Update_DimmBtn] - mDimData.DimData null");
-			return;
-        }
-        else {
-			Log.i(TAG, "[Draw_Update_DimmBtn] - mDimData.DimData normal");
-		}
-
-		byte Level = mDimData.DimData.Device[0].device.Level;
-		Log.i(TAG, "[Draw_Update_DimmBtn] - Level =" + Level);
-
-        for (int i = 0; i < 4; i++) {
-            if (Level == mLevelArray[i]) {
-				Log.i(TAG, "[Draw_Update_DimmBtn] - Same Level Button i = " + i);
-				TopDimmingBtn[i].setButtonRearImage();
-            }
-            else {
-				Log.i(TAG, "[Draw_Update_DimmBtn] - Diff Level Button i = " + i);
-				TopDimmingBtn[i].setButtonFrontImage();
-			}
-		}
-		Log.i(TAG, "[Draw_Update_DimmBtn] - Dimming Draw End");
-	}
-
-	/**
-	 * KCC 디밍제어기의 상태를 갱신한다.
-	 *
-	 * @param real - (boolean) true : 실시간 , false : 가장최근
-	 * @param index - (byte) 방 인덱스 (0~5개별방, Common.INDEX_ALL 전체)
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-    private int Device_Update_Dimming(boolean real, byte index) {
-		DebugLogOutput("[Device_Update_Dimming] - Start   (real : " + real + ", index:" + index + ")");
-
-		// 1. Api Load Check
-        if (ledDimmingAPI == null) {
-			Log.e(TAG, "[Device_Update_Dimming] ledDimmingAPI unload !!!");
-			return -1;
-		}
-
-		// 2. refresh
-        try {
-			int ret = ledDimmingAPI.Refresh(index, real);
-
-            if (ret < 0) {
-				Log.e(TAG, "[Device_Update_Dimming] Refresh(" + index + ", " + real + ")  ret = " + ret + " / ErrorCode = " + ledDimmingAPI.ErrorCode.ErrStr());
-				return -2;
-			}
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_Update_Dimming] - [Exception Error] ledDimmingAPI.Refresh(index:" + index + ", real:" + real + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		// 3. Range Check
-        if (ledDimmingAPI.data.DeviceCnt <= 0) {
-			Log.e(TAG, "[Device_Update_Dimming] - DeviceCnt Out of range !!! (DeviceCnt:" + ledDimmingAPI.data.DeviceCnt + ")");
-			return -10;
-		}
-
-		// 4. Data Copy
-		mDimData.DimData = ledDimmingAPI.data;
-
-		// 5. Debug Msg
-		DebugLogOutput("---------------------------------------");
-		DebugLogOutput("[Device_Update_Dimming]");
-		DebugLogOutput("---------------------------------------");
-		DebugLogOutput("DeviceCnt   = " + ledDimmingAPI.data.DeviceCnt);
-		byte DeviceCnt = ledDimmingAPI.data.DeviceCnt;
-		if (index == define.DEVICE_ALL_OR_NOTHING) {
-			for (byte i = 0; i < DeviceCnt; i++) {
-				DebugLogOutput(ledDimmingAPI.data.Device[i].info.ToDebugString(i));
-				DebugLogOutput(ledDimmingAPI.data.Device[i].device.ToDebugString(i));
-			}
-        }
-		else {
-			DebugLogOutput(ledDimmingAPI.data.Device[index].device.ToDebugString(index));
-		}
-		DebugLogOutput("---------------------------------------");
-
-		DebugLogOutput("[Device_Update_Dimming] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 현관호출 or 전화호출시 사용되는 keycode - Broadcast 을 송신한다.
-	 *
-	 * @param code - (int) 송신할 keycode
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int setSendEventBR(int code) {
-		try {
-			KeyEvent event = new KeyEvent(KeyEvent.ACTION_UP, code);
-			Intent intent = new Intent("EVENT_DEVICE_CONTROL", null);
-			intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
-			intent.putExtra("keycode",code);
-			getContext().sendBroadcast(intent);
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[setSendEventBR] - [Exception Error] code:" + code);
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-		return 0;
-	}
-
-	/**
-	 * 히든메뉴의 버튼 타임아웃을 설정한다.
-	 */
-    private void HideMenu_setTimeOut() {
-		if (mHideMenuTimer != null) mHideMenuTimer.cancel();
-
-		mHideMenuTimer = new CountDownTimer( 1 * 1000, 1000) {
-			@Override
-			public void onFinish() {
-				Log.d(TAG, "mHideMenuTimer - onFinish !!!");
-				mHideMenuEntryStatus = 0;
-			}
-
-			@Override
-			public void onTick(long millisUntilFinished) {
-			}
-		};
-		mHideMenuTimer.cancel();
-		mHideMenuTimer.start();
-	}
-
-	/**
-	 * 히든메뉴 진입용 프로세스
-	 *
-	 * @param TargetId - 히든메뉴용 버튼 ID
-	 */
-	private void HideMenuEntryProc(int TargetId) {
-		if (OPERATION_MODE != Common.MODE_NOMAL) return;
-		if (mHideMenuOn) return;
-
-		if (TargetId == ID.main.button.HIDE1) {
-			if (mHideMenuEntryStatus == 0) { mHideMenuEntryStatus = 1; HideMenu_setTimeOut(); }
-			else if (mHideMenuEntryStatus == 2) { mHideMenuEntryStatus = 3; HideMenu_setTimeOut(); }
-			else if (mHideMenuEntryStatus == 4) { mHideMenuEntryStatus = 5; HideMenu_setTimeOut(); }
-		}
-		else if (TargetId == ID.main.button.HIDE2) {
-			if (mHideMenuEntryStatus == 1) { mHideMenuEntryStatus = 2; HideMenu_setTimeOut(); }
-			else if (mHideMenuEntryStatus == 3) { mHideMenuEntryStatus = 4; HideMenu_setTimeOut(); }
-			else if (mHideMenuEntryStatus == 5) {
-				mHideMenuEntryStatus = 6;
-				mHideMenuOn = true;
-                if (mHideMenuTimer != null) {
-					mHideMenuTimer.cancel();
-					mHideMenuTimer = null;
-
-					TopBackground.setImageResource(0);
-					TopBackground.setBackgroundColor(Color.RED);
-
-					Sound().Play(SND.call.CALLSTART);
-					super.setFinishTimerDestroy();
-
-					Log.i(TAG, "================================");
-					Log.i(TAG, "[HideMenu] START !!!!!");
-					Log.i(TAG, "================================");
-				}
-			}
-		}
-	}
-
-	public boolean GetEasyModeUXUse() {
-		try {
-			WallpadDeviceSet deviceSet = new WallpadDeviceSet(mContext);
-			boolean bSupport = deviceSet.Get_EasyModeUX_Support();
-			deviceSet.closeDB();
-			WallpadStatusData data = new WallpadStatusData(mContext);
-			boolean bUse = data.GetEasyModeUxUse();
-			data.closeDB();
-			Log.d(TAG, "[GetEasyModeUXUse] bSupport [" + bSupport + "], bUse [" + bUse + "]");
-			return bSupport & bUse;
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetEasyModeUXUse()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return false;
-	}
-
-	public boolean getAirSensorAPUsage() {
-		try {
-			boolean bUsage = false;
-			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
-			int nAirQualityEnable = mWallpadDeviceSet.GetDeviceSetted("센서AP");
-			mWallpadDeviceSet.closeDB();
-			if(nAirQualityEnable == WallpadDeviceSet.DEV_DATA_ENABLE) bUsage = true;
-			Log.d(TAG, "[getAirSensorAPUsage] bUsage [" + bUsage + "]");
-			return bUsage;
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] getAirSensorAPUsage()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-		}
-		return false;
-	}
-
-	/**
-	 * 제어기 상태를 가져온다.
-	 *
-	 * @param bReal - (boolean) true : 실시간 , false : 가장최근
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int updateVentilatorData(boolean bReal) {
-		Log.i(TAG, "[updateVentilatorData] - Start   (bReal : " + bReal + ")");
-
-		// 1. Api Load Check
-		if (mVentilAPI == null) {
-			Log.e(TAG, "[updateVentilatorData] - mVentilAPI unload !!!");
-			return -1;
-		}
-
-		// 2. reflash
-		try {
-			int ret = mVentilAPI.Refresh(bReal);
-			if (ret < 0) {
-				Log.e(TAG, "[updateVentilatorData] Refresh - ret (" + ret + ")   ErrorCode = " + mVentilAPI.ErrorCode.ErrStr());
-				return -2;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[updateVentilatorData] - [Exception Error] mVentilAPI.Refresh(" + bReal + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		// 3. Data Copy
-		VentilStatus = mVentilAPI.data;
-
-		// 4. Debug Msg
-		Log.i(TAG, VentilStatus.ToDebugString());
-		Log.i(TAG, VentilStatus.ToFaultString());
-
-		Log.i(TAG, "[updateVentilatorData] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * Knx 환기 제어기 상태를 가져온다.
-	 *
-	 * @param bReal - (boolean) true : 실시간 , false : 가장최근
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int updateKnxVentilatorData(boolean bReal) {
-		Log.i(TAG, "[updateKnxVentilatorData] - Start   (bReal : " + bReal + ")");
-
-		// 1. Api Load Check
-		if (mKnxVentilAPI == null) {
-			Log.e(TAG, "[updateKnxVentilatorData] - mVentilAPI unload !!!");
-			return -1;
-		}
-
-		// 2. reflash
-		try {
-			int ret = mKnxVentilAPI.Refresh(Common.INDEX_ALL, bReal);
-			if (ret < 0) {
-				Log.e(TAG, "[updateKnxVentilatorData] Refresh - ret (" + ret + ")   ErrorCode = " + mKnxVentilAPI.ErrorCode.ErrStr());
-				return -2;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[updateKnxVentilatorData] - [Exception Error] mKnxVentilAPI.Refresh(" + bReal + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		// 3. Data Copy
-		VentilStatus = mKnxVentilAPI.data.Device[0];
-
-		// 4. Debug Msg
-		Log.i(TAG, VentilStatus.ToDebugString());
-		Log.i(TAG, VentilStatus.ToFaultString());
-
-		Log.i(TAG, "[updateVentilatorData] - OK");
-
-		return 0;
-	}
-
-	public static int nConstructionFunction = WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_NONE;
-	private void getConstructionFunction() {
-		try {
-			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
-			nConstructionFunction = mWallpadDeviceSet.Get_Construction_SpecialFunc();
-			mWallpadDeviceSet.closeDB();
-		} catch (Exception e) {
-			Log.e(TAG, "[Exception] getConstructionFunction()");
-			e.printStackTrace();
-		}
-	}
-
-
-}
+package kr.co.icontrols.wallpadhomectrl;
+
+import android.annotation.SuppressLint;
+import android.app.ActivityManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.os.Handler;
+import android.os.Message;
+import android.os.PowerManager;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnTouchListener;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.Animation;
+import android.view.animation.Animation.AnimationListener;
+import android.view.animation.TranslateAnimation;
+import android.widget.ExpandableListView;
+import android.widget.ExpandableListView.OnGroupClickListener;
+import android.widget.ExpandableListView.OnGroupCollapseListener;
+import android.widget.ExpandableListView.OnGroupExpandListener;
+import android.widget.RelativeLayout;
+
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
+import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.artncore.WallPadDataMgr.wallpaddbmgr;
+import com.artncore.commons.API_Menu;
+import com.artncore.commons.API_Menu.MenuListDataClass;
+import com.artncore.commons.API_Menu.MenuListDataClass.ChildIDMapping;
+import com.artncore.commons.DataClasses;
+import com.artncore.commons.define;
+import com.artncore.wallpadapi.KnxVentiAPI;
+import com.artncore.wallpadapi.LedDimmingKCC_API;
+import com.artncore.wallpadapi.MultiSwitchAPI;
+import com.artncore.wallpadapi.VentiAPI;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import kr.co.icontrols.v40ioctl.V40IF;
+import kr.co.icontrols.wallpadhomectrl.declare.Common;
+import kr.co.icontrols.wallpadhomectrl.declare.ID;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_aircon.SystemAirconMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_airquality.AirQualityMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_airquality.DustInfoScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentHdcNEachMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentKnxMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_concent.ConcentMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_curtain.CurTainV1MainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_doorlock.DoorLockMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_elecrange.ElectricRangeMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.CookTopConcentMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.GasMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_gas.HybridCookTopMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_heating.HeatingV1MainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_heating.HeatingV2MainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_knx_venti.KnxVentiEasymodeScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_knx_venti.KnxVentiMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightEtcEachMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightEtcLivMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivConifgScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivKnxMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcLivMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightHdcNEachMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_light.LightKnxMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_purity.PurityMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentiEasymodeScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentiMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentilationMainScreen;
+import kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentilationModelMainScreen;
+import kr.co.icontrols.wallpadsupport.Version;
+import kr.co.icontrols.wallpadsupport.WpadActivity;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadScale;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import kr.co.icontrols.wallpadsupport.WpadTextView;
+import kr.co.icontrols.wallpadsupport.WpadUtil;
+
+import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_FINGERPRINT;
+import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_NORMAL;
+import static com.artncore.WallPadDataMgr.WallpadDeviceSet.DOORLOCK_TYPE_RF;
+
+
+/**
+ * @description 월패드 [설정기능] 메인화면 이다.<br>
+ * 상단의 Top 메뉴, [홈] [돌아가기]<br>
+ * 좌측의 Tab 메뉴, [환경설정] [화면청소] [비밀번호변경] ... 등 선택 메뉴<br>
+ * 를 여기서 처리한다.
+ */
+public class MainActivity extends WpadActivity {
+	private final static String TAG = "MainActivity";
+
+	private final boolean DEBUG_LOG_ON = true;
+
+	private void DebugLogOutput(String s)
+	{
+		if (DEBUG_LOG_ON) Log.d(TAG, s);
+	}
+
+	// =================================================================================================
+	// [[ Declaration ]] region
+	// =================================================================================================
+	protected Context mContext = null;
+
+	public Context getContext()
+	{
+		return mContext;
+	}
+
+	private WallPadAPI wpapi = null;
+	private int OPERATION_MODE = Common.MODE;
+	private WallpadStatusData wdb = null;
+
+	// Layout
+	private RelativeLayout AllLayout;               // 화면 전체
+	private RelativeLayout TopLayout;               // 상단 메뉴
+	private RelativeLayout ScreenLayout;            // 메인 화면
+	private RelativeLayout MenuLayout;              // 메뉴 화면
+
+	// Top Menu
+	private WpadImageView TopBackground;
+	private WpadTextView TopTitle;
+	private WpadImageView TopHomeBtn, TopBackBtn, TopMenuBtn, TopBoilerBtn;
+	private WpadImageView TopAirBackBtn, BTN_TOP_BACK_VENTIL;
+	private WpadImageView TopDimmingBtn[];
+	public static WpadImageView TopManualBtn;
+	private WpadImageView Hide1Btn, Hide2Btn;
+
+	// Main
+	private WpadImageView ScreenBackground;
+
+	// Menu
+	private WpadImageView MenuBackground;
+	private WpadImageView MenuClose;
+	private WpadTextView MenuTitle;
+	private static ExpandableListView mListView;
+	private Menu_AdptMain adptMain;
+	private MenuListDataClass menueListDataClass;
+	private Menu mMenu = null; //WPadAPI의 Menu class
+	private boolean MenuOpen = false;
+
+	// HideMenu
+	private int mHideMenuEntryStatus = 0;
+	private static boolean mHideMenuOn = false;
+	public static boolean getHideMenuOn() { return mHideMenuOn; }
+	private CountDownTimer mHideMenuTimer = null;
+
+	// PopupActivityRun
+	private static boolean PopupActivityRun = false;
+
+	public static boolean getPopupActivityRun()
+	{
+		return PopupActivityRun;
+	}
+
+	public static void setPopupActivityRun(boolean run)
+	{
+		PopupActivityRun = run;
+	}
+
+	// CurrentScreenId
+	private int mCurrentScreenId = -1;
+	private int mTempCurrentScreenId = -1;
+	public static int mCurrentManualScreenId = -1;
+
+	// Screen
+	private LightHdcLivMainScreen lightHdcLivMainScreen = null;
+    private LightHdcLivKnxMainScreen lightHdcLivKnxMainScreen = null;
+    private LightKnxMainScreen lightKnxMainScreen = null;
+	private KnxVentiMainScreen KnxVentiMainScreen = null;
+	private VentiMainScreen ventiMainScreen = null;
+	private VentilationMainScreen ventilationMainScreen = null;
+	private kr.co.icontrols.wallpadhomectrl.screen.screen_venti.VentilationModelMainScreen ventilationModelMainScreen = null;
+	private KnxVentiMainScreen knxVentiMainScreen = null;
+	private KnxVentiEasymodeScreen knxVentiEasymodeScreen= null;
+	private VentiEasymodeScreen ventiEasymodeScreen= null;
+	private GasMainScreen gasMainScreen = null;
+	private DoorLockMainScreen doorLockMainScreen = null;
+	private HeatingV2MainScreen heatingV2MainScreen = null;
+	private HeatingV1MainScreen heatingV1MainScreen = null;
+	private LightHdcLivConifgScreen lightHdcLivConifgScreen = null;
+	private LightEtcEachMainScreen lightEtcEachMainScreen = null;
+	private LightEtcLivMainScreen lightEtcLivMainScreen = null;
+	private LightHdcNEachMainScreen lightHdcNEachMainScreen = null;
+	private AirQualityMainScreen airQualityMainScreen = null;
+	private DustInfoScreen dustInfoScreen = null;
+	private ConcentMainScreen concentMainScreen = null;
+	private ConcentKnxMainScreen concentKnxMainScreen = null;
+
+	private HybridCookTopMainScreen hybridCookTopMainScreen = null;
+	
+	private ConcentHdcNEachMainScreen concentHdcNEachMainScreen = null;
+	private ElectricRangeMainScreen electricRangeMainScreen = null;
+	private CookTopConcentMainScreen cookTopConcentMainScreen = null;
+	private SystemAirconMainScreen systemAirconMainScreen = null;
+    private PurityMainScreen purityMainScreen = null;
+
+	private CurTainV1MainScreen curTainV1MainScreen = null;
+
+	//API
+	public WallpadStatusData GetDBObj() {
+		return wdb;
+	}
+
+	// 명칭 관련
+	public static final int HEATING = 1;
+	public static final int LIGHT = 2;
+
+	private String[] mRoomNameList_Light = null; //조명 방 명칭
+	private String[] mRoomNameList_Heating = null; //난방 방 명칭
+	private String[] mDefaultRoomNameList = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
+	private String[] mDefaultRoomNameList_Light = new String[]{"거실", "주방", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
+	private String[] mDefaultRoomNameList_Light_SK = new String[]{"거실", "주방", "안방", "침실1", "침실2", "침실3", "침실4", "침실5", "침실6", "침실7", "침실8"};
+	private String[] mDefaultRoomNameList_Heating = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
+	private String[] mDefaultRoomNameList_Heating_SK = new String[]{"거실", "안방", "침실1", "침실2", "침실3", "침실4", "침실5", "침실6", "침실7", "침실8"};
+	private String[] mDefaultRoomNameList_Heating_easymode = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
+
+	private int[][] KCC_DimmBtnOffArray =
+			{
+					{R.drawable.btn_top_dimm_normal_off, R.drawable.btn_top_dimm_normal_pressed},
+					{R.drawable.btn_top_dimm_study_off, R.drawable.btn_top_dimm_study_pressed},
+					{R.drawable.btn_top_dimm_sensi_off, R.drawable.btn_top_dimm_sensi_pressed},
+					{R.drawable.btn_top_dimm_rest_off, R.drawable.btn_top_dimm_rest_pressed}
+			};
+	private int[][] KCC_DimmBtnOnArray =
+			{
+					{R.drawable.btn_top_dimm_normal_selected, R.drawable.btn_top_dimm_normal_pressed},
+					{R.drawable.btn_top_dimm_study_selected, R.drawable.btn_top_dimm_study_pressed},
+					{R.drawable.btn_top_dimm_sensi_selected, R.drawable.btn_top_dimm_sensi_pressed},
+					{R.drawable.btn_top_dimm_rest_selected, R.drawable.btn_top_dimm_rest_pressed},
+			};
+	private LedDimmingKCC_API ledDimmingAPI = null;
+	private class DimData {
+		LedDimmingKCC_API.Data DimData;
+		public DimData()
+		{
+			DimData = null;
+		}
+	}
+	private DimData mDimData = null;
+	private byte [] mLevelArray = { 100, 70, 50, 20 };
+
+	private boolean bMultiConcentExist = false;
+	boolean bKitchenLightonLivingEM = false;   // 거실EM에 주방등 연결 여부
+
+	public static PowerManager mPowerManager;
+	public static V40IF mV40IF;
+
+
+	//Value
+	public int KccDimUse = 0;
+//	int SmartDistUse = -1;
+//	boolean KnxDistUse = false;
+	public static int nDistributionPanelType = Version.DISTRIBUTION_MODEL.OTHER;
+
+	private VentiAPI mVentilAPI = null;
+	private KnxVentiAPI mKnxVentilAPI = null;
+	DataClasses.Venti VentilStatus;
+
+	
+	/**
+	 * 모델하우스 전용 환기 버전2 사용 여부 체크
+	 * UI만 동작함
+	 */
+	private boolean isUseModelHouse_Venti = false;
+
+	// =================================================================================================
+	// [[ Activity Life Cycle ]] region
+	// =================================================================================================
+
+	/**
+	 * Activity Constructors
+	 */
+	@Override
+    protected void onCreate(Bundle savedInstanceState) {
+		Log.i(TAG, "[onCreate] -------------------------------------------------------------");
+		Log.i(TAG, "[onCreate] ------------------ [START - MainActivity] -------------------");
+		Log.i(TAG, "[onCreate] -------------------------------------------------------------");
+
+		super.onCreate(savedInstanceState);
+
+		// @ AutoScale 설정
+		WpadScale.setAutoScale(true);
+
+		if (Common.CHECK_DEV_SERVICE) StartDevService();
+
+		super.AppVersionLogOut();   // [APP Version] + [WallPadSupport Lib Version] 을 로그로 출력한다.
+		Log.i("[onCreate] Version", "<><><><>  WallPadAPI     Version = [" + define.WALLPADAPI_VERSION + "] " + "<><><><>");
+
+		// 1. 변수 초기화
+		DebugLogOutput("[Create] - Step1 : Data Create");
+		PopupActivityRun = false;
+		ManualActivityRun = false;
+		mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
+		mV40IF = new V40IF();
+		mContext = this;
+		mDimData = new DimData();
+
+		mHideMenuOn = false;
+
+		// 2. 자동 종료 셋팅
+		DebugLogOutput("[Create] - Step2 : Auto Finish Setting");
+		//     2-1. 자동종료 타이머 셋팅
+		if (Common.FINISH_TIME_ENABLE) super.setFinishTimerCreate(Common.FINISH_TIME_SEC);
+		Common.ctrlLCDOnOff(true);
+
+		// 3. API 호출
+		DebugLogOutput("[Create] - Step3 : API Call");
+		if (Common.GetDeviceSampleMode(this)) OPERATION_MODE = Common.MODE_BUSINESS_SAMPLE;
+		else OPERATION_MODE = Common.MODE_NOMAL;
+
+		//     3.1. wpapi 생성
+        if (OPERATION_MODE == Common.MODE_NOMAL) {
+			Log.d(TAG, "[onCreate] OperationMode = MODE_NOMAL");
+            try {
+				wpapi = new WallPadAPI(this);
+            } catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
+			}
+		}
+		else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+			Log.d(TAG, "[onCreate] OperationMode = MODE_BUSINESS_SAMPLE");
+            try {
+				wpapi = new WallPadAPI(this);
+            } catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
+			}
+		}
+
+        try {
+			wdb = new WallpadStatusData(this);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e);
+		}
+
+		getConstructionFunction();
+		GetRoomName();
+		//mMultiConentCheckHandler.sendEmptyMessage(0); // 멀티스위치 콘센트 유무 확인
+
+		// 4. Layout registration
+		DebugLogOutput("[Create] - Step4 : Layout registration");
+
+		//     4-1. mainLayout
+		AllLayout = new RelativeLayout(this);
+		RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WpadScale.getWidthPixels(), WpadScale.getHeightPixels());
+		AllLayout.setLayoutParams(params);
+		AllLayout.setId(ID.main.layout.ALL);
+		super.setAllLayoutRegistration(AllLayout);
+
+		//     4-2. TopLayout
+		TopLayout = new RelativeLayout(this);
+		WpadUtil.LayoutRegistration(AllLayout, TopLayout, 1280, 110, 0, 0, ID.main.layout.TOP);
+
+		//     4-4. ScreenLayout
+		ScreenLayout = new RelativeLayout(this);
+		WpadUtil.LayoutRegistration(AllLayout, ScreenLayout, 1280, 690, 0, 110, ID.main.layout.SCREEN);
+
+		ScreenBackground = new WpadImageView(this, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, R.drawable.bg_body, ID.main.image.SCREEN_BACKGROUND);
+		ViewRegistration(ScreenLayout, ScreenBackground, 0, 0);
+
+		// 5. Top Menu - ImageView registration
+		DebugLogOutput("[Create] - Step5 : Top Menu - ImageView registration");
+		TopBackground = new WpadImageView(this, TOUCH_KIND.NONE, 1280, 110, R.drawable.bg_topbar, R.drawable.bg_topbar, ID.main.image.TOP_BACKGROUND);
+		ViewRegistration(TopLayout, TopBackground, 0, 0);
+
+
+		TopTitle = new WpadTextView(this, false, 247 + 600, 80, Gravity.LEFT, Color.WHITE, Common.fontsize._44, true, ID.main.text.TITLE);
+
+		ViewRegistration(TopLayout, TopTitle, 133, 15);
+
+		TopHomeBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_home_normal, R.drawable.topbar_icon_home_pressed, ID.main.button.HOME);
+		ViewRegistration(TopLayout, TopHomeBtn, 1145, 0);
+
+		TopMenuBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_menu_normal, R.drawable.topbar_icon_menu_pressed, ID.main.button.MENU);
+		ViewRegistration(TopLayout, TopMenuBtn, 0, 0);
+
+		TopManualBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_manual_normal, R.drawable.topbar_icon_manual_pressed, ID.main.button.MANUAL);
+		setManualBtnVisible(getManualUse(), 1019);
+
+		TopBackBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.BACK);
+		ViewRegistration(TopLayout, TopBackBtn, 1019, 0);
+		setTopBackBtnVisible(false);
+
+		TopBoilerBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.top_but_boiler_normal, R.drawable.top_but_boiler_pressed, ID.main.button.BOILER);
+		ViewRegistration(TopLayout, TopBoilerBtn, 1019, 0);
+		setTopBoilerBtnVisible(false);
+
+		TopAirBackBtn = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.AIRQBACK);
+		ViewRegistration(TopLayout, TopAirBackBtn, 1019, 0);
+		setAIRBackBtnVisible(false);
+
+		BTN_TOP_BACK_VENTIL = new WpadImageView(this, TOUCH_KIND.BUTTON, 110, 110, R.drawable.topbar_icon_back_normal, R.drawable.topbar_icon_back_pressed, ID.main.button.VENTILBACK);
+		ViewRegistration(TopLayout, BTN_TOP_BACK_VENTIL, 1019, 0);
+		setVentilBackBtnVisible(false);
+
+		Hide1Btn = new WpadImageView(this, TOUCH_KIND.BUTTON_M, 100, 110, 0, 0, ID.main.button.HIDE1);
+		ViewRegistration(TopLayout, Hide1Btn, 530, 0);
+		Hide2Btn = new WpadImageView(this, TOUCH_KIND.BUTTON_M, 100, 110, 0, 0, ID.main.button.HIDE2);
+		ViewRegistration(TopLayout, Hide2Btn, 650, 0);
+
+		TopDimmingBtn = new WpadImageView[4];
+        for (int i = 0; i < TopDimmingBtn.length; i++) {
+			TopDimmingBtn[i] = new WpadImageView(this, TOUCH_KIND.BUTTON, 76, 76, KCC_DimmBtnOffArray[i], KCC_DimmBtnOnArray[i], ID.main.button.DIMM_NORMAL + i);
+			ViewRegistration(TopLayout, TopDimmingBtn[i], 445 + (i*100), 17);
+		}
+		setKccDimmBtnVisible(false);
+
+		WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
+		bKitchenLightonLivingEM = wpdds.Get_LivingEm_KitchenLight_Use();
+		wpdds.closeDB();
+
+		// 6. Menu Loading
+		//     6-1. 메뉴 정보를 가져온다 (DB에서 가져온다)
+		DebugLogOutput("[Create] - Step6 : Side Menu - Insert Menu List");
+		wallpaddbmgr WallpadDBMGR = new wallpaddbmgr(getApplicationContext());
+		menueListDataClass = WallpadDBMGR.GetMenuList();
+		WallpadDBMGR.closeDB();
+
+		//WallPadMain에서 MenuList를 넣어주지 않아 아래 테스트 코드를 넣음
+		menueListDataClass = null;
+
+        if (menueListDataClass == null) {
+			Log.e(TAG, "[onCreate] menueListDataClass == null, Load Default List");
+			menueListDataClass = loadDefaultMenuList();
+		}
+		else {
+			for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
+				Log.d(TAG, "[onCreate] i [" + i + "], ID [" + menueListDataClass.idMappingTable[i].Id + ", NAME [" + menueListDataClass.idMappingTable[i].Name + "]");
+			}
+		}
+
+		//     6-2. 시작 화면을 main APP으로 부터 받아서 처리한다.
+		VentilStatus = new DataClasses.Venti();
+
+		mMenu = new Menu();
+		mMenu = super.getIntentParsingMenu(getIntent());
+        if (mMenu == null) {
+			Log.i(TAG, "[onCreate] mMenu = null");
+			if (OPERATION_MODE == Common.MODE_NOMAL) {
+				mTempCurrentScreenId = API_Menu.SubMenuCtrl.HDC_LivingLamp;
+				setTitleName(mTempCurrentScreenId);
+				mWallPadApiCheckHandler.sendEmptyMessage(0);
+			}
+			else {
+				setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
+			}
+		}
+		else {
+			Log.i(TAG, "[onCreate] mMenu != null");
+			if (OPERATION_MODE == Common.MODE_NOMAL) {
+				mTempCurrentScreenId = mMenu.getStartId();
+				setTitleName(mTempCurrentScreenId);
+				mWallPadApiCheckHandler.sendEmptyMessage(0);
+			}
+			else {
+				mTempCurrentScreenId = mMenu.getStartId();
+				setTitleName(mTempCurrentScreenId);
+				mWallPadApiCheckHandler.sendEmptyMessage(0);
+
+				/*boolean result = setChangeScreen(mMenu.getStartId(), false);
+				Log.i(TAG, "Menu Sample result = " + result);
+
+				if (result == false)
+				{
+					setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
+				}*/
+			}
+		}
+
+		// 7. Draw
+		DebugLogOutput("[Create] - Step7 : setContentView");
+		setContentView(AllLayout);
+
+		// 8. Window ReSize
+		DebugLogOutput("[Create] - Step8 : Window ReSize");
+		//super.WindowReSize(Common.SCREEN_SIZE_MAIN_W, Common.SCREEN_SIZE_MAIN_H, false);
+
+		// 9. BR Receiver 등록(메뉴에서 다른 화면이 눌린 경우 BR처리)
+		reg_Receiver();
+
+		WallpadDeviceSet wds = new WallpadDeviceSet(getContext());
+		int gateway = wds.GetGatewayModelKindInfo();
+		nDistributionPanelType = wds.Get_DistributionPannelType_Info();
+		wds.closeDB();
+
+		if (gateway == Version.GATEWAY_MODEL.IGW_200) {
+			Log.i(TAG, "[onCreate] IGW_200 SET @@@@@@@@@@@@@@@@@@@@");
+		}
+		else if (gateway == Version.GATEWAY_MODEL.IGW_300) {
+			Log.i(TAG, "[onCreate] IGW_300 SET @@@@@@@@@@@@@@@@@@@@");
+		}
+		else {
+			Log.i(TAG, "[onCreate] GATEWAY OTHER @@@@@@@@@@@@@@@@@@@@");
+		}
+
+		/*if( (SmartDistUse == 1) && (KnxDistUse == false) ) // 스마트분전반 O / KNX 분전반 X
+		{
+			SdbAPI sdbAPI = Get_SdbController();
+			if(sdbAPI == null) return -1;
+			ret = sdbAPI.Refresh(SdbAPI.DEVICE_INDEX.ENERGY_CONT, define.DEVICE_ALL_OR_NOTHING);
+			if(ret < 0) return -2;
+
+			if(sdbAPI.data.EnergyController.Data.BatchOffStatus == Sdb_DataClasses.BATCHOFF_STATUS.SET) return 0;
+			else return 1;
+		}
+		else if( (SmartDistUse == 0) && (KnxDistUse == true) ) // 스마트분전반 X / KNX 분전반 O
+		{
+			KnxAPI knxAPI = Get_KnxController();
+			if(knxAPI == null) return -1;
+			ret = knxAPI.Refresh(KnxAPI.DEVICE_INDEX.MASTER_CONT, define.DEVICE_ALL_OR_NOTHING);
+			if(ret < 0) return -2;
+
+			if(knxAPI.data.MasterController.Data.BatchOffStatus == KNX_DataClasses.BATCHOFF_STATUS.SET) return 0;
+			else return 1;
+		}
+		else // 그밖의 경우, 스마트분전반을 기본으로 로딩.
+		{
+			SdbAPI sdbAPI = Get_SdbController();
+			if(sdbAPI == null) return -1;
+			ret = sdbAPI.Refresh(SdbAPI.DEVICE_INDEX.ENERGY_CONT, define.DEVICE_ALL_OR_NOTHING);
+			if(ret < 0) return -2;
+
+			if(sdbAPI.data.EnergyController.Data.BatchOffStatus == Sdb_DataClasses.BATCHOFF_STATUS.SET) return 0;
+			else return 1;
+		}*/
+
+		Log.i(TAG, "[onCreate] End onCreate -------------------------------------------------");
+	}
+
+	/**
+	 * (임시코드) WallPadAPI 초기생성시 Connect 에 시간이 걸리며, <br>
+	 * WallPadAPI 초기화후 바로 Get_GasValveController 등을 사용하여  API 를 가져올수 없기에, <br>
+	 * 본 딜레이 코드를 임시로 적용한다.
+	 */
+	@SuppressLint("HandlerLeak")
+	protected Handler mWallPadApiCheckHandler = new Handler() {
+		@SuppressLint("HandlerLeak")
+		@Override
+		public void handleMessage(Message msg) {
+			try {
+				if (msg.what == 0) {
+					if (wpapi != null) {
+						//Log.d(TAG, "Handler go");
+						if (wpapi.Check_Connect()) {
+							if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+								mKnxVentilAPI = wpapi.Get_KnxVentiController();
+								// KNX 환기
+								if (mKnxVentilAPI != null) {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mKnxVentilAPI is not null!!");
+									updateKnxVentilatorData(false);
+								}
+								else {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mKnxVentilAPI is null!!");
+									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+								}
+
+								mVentilAPI = wpapi.Get_VentiController();
+								if (mVentilAPI != null) {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is not null!!");
+									updateVentilatorData(false);
+								}
+								else {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is null!!");
+									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+								}
+							}
+							else {
+								// 일반 환기
+								mVentilAPI = wpapi.Get_VentiController();
+								if (mVentilAPI != null) {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is not null!!");
+									updateVentilatorData(false);
+								}
+								else {
+									Log.e(TAG, "[mWallPadApiCheckHandler] mVentilAPI is null!!");
+									mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+								}
+							}
+
+							// KCC 디밍제어기 사용여부 확인
+							WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
+							int nKCCDimmingUsage = wdst.GetDeviceSetted("KCC디밍제어기"); // 1: 사용안함 / 2: 사용함
+							int[] nLightType = wdst.Get_Light_info();
+							wdst.closeDB();
+
+							if (nKCCDimmingUsage == WallpadDeviceSet.DEV_DATA_ENABLE) {
+								ledDimmingAPI = wpapi.Get_KCCDimmingController();
+								if (ledDimmingAPI != null) {
+									ledDimmingAPI.regChangedBR(ID.main.BR_KCC_DIM);
+									if (ledDimmingAPI.Refresh((byte)0, false) >= 0) {
+										mDimData.DimData = ledDimmingAPI.data;
+									}
+									Draw_Update_DimmBtn();
+								}
+								else {
+									Log.w(TAG, "[mWallPadApiCheckHandler] ledDimmingAPI is null!!");
+									//mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+								}
+							}
+
+							if (nLightType[0] == WallpadDeviceSet.DO_USE) {
+								if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
+									// 조명 : 멀티스위치인 경우
+									try {
+										MultiSwitchAPI mMultiSwitchAPI = wpapi.Get_MultiSwitchController();
+										if (mMultiSwitchAPI.Refresh((byte) 0xFF, false) >= 0) {
+											Log.i(TAG, "[mWallPadApiCheckHandler] Multi Refresh ----> true @@@@@@@@@@@@@");
+											if (mMultiSwitchAPI.isExist_ConcentDevice()) {
+												Log.i(TAG, "[mWallPadApiCheckHandler] Multi concent ----> true @@@@@@@@@@@@@");
+												bMultiConcentExist = true; // 콘센트 있는지 확인
+											}
+										}
+									} catch (RuntimeException re) {
+										LogUtil.errorLogInfo("", TAG, re);
+									}
+									catch (Exception e) {
+										Log.e(TAG, e.toString());
+									}
+								}
+							}
+							mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
+						}
+						else {
+							mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+						}
+					}
+					else {
+						Log.w(TAG, "[mWallPadApiCheckHandler] wpapi is null!!");
+					}
+				}
+				else if (msg.what == 1) {
+					Log.d(TAG, "Handler finish");
+					menueListDataClass = loadDefaultMenuList(); // 다시 메뉴를 만들어 질까? ??????
+
+					boolean result = setChangeScreen(mTempCurrentScreenId, false);
+					if (result == false) {
+						setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
+					}
+				}
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Exception] mWallPadApiCheckHandler.handleMessage(Message msg)");
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
+			}
+		}
+	};
+
+	boolean multiConcentFindRoutine = false;
+	@SuppressLint("HandlerLeak")
+	protected Handler mMultiConentCheckHandler = new Handler()
+	{
+		@SuppressLint("HandlerLeak")
+		@Override
+        public void handleMessage(Message msg) {
+            if (msg.what == 0) {
+                if (wpapi != null) {
+					//Log.d(TAG, "Handler go");
+                    if (wpapi.Check_Connect()) {
+						WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
+						int[] lightType = wdst.Get_Light_info();
+						wdst.closeDB();
+
+                        if (lightType[0] == WallpadDeviceSet.DO_USE) {
+							if (lightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
+								// 조명 : 멀티스위치인 경우,
+                                try {
+									MultiSwitchAPI MSAPI = wpapi.Get_MultiSwitchController();
+                                    if (MSAPI.Refresh((byte) 0xFF, false) >= 0) {
+										Log.i(TAG, "Multi Refresh ----> true @@@@@@@@@@@@@");
+                                        if (MSAPI.isExist_ConcentDevice()) {
+											Log.i(TAG, "Multi concent ----> true @@@@@@@@@@@@@");
+											bMultiConcentExist = true; // 콘센트 있는지 확인
+										}
+									}
+								} catch (RuntimeException re) {
+									LogUtil.errorLogInfo("", TAG, re);
+								}
+								catch (Exception e) {
+									Log.e(TAG, e.toString());
+								}
+                            }
+							else {
+								mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
+							}
+						}
+						mWallPadApiCheckHandler.sendEmptyMessageDelayed(1, 10);
+                    }
+                    else {
+						mWallPadApiCheckHandler.sendEmptyMessageDelayed(0, 10);
+					}
+				}
+			}
+			else if (msg.what == 1) {
+				Log.d(TAG, "Handler finish");
+				multiConcentFindRoutine = true;
+				menueListDataClass = loadDefaultMenuList(); // 다시 메뉴를 만들어 질까? ??????
+			}
+		}
+	};
+
+
+	/* ================================================================================================
+* [Manual Activity] Section
+================================================================================================ */
+	public static ManualActivity mManualActivity;
+
+	public void setManualBtnVisible(boolean bEnable, int marginLeft) {
+		try {
+			Log.d(TAG, "[setManualBtnVisible] bEnable [" + bEnable + "], marginLeft [" + marginLeft + "]");
+			if (bEnable) {
+				TopManualBtn.setVisibility(View.VISIBLE);
+				ViewRegistration(TopLayout, TopManualBtn, marginLeft, 0);
+			}
+			else {
+				TopManualBtn.setVisibility(View.INVISIBLE);
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setManualBtnVisible(boolean bEnable, int marginLeft)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * 매뉴얼 버튼 사용 유무
+	 * @return boolean 타입 - true: 사용, false: 미사용
+	 */
+	public boolean getManualUse() {
+		try {
+			WallpadDeviceSet devSet = new WallpadDeviceSet(mContext);
+			String[] DBinfo = devSet.GetSettingData("매뉴얼");
+			devSet.closeDB();
+
+			if (DBinfo != null) {
+				if (DBinfo[1].indexOf("사용함") > 0) {
+					Log.d(TAG, "[getManualUse] Use Manual");
+					return true;
+				}
+				else {
+					// 미사용
+					Log.d(TAG, "[getManualUse] Not Use Manual [1]");
+					return false;
+				}
+			}
+			else {
+				// 미사용
+				Log.d(TAG, "[getManualUse] Not Use Manual [2]");
+				return false;
+			}
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] getManualUse()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return false;
+	}
+
+	// ManualActivityRun
+	private static boolean ManualActivityRun = false;
+
+	public static boolean getManualActivityRun() {
+		Log.d(TAG, "[getManualActivityRun] ManualActivityRun: " + ManualActivityRun);
+		return ManualActivityRun;
+	}
+
+    public static void setManualActivityRun(boolean run) {
+		ManualActivityRun = run;
+		if (!ManualActivityRun) resetCurrentManualScreenID();
+	}
+
+    public boolean StartManual(int screenId) {
+		try {
+			Log.d(TAG, "[StartManual] ScreenId [" + screenId + "], mCurrentManualScreenId [" + mCurrentManualScreenId + "]");
+			if (getManualActivityRun()) {
+				mCurrentManualScreenId = screenId;
+				return ((WpadActivity) (ManualActivity.getContext())).ChangeScreen(screenId);
+			}
+			else {
+				if (mCurrentManualScreenId == screenId) return false;
+				mCurrentManualScreenId = screenId;
+				setManualActivityRun(true);
+				Intent intent = new Intent(mContext, ManualActivity.class);
+				intent.putExtra("ScreenId", screenId);
+
+				if (mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V2) {
+					intent.putExtra("HeatInfo", heatingV2MainScreen.Heating_Manual_Str);
+				}
+				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_EachLamp) {
+					intent.putExtra("EtcMultiInfo", "RoomCount:"+lightEtcEachMainScreen.TotalRoomCount + "/" + "KccDim:" + KccDimUse );
+				}
+				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Concent) {
+					intent.putExtra("ConcentInfo", "ConcentCount:"+concentMainScreen.mConDeviceCount );
+				}
+				else if (mCurrentScreenId == API_Menu.SubMenuCtrl.ChangAir_Normal) {
+					if (GetEasyModeUXUse() == true) {
+						intent.putExtra("VentiInfo", ventiEasymodeScreen.VentiManual_Str);
+					}
+					else {
+						if (ventiMainScreen != null) intent.putExtra("VentiInfo", ventiMainScreen.VentiManual_Str);
+					}
+				}
+
+				overridePendingTransition(0, 0);
+				startActivityForResult(intent, 0);
+				return true;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] StartManual(int screenId)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public static void resetCurrentManualScreenID() {
+		try {
+			mCurrentManualScreenId = -1;
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] resetCurrentManualScreenID()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public static void FinishManualActivity() {
+		Log.i(TAG, "[FinishManualActivity]");
+		try {
+			if (mManualActivity != null) {
+				mCurrentManualScreenId = -1;
+				mManualActivity.finish();
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] FinishManualActivity()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * onDestroy
+	 */
+	@Override
+	protected void onDestroy() {
+		try {
+			setChangeScreen(mCurrentScreenId, true);
+
+			if (wdb != null) wdb.closeDB();
+
+			if (mWallPadApiCheckHandler != null) {
+				mWallPadApiCheckHandler.removeMessages(0);
+			}
+			this.unregisterReceiver(mWallPadAlertBR);
+			this.unregisterReceiver(mWallPadJogBR);
+			this.unregisterReceiver(mKccDimmBR);
+
+			if (ledDimmingAPI != null) {
+				ledDimmingAPI.unregChangedBR(ID.main.BR_KCC_DIM);
+				super.removeBrActionFilter(ID.main.BR_KCC_DIM);
+			}
+
+			if (getManualUse()) {
+				FinishManualActivity();
+			}
+
+			super.setFinishTimerDestroy();
+			super.onDestroy();
+
+			Log.i(TAG, "*************************************************************");
+			Log.i(TAG, "****************** [END   - MainActivity] *******************");
+			Log.i(TAG, "*************************************************************");
+
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] onDestroy()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * onResume
+	 */
+	@Override
+    protected void onResume() {
+		super.onResume();
+
+		if (wpapi != null) wpapi.Resume();
+		DebugLogOutput("@@@@@@@@ [onResume] @@@@@@@@");
+	}
+
+	/**
+	 * onPause
+	 */
+	@Override
+    protected void onPause() {
+		super.onPause();
+
+		if (wpapi != null) wpapi.Pause();
+		DebugLogOutput("@@@@@@@@ [onPause] @@@@@@@@");
+	}
+
+
+    /* ================================================================================================
+	 * [BroadcastReceiver] Section
+     ================================================================================================ */
+
+	/**
+	 * BroadcastReceiver.onReceive for [WpadActivity]
+	 */
+	@Override
+    protected void onBrReceive(Intent intent) {
+		super.onBrReceive(intent);
+
+		String strActionName = intent.getAction();
+		DebugLogOutput("[onBrReceive] strActionName [" + intent.getAction() + "]");
+
+        if (strActionName.equals(ID.main.BR_KCC_DIM)) {
+			DebugLogOutput("[onBrReceive] ID.main.BR_KCC_DIM");
+			Device_Update_Dimming(false, (byte)0);
+			Draw_Update_DimmBtn();
+		}
+	}
+
+
+    /* ================================================================================================
+     * [Touch & Key Event] Section
+     ================================================================================================ */
+
+	/**
+	 * TouchEvent for [WpadActivity]
+	 */
+	@Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+		super.onTouchEvent(v, event);
+		try {
+			int TargetId = v.getId();
+			int MoveEvent = event.getAction();
+
+			//DebugLogOutput("onTouch - " + "id : " + v.getId() + " / Action : " + event.getAction());
+			if (MoveEvent == MotionEvent.ACTION_UP) {
+				if (TargetId == ID.main.button.HOME) {
+					DebugLogOutput("onTouchEvent [HOME] BUTTON !!!");
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+
+					Intent intent = new Intent();
+					intent.putExtra("Finish_Kind", "HomeButton");
+					setResult(RESULT_OK, intent);
+					finish();
+				}
+				else if (TargetId == ID.main.button.BACK) {
+					DebugLogOutput("onTouchEvent [BACK] BUTTON !!!");
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+
+					/**
+					 *[수정필요]Back Button 필요한 화면은 아래 부분 추가 후 사용 필요
+					 * **/
+                /*
+                if(mCurrentScreenId == API_Menu.SubMenuConfig.SmartKey)
+                {
+                    setChangeScreen(API_Menu.SubMenuConfig.Configuration, false);
+                }
+                */
+				}
+				else if (TargetId == ID.main.button.MENU) {
+					DebugLogOutput("onTouchEvent [MENU] BUTTON !!!");
+					Log.i(TAG, "MenuOpen = " + MenuOpen);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					if (MenuOpen == true) {
+						return;
+					}
+
+					OpenMenuLayout();
+				}
+				else if (TargetId == ID.main.button.MENUCLOSE) {
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					CloseMenuLayout();
+				}
+				else if (TargetId == ID.main.button.BOILER) {
+					DebugLogOutput("onTouchEvent [BOILER] BUTTON !!!");
+					if (StartPopup(ID.screen.HeatingV2PopupBoilerScreen)) {
+						Sound().Play(SND.effect.TOUCH_LATCHED);
+					}
+				}
+				else if (TargetId == ID.main.button.HIDE1 || TargetId == ID.main.button.HIDE2) {
+					HideMenuEntryProc(TargetId);
+				}
+				else if (TargetId == ID.main.button.AIRQBACK) {
+					DebugLogOutput("onTouchEvent [AIRQBACK] BUTTON !!!");
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					setAIRBackBtnVisible(false);
+
+					setChangeScreen(API_Menu.SubMenuCtrl.Inner_AirQuality, false);
+				}
+				else if (TargetId == ID.main.button.VENTILBACK) {
+					DebugLogOutput("onTouchEvent [AIRQBACK] BUTTON !!!");
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					setVentilBackBtnVisible(false);
+
+					setChangeScreen(API_Menu.SubMenuCtrl.ChangAir_Normal, false);
+				}
+				else if (TargetId >= ID.main.button.DIMM_NORMAL && TargetId <= ID.main.button.DIMM_REST) {
+					DebugLogOutput("onTouchEvent [DIMM_NORMAL] BUTTON !!!");
+
+					try {
+						// 디밍제어
+						int index = TargetId - ID.main.button.DIMM_NORMAL;
+						DebugLogOutput("onTouchEvent [DIM_LEV" + (index + 1) + "] BUTTON !!!");
+
+						if (mDimData.DimData.Device[0] == null) {
+							DebugLogOutput("null event");
+						}
+
+						if(mDimData.DimData.Device[0]!=null && mLevelArray!=null)
+						{
+							byte NowLevel = mDimData.DimData.Device[0].device.Level;
+							DebugLogOutput("NowLevel :" + NowLevel);
+							byte CtrlLevel = mLevelArray[index];
+							DebugLogOutput("CtrlLevel :" + CtrlLevel);
+
+							if (NowLevel == CtrlLevel) {
+								TopDimmingBtn[index].setButtonRearImage(); // 켜진 상태 그대로 유지
+							}
+							else if (NowLevel != CtrlLevel) {
+								int ret = Device_SetDimmingLevel(CtrlLevel);
+								if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+								else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+							}
+						}
+
+					} catch (RuntimeException re) {
+						Sound().Play(SND.effect.TOUCH_UNLATCHED);
+						LogUtil.errorLogInfo("", TAG, re);
+					}
+					catch (Exception ex) {
+						Sound().Play(SND.effect.TOUCH_UNLATCHED);
+						//ex.printStackTrace();
+						LogUtil.errorLogInfo("", TAG, ex);
+					}
+				}
+				else if (TargetId == ID.main.button.MANUAL) {
+					Log.i(TAG, "onTouchEvent [MANUAL] BUTTON [mCurrentScreenId = " + mCurrentScreenId + "]");
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					if (mCurrentScreenId == API_Menu.SubMenuCtrl.HDC_LivingLamp) { StartManual(ID.MANUAL.MANUAL_HdcLivingLight); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.LivingLightConfig) { StartManual(ID.MANUAL.MANUAL_HdcLivingGroup); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_livingLamp) { StartManual(ID.MANUAL.MANUAL_EtcLivingLight); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp) {}
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.OutSide_EachLamp) { StartManual(ID.MANUAL.MANUAL_EtcMultiLight); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V2 || mCurrentScreenId == API_Menu.SubMenuCtrl.Heating_V1) { StartManual(ID.MANUAL.MANUAL_Heating); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Gas) { StartManual(ID.MANUAL.MANUAL_Gas); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Cooktop_Concent) { StartManual(ID.MANUAL.MANUAL_CookTopConcent); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.DoorLockWL) { StartManual(ID.MANUAL.MANUAL_Doorlock); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.DoorLock485) { StartManual(ID.MANUAL.MANUAL_Doorlock); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Concent) { StartManual(ID.MANUAL.MANUAL_Concent); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.ChangAir_Normal) {
+						if (getAirSensorAPUsage() && VentilStatus.Support.InnerCycle && VentilStatus.Support.OutAirClean) {
+							if (nDistributionPanelType != Version.DISTRIBUTION_MODEL.KNX_DIST) StartManual(ID.MANUAL.MANUAL_Ventilation);
+						}
+						else {
+							if (GetEasyModeUXUse()) StartManual(ID.MANUAL.MANUAL_Easymode_Venti);
+							else {
+								if (VentilStatus.Support2.WindowVenti) StartManual(ID.MANUAL.MANUAL_Venti);
+								else StartManual(ID.MANUAL.MANUAL_Ventilation);
+							}
+						}
+					}
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Inner_AirQuality) { StartManual(ID.MANUAL.MANUAL_InAirQual); }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Inner_AirInfo) { /*StartManual(ID.MANUAL.MANUAL_AirInfo);*/ }
+					else if (mCurrentScreenId == API_Menu.SubMenuCtrl.Electric_Range) { StartManual(ID.MANUAL.MANUAL_ElecRange); }
+				}
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * H/W Key Event
+	 */
+	@Override
+	public boolean onKeyDown(int keyCode, KeyEvent event) {
+		Log.i(TAG, "[onKeyDown] keyCode : " + keyCode + ", Action : " + event.getAction());
+		return super.onKeyDown(keyCode, event);
+	}
+
+
+    /* ================================================================================================
+     * [TOP - Back] Section
+     ================================================================================================ */
+
+	/**
+	 * TOP 돌아가기 버튼 활성화 & 비활성화
+	 *
+	 * @param Enabled - true : 활성화,  false : 비활성화
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean setTopBackBtnVisible(boolean Enabled) {
+		try {
+			if (Enabled == true) {
+				if (TopBackBtn.getVisibility() != View.VISIBLE) TopBackBtn.setVisibility(View.VISIBLE);
+				TopBackBtn.bringToFront();
+			}
+			else {
+				if (TopBackBtn.getVisibility() != View.INVISIBLE) TopBackBtn.setVisibility(View.INVISIBLE);
+			}
+			return true;
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setTopBackBtnVisible(boolean Enabled)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+
+    /* ================================================================================================
+     * [Popup Activity] Section
+     ================================================================================================ */
+
+	/**
+	 * Popup Activity 를 시작시킨다.
+	 *
+	 * @param ScreenId - 팝업시작시 Screen ID
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean StartPopup(int ScreenId) {
+		if (getPopupActivityRun() == true) {
+			return ((WpadActivity) (PopupActivity.getContext())).ChangeScreen(ScreenId);
+		}
+		else {
+			setPopupActivityRun(true);
+			Intent intent = new Intent(mContext, PopupActivity.class);
+			intent.putExtra("ScreenId", ScreenId);
+
+			overridePendingTransition(0, 0);
+			startActivityForResult(intent, 0);
+			return true;
+		}
+	}
+
+	/**
+	 * Popup Activity 를 시작시킨다. (시작시 Intent Type 데이터를 전달한다)
+	 *
+	 * @param ScreenId - 팝업시작시 Screen ID
+	 * @param data     - 전달할 데이터
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean StartPopup(int ScreenId, Intent data) {
+		if (getPopupActivityRun() == true) { return false;
+		}
+		else {
+			setPopupActivityRun(true);
+			Intent intent = new Intent(mContext, PopupActivity.class);
+			intent.putExtra("ScreenId", ScreenId);
+
+			intent.putExtra("PopupScreenDataIntent", data);
+
+			overridePendingTransition(0, 0);
+			startActivityForResult(intent, 0);
+			return true;
+		}
+	}
+
+	/**
+	 * Activity Result Reception
+	 */
+	@Override
+	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+		super.onActivityResult(requestCode, resultCode, data);
+		try {
+			Log.d(TAG, "@@@@@@@@ [onActivityResult] @@@@@@@@");
+			if (resultCode == RESULT_OK) {
+				// PopupActivity 에서 FinishTimer 로 인하여 종료가 되었을 경우
+				// MainActivity 도 즉시 종료시킨다.
+				String code = (String) data.getExtras().get("Finish_Kind");
+				Log.d(TAG, "[onActivityResult] Finish_Kind : " + code);
+				if (code != null) {
+					if (code.equals("FinishTimer")) {
+						Log.d(TAG, "FinishTimer finish");
+						finish();
+					}
+				}
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] onActivityResult(int requestCode, int resultCode, Intent data)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+
+    /* ================================================================================================
+     * [Screen] Section
+     ================================================================================================ */
+
+	/**
+	 * Screen 에서 Screen 변경을 요청할 경우 호출된다.<br>
+	 * Override 사용하여 Screen 변경을  처리한다.<br>
+	 *
+	 * @param nScreenId - 변경할 Screen ID
+	 * @return (boolean) true : 성공, false : 실패
+	 */
+	@Override
+    protected boolean onChangeScreen(int nScreenId) {
+		super.onChangeScreen(nScreenId);
+		return setChangeScreen(nScreenId, false);
+	}
+
+	/**
+	 * @param nScreenId - 변경할 Screen ID
+	 * @return (boolean) true : 성공, false : 실패
+	 **/
+	private boolean setTitleName(int nScreenId) {
+		boolean ret = false;
+		try {
+			Log.d(TAG, "[setTitleName] nScreenId [" + nScreenId + "]");
+			switch (nScreenId) {
+				case API_Menu.SubMenuCtrl.HDC_LivingLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.HDC_EachLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.LivingLightConfig:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_LivingLightConfig);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.OutSide_livingLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.OutSide_EachLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Heating_V2:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Heating);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Gas:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.DoorLock485:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.DoorLockWL:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.ChangAir_Normal:
+				case API_Menu.SubMenuCtrl.ChangAir_LH:
+				case API_Menu.SubMenuCtrl.ChangAir_Hood:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Inner_AirQuality:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Inner_AirInfo:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Concent:
+				case API_Menu.SubMenuCtrl.HDCLivingNEach_Concent:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.SystemAircon:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_SystemAircon);
+					ret = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Purity:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Purity);
+					ret = true;
+					break;
+
+				default:
+					Log.e(TAG, "[Error] setTitleName - nScreenId Not found!!! (" + mCurrentScreenId + ")");
+					//mCurrentScreenId = -1;
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					ret = false;
+					break;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setTitleName(int nScreenId)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return ret;
+	}
+
+	/**
+	 * Screen 등록자<br>
+	 * ScreenLayout 에 현재 Screen 을 삭제하고, 새로운 Screen 을 등록시킨다.
+	 *
+	 * @param nScreenId  - 변경할 Screen ID
+	 * @param OnlyRemove - 현재 Screen 을 삭제만 할 경우 (onDestroy 에서 사용)
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+    private boolean setChangeScreen(int nScreenId, boolean OnlyRemove) {
+		DebugLogOutput("setChangeScreen - " + "CurrentSelectDeviceId : " + mCurrentScreenId + " / NextLayoutId : " + nScreenId + " / OnlyRemove : " + OnlyRemove);
+
+		// 1. 현재 Layout 삭제
+        if (mCurrentScreenId > 0) {
+			ScreenLayout.removeAllViews();
+			super.setCurrentScreen(null);
+		}
+
+		if (OnlyRemove) return true;
+
+		mCurrentScreenId = nScreenId;
+		setTopBackBtnVisible(false);
+
+		boolean result = false;
+		// 2. 새로운 Layout 표시
+        try {
+			setTitleName(nScreenId);
+			super.setFinishTimerCreate(Common.FINISH_TIME_SEC);
+            switch (nScreenId) {
+                /**
+                 * [수정필요]
+                 * Back Button 필요한 화면은 setTopBackBtnVisible(true) 호출 필요
+                 * 추가 또는 수정해야할 부분 1. - 스크린 별 layout 생성
+                 * **/
+
+                //추가 또는 수정해야할 부분 1. - 스크린 별 layout 생성
+                case API_Menu.SubMenuCtrl.HDC_LivingLamp: {
+                    if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
+                        //  스마트 분전반
+                        lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+                        super.setCurrentScreen(lightHdcLivMainScreen);
+                        setTopBoilerBtnVisible(false);
+                        setAIRBackBtnVisible(false);
+                        setKccDimmBtnVisible(false);
+						setVentilBackBtnVisible(false);
+                        result = true;
+                        break;
+                    }
+                    else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+                        // KNX 분전반
+						// madeinlab 새로 만든 스크린으로 적용한다.
+                        lightKnxMainScreen = new LightKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+                        super.setCurrentScreen(lightKnxMainScreen);
+                        setTopBoilerBtnVisible(false);
+                        setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(false);
+						setVentilBackBtnVisible(false);
+						setManualBtnVisible(false, 1019);
+						result = true;
+						break;
+					}
+				}
+
+				/*case API_Menu.SubMenuCtrl.HDC_EachLamp:
+				{
+					if( (SmartDistUse == 1) && (KnxDistUse == false) ) // 스마트분전반 O / KNX 분전반 X
+					{
+						lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+						super.setCurrentScreen(lightHdcLivMainScreen);
+						setTopBoilerBtnVisible(false);
+						setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(false);
+						result = true;
+						break;
+					}
+					else if( (SmartDistUse == 0) && (KnxDistUse == true) ) // 스마트분전반 X / KNX 분전반 O
+					{
+						lightHdcLivKnxMainScreen = new LightHdcLivKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+						super.setCurrentScreen(lightHdcLivKnxMainScreen);
+						setTopBoilerBtnVisible(false);
+						setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(false);
+						result = true;
+						break;
+					}
+				}*/
+
+				case API_Menu.SubMenuCtrl.LivingLightConfig:
+					lightHdcLivConifgScreen = new LightHdcLivConifgScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(lightHdcLivConifgScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+					//OutSide_EachLamp
+				case API_Menu.SubMenuCtrl.OutSide_EachLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					lightEtcEachMainScreen = new LightEtcEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+					super.setCurrentScreen(lightEtcEachMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(true);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.OutSide_livingLamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					lightEtcLivMainScreen = new LightEtcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(lightEtcLivMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(true);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+					lightHdcNEachMainScreen = new LightHdcNEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+					super.setCurrentScreen(lightHdcNEachMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(true);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+				case API_Menu.SubMenuCtrl.Heating_V1:
+				case API_Menu.SubMenuCtrl.Heating_V2:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Heating);
+					try {
+						if(wpapi.GetHeatingKind() == 1)
+						{
+							heatingV1MainScreen = new HeatingV1MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
+							super.setCurrentScreen(heatingV1MainScreen);
+							if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+								//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
+							}
+						}
+						else
+						{
+							heatingV2MainScreen = new HeatingV2MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
+							super.setCurrentScreen(heatingV2MainScreen);
+							if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+								//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
+							}
+						}
+					}
+					catch (Exception e)
+					{
+						heatingV2MainScreen = new HeatingV2MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Heating);
+						super.setCurrentScreen(heatingV2MainScreen);
+						if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+							//setTopBoilerBtnVisible(true); // 임시 강제 생성코드
+						}
+					}
+
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Gas:
+					try {
+						if(wpapi.GetGasKind() == 1)
+						{
+							SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+							gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+							super.setCurrentScreen(gasMainScreen);
+						}
+						else if(wpapi.GetGasKind() == 2)
+						{
+							SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+							hybridCookTopMainScreen = new HybridCookTopMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+							super.setCurrentScreen(hybridCookTopMainScreen);
+						}
+						else
+						{
+							SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+							gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+							super.setCurrentScreen(gasMainScreen);
+						}
+					}
+					catch (Exception e)
+					{
+//						SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+//						gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+//						super.setCurrentScreen(gasMainScreen);
+					}
+
+//					SetTitleText(API_Menu.SubMenuCtrl.Name_Gas);
+//					gasMainScreen = new GasMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+//					super.setCurrentScreen(gasMainScreen);
+
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.DoorLock485:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
+					doorLockMainScreen = new DoorLockMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.DoorLock485);
+					super.setCurrentScreen(doorLockMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.DoorLockWL:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_DoorLock);
+					doorLockMainScreen = new DoorLockMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.DoorLockWL);
+					super.setCurrentScreen(doorLockMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.ChangAir_Normal:
+				case API_Menu.SubMenuCtrl.ChangAir_LH:
+				case API_Menu.SubMenuCtrl.ChangAir_Hood:
+					if(isUseModelHouse_Venti)
+					{
+						SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+						ventilationModelMainScreen = new VentilationModelMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+						super.setFinishTimerDestroy();
+						super.setCurrentScreen(ventilationModelMainScreen);
+						setTopBoilerBtnVisible(false);
+						setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(false);
+						setVentilBackBtnVisible(false);
+						result = true;
+					}
+					else
+					{
+						Log.e(TAG, "[setChangeScreen] getAirSensorAPUsage [" + getAirSensorAPUsage() + "], Support.InnerCycle [" + VentilStatus.Support.InnerCycle + "], Support.OutAirClean [" + VentilStatus.Support.OutAirClean + "]");
+						if (getAirSensorAPUsage() && VentilStatus.Support.InnerCycle && VentilStatus.Support.OutAirClean) {
+							if(isUseModelHouse_Venti)
+							{
+								ventilationModelMainScreen = new VentilationModelMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+								super.setCurrentScreen(ventilationModelMainScreen);
+								super.setFinishTimerDestroy();
+							}
+							else
+							{
+								if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+									//고급향은 환기가 3개임. KNX 쪽으로 우선 분기를 태움.
+									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+									knxVentiMainScreen = new KnxVentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+									super.setCurrentScreen(knxVentiMainScreen);
+								}
+								else {
+									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+									ventilationMainScreen = new VentilationMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+									super.setCurrentScreen(ventilationMainScreen);
+								}
+							}
+							setTopBoilerBtnVisible(false);
+							setAIRBackBtnVisible(false);
+							setKccDimmBtnVisible(false);
+							setVentilBackBtnVisible(false);
+							result = true;
+						}
+						else {
+							if (GetEasyModeUXUse() == true) {
+								SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+								ventiEasymodeScreen = new VentiEasymodeScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+								super.setCurrentScreen(ventiEasymodeScreen);;
+								setTopBoilerBtnVisible(false);
+								setAIRBackBtnVisible(false);
+								setKccDimmBtnVisible(false);
+								setVentilBackBtnVisible(false);
+								result = true;
+
+							}
+							else {
+								if (VentilStatus.Support2.WindowVenti) {
+									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+									ventiMainScreen = new VentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+									super.setCurrentScreen(ventiMainScreen);
+								}
+								else {
+									if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+										SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+										knxVentiMainScreen = new KnxVentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+										super.setCurrentScreen(knxVentiMainScreen);
+										setManualBtnVisible(false, 1019);
+									}
+									else {
+										SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+									ventilationMainScreen = new VentilationMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, nScreenId);
+									super.setCurrentScreen(ventilationMainScreen);
+
+
+
+//									SetTitleText(API_Menu.SubMenuCtrl.Name_Venti);
+//									ventiMainScreen = new VentiMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, API_Menu.SubMenuCtrl.ChangAir_Normal);
+//									super.setCurrentScreen(ventiMainScreen);
+									}
+								}
+								setTopBoilerBtnVisible(false);
+								setAIRBackBtnVisible(false);
+								setKccDimmBtnVisible(false);
+								setVentilBackBtnVisible(false);
+								result = true;
+							}
+						}
+					}
+
+					break;
+
+				case API_Menu.SubMenuCtrl.Inner_AirQuality:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
+					airQualityMainScreen = new AirQualityMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(airQualityMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Inner_AirInfo:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
+					dustInfoScreen = new DustInfoScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(dustInfoScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Concent:
+					if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+						SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
+						concentKnxMainScreen = new ConcentKnxMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+						super.setCurrentScreen(concentKnxMainScreen);
+						setManualBtnVisible(false, 1019);
+					}
+					else {
+						SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
+						concentMainScreen = new ConcentMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mDefaultRoomNameList_Light);
+						super.setCurrentScreen(concentMainScreen);
+						setManualBtnVisible(getManualUse(), 1019);
+					}
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.HDCLivingNEach_Concent:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Concent);
+					concentHdcNEachMainScreen = new ConcentHdcNEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+					super.setCurrentScreen(concentHdcNEachMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					setManualBtnVisible(false, 1019);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Electric_Range:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_ElectricRange);
+					electricRangeMainScreen = new ElectricRangeMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(electricRangeMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.Cooktop_Concent:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_CooktopConcent);
+					cookTopConcentMainScreen = new CookTopConcentMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(cookTopConcentMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				case API_Menu.SubMenuCtrl.SystemAircon:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_SystemAircon);
+					systemAirconMainScreen = new SystemAirconMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mDefaultRoomNameList);
+					super.setCurrentScreen(systemAirconMainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					setManualBtnVisible(false, 1019);
+					result = true;
+					break;
+
+                case API_Menu.SubMenuCtrl.Purity:
+                    SetTitleText(API_Menu.SubMenuCtrl.Name_Purity);
+                    purityMainScreen = new PurityMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mDefaultRoomNameList);
+                    super.setCurrentScreen(purityMainScreen);
+                    setTopBoilerBtnVisible(false);
+                    setAIRBackBtnVisible(false);
+                    setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+                    result = true;
+                    break;
+
+
+				case API_Menu.SubMenuCtrl.Curtain:
+					SetTitleText(API_Menu.SubMenuCtrl.Name_Curtain);
+					curTainV1MainScreen = new CurTainV1MainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+					super.setCurrentScreen(curTainV1MainScreen);
+					setTopBoilerBtnVisible(false);
+					setAIRBackBtnVisible(false);
+					setKccDimmBtnVisible(false);
+					setVentilBackBtnVisible(false);
+					result = true;
+					break;
+
+				default:
+					Log.i(TAG, "[Error] setChangeScreen - nScreenId Not found!!! (" + mCurrentScreenId + ")");
+					if (Version.getGatewayUsage()) {
+						// 게이트웨이 사용
+						SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+						lightHdcLivMainScreen = new LightHdcLivMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE);
+						super.setCurrentScreen(lightHdcLivMainScreen);
+						setTopBoilerBtnVisible(false);
+						setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(false);
+						setVentilBackBtnVisible(false);
+					}
+					else {
+						// 게이트웨이 미사용
+						SetTitleText(API_Menu.SubMenuCtrl.Name_Lamp);
+						lightEtcEachMainScreen = new LightEtcEachMainScreen(this, ScreenLayout, wpapi, OPERATION_MODE, mRoomNameList_Light);
+						super.setCurrentScreen(lightEtcEachMainScreen);
+						setTopBoilerBtnVisible(false);
+						setAIRBackBtnVisible(false);
+						setKccDimmBtnVisible(true);
+						setVentilBackBtnVisible(false);
+					}
+
+					result = false;
+					break;
+					//mCurrentScreenId = -1;
+					//return false;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setChangeScreen(int nScreenId, boolean OnlyRemove)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+		return result;
+	}
+
+	/**
+	 * 상단 타이틀 텍스트 수정
+	 *
+	 * @param SetText (String) 수정할 타이틀 이름
+	 **/
+    private void SetTitleText(String SetText) {
+        if (SetText != null) {
+			TopTitle.setText(SetText);
+		}
+	}
+
+    /* ================================================================================================
+     * [Menu Layout] Section
+     ================================================================================================ */
+
+	/**
+	 * 메뉴 레이아웃 생성
+	 **/
+    private void OpenMenuLayout() {
+		Log.i(TAG, "Enter OpenMenuLayout !!!");
+
+        if (MenuOpen == true) {
+			Log.e(TAG, "[OpenMenuLayout] MenuOpen");
+			return;
+		}
+
+        if (menueListDataClass == null) {
+			Log.e(TAG, "[OpenMenuLayout] menueListDataClass is null");
+			return;
+		}
+
+		//0. 현재 ID 및 리스트 불러오기
+		String Title = API_Menu.GetGroupNameByID((mCurrentScreenId / 1000) * 1000);
+		String TempChildName = null;
+		int ChooseGroup = 0;
+		int ChooseChild = 0;
+
+        for (int i = 0; i < menueListDataClass.arrayGroup.size(); i++) {
+            if (menueListDataClass.arrayGroup.get(i).equals(Title)) {
+				ChooseGroup = i;
+				break;
+			}
+		}
+		Log.i(TAG, "[OpenMenuLayout] - ChooseGroup = " + ChooseGroup);
+
+        for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
+            if (menueListDataClass.idMappingTable[i].Id == mCurrentScreenId) {
+				TempChildName = menueListDataClass.idMappingTable[i].Name;
+				break;
+			}
+		}
+		Log.i(TAG, "[OpenMenuLayout] - TempChildName = " + TempChildName);
+
+        if (TempChildName == null) {
+			Log.e(TAG, "TempChildName is null");
+			return;
+		}
+
+        for (int i = 0; i < menueListDataClass.arrayChild.get(Title).size(); i++) {
+            if (menueListDataClass.arrayChild.get(Title).get(i).equals(TempChildName) == true) {
+				ChooseChild = i;
+				break;
+			}
+		}
+
+		//1. 기존 화면 투명도 변경
+		TopLayout.setAlpha(0.5f);
+		ScreenLayout.setAlpha(0.5f);
+
+		//2. Layout 생성 및 처리 이벤트 등록
+		MenuLayout = new RelativeLayout(this);
+		WpadUtil.LayoutRegistration(AllLayout, MenuLayout, 1280, 800, 0, 0, ID.main.layout.MENU);
+        MenuLayout.setOnTouchListener(new OnTouchListener() {
+			@Override
+            public boolean onTouch(View v, MotionEvent event) {
+                if (event.getAction() == MotionEvent.ACTION_UP) {
+					setFinishTimerReset();
+					CloseMenuLayout();
+				}
+				return true;
+			}
+		});
+
+		//3. 배경 이미지 생성 및 에니메이션 등록
+		MenuBackground = new WpadImageView(this, TOUCH_KIND.BUTTON, 460, 800, R.drawable.bg_menu, R.drawable.bg_menu, ID.main.image.TAB_BACKGROUND);
+		TranslateAnimation anim = new TranslateAnimation(WpadScale.getWidth(-460), 0, 0, 0);
+		anim.setDuration(200);
+		anim.setInterpolator(new AccelerateInterpolator());
+		MenuLayout.setAnimation(anim);
+		ViewRegistration(MenuLayout, MenuBackground, 0, 0);
+
+		//4. 타이틀 등록
+		MenuTitle = new WpadTextView(this, false, 247, 80, Gravity.LEFT, Color.WHITE, Common.fontsize._44, true, ID.main.text.TITLE);
+		ViewRegistration(MenuLayout, MenuTitle, 133, 15);
+		MenuTitle.setText(Title);
+
+		//5. 종료 버튼 등록
+		MenuClose = new WpadImageView(this, TOUCH_KIND.BUTTON, 80, 80, R.drawable.topbar_icon_close_normal, R.drawable.topbar_icon_close_pressed, ID.main.button.MENUCLOSE);
+		MenuClose.setTouchDelayMs(1000);
+		ViewRegistration(MenuLayout, MenuClose, 380, 15);
+
+		//6. 리스트뷰 초기화 및 등록
+		mListView = new ExpandableListView(this);
+		ExpandableListView.LayoutParams params = new ExpandableListView.LayoutParams(WpadScale.getWidth(460), WpadScale.getHeight(690));
+		mListView.setLayoutParams(params);
+		mListView.setX(WpadScale.getWidth(0));
+		mListView.setY(WpadScale.getHeight(112));
+		mListView.setBackgroundColor(Color.BLACK);
+		mListView.setId(ID.main.liveview.lv);
+		mListView.setGroupIndicator(null);
+		mListView.setDividerHeight(0);
+		mListView.setDivider(null);
+		mListView.setFocusable(true);
+		mListView.setSmoothScrollbarEnabled(true);
+		mListView.setTranscriptMode(android.widget.AbsListView.TRANSCRIPT_MODE_DISABLED);
+		mListView.setScrollbarFadingEnabled(true);
+
+		MenuLayout.addView(mListView);
+		adptMain = new Menu_AdptMain(this, menueListDataClass.arrayGroup, menueListDataClass.arrayChild, ChooseGroup, ChooseChild);
+		mListView.setAdapter(adptMain);
+
+		//7. 선택된 그룹 열기
+		mListView.setSelectedGroup(ChooseGroup);
+		mListView.expandGroup(ChooseGroup);
+
+		// 8. 리스트뷰 터치 이벤트 등록
+        mListView.setOnTouchListener(new OnTouchListener() {
+
+			@Override
+            public boolean onTouch(View v, MotionEvent event) {
+				if ((event.getAction() == MotionEvent.ACTION_DOWN) ||
+                        (event.getAction() == MotionEvent.ACTION_UP)) {
+					WpadActivity.setFinishTimerReset();
+				}
+				return false;
+			}
+		});
+
+		// 9. 그룹 터치 이벤트 등록
+        mListView.setOnGroupClickListener(new OnGroupClickListener() {
+			@Override
+            public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
+				DebugLogOutput("group click = " + groupPosition);
+				WpadActivity.setFinishTimerReset();
+				return false;
+			}
+		});
+
+		// 10. 차일드 터치 이벤트 등록
+        /*
+        mListView.setOnChildClickListener(new OnChildClickListener()
+        {
+            @Override
+            public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)
+            {
+                DebugLogOutput("onChildClick");
+                DebugLogOutput("groupPosition = " + groupPosition);
+                DebugLogOutput("childPosition = " + childPosition);
+                WpadActivity.setFinishTimerReset();
+                return false;
+            }
+        });
+        */
+
+		// 11. 그룹 열리는 경우 이벤트
+        mListView.setOnGroupExpandListener(new OnGroupExpandListener() {
+			@Override
+            public void onGroupExpand(int groupPosition) {
+				DebugLogOutput("groupPosition Open Event = " + groupPosition);
+				Sound().Play(SND.effect.TOUCH_LATCHED);
+				WpadActivity.setFinishTimerReset();
+			}
+		});
+
+		// 12. 그룹 닫히는 경우 이벤트
+        mListView.setOnGroupCollapseListener(new OnGroupCollapseListener() {
+			@Override
+            public void onGroupCollapse(int groupPosition) {
+				DebugLogOutput("groupPosition Close Event = " + groupPosition);
+				Sound().Play(SND.effect.TOUCH_LATCHED);
+				WpadActivity.setFinishTimerReset();
+			}
+		});
+
+		// 13. MenuOpen True 설정
+		MenuOpen = true;
+	}
+
+	/**
+	 * 메뉴 layout 닫힘 처리
+	 **/
+    private void CloseMenuLayout() {
+        if (MenuOpen == false) {
+			return;
+		}
+
+		TranslateAnimation anim = new TranslateAnimation(0, WpadScale.getWidth(-460), 0, 0);
+		anim.setDuration(200);
+		anim.setInterpolator(new AccelerateInterpolator());
+        anim.setAnimationListener(new AnimationListener() {
+			@Override
+            public void onAnimationStart(Animation animation) {
+				MenuOpen = false;
+			}
+
+			@Override
+            public void onAnimationRepeat(Animation animation) {
+			}
+
+			@Override
+            public void onAnimationEnd(Animation animation) {
+				AllLayout.removeView(MenuLayout);
+				TopLayout.setAlpha(1.0f);
+				ScreenLayout.setAlpha(1.0f);
+			}
+		});
+
+		MenuLayout.startAnimation(anim);
+	}
+
+	/**
+	 * 메뉴 그룹 터치시 처리 (Menu_AdptMain에서 호출)
+	 **/
+    public static void SetListViewGroupExpand_Collapse(int GroupID, boolean ExpandEnable) {
+        if (ExpandEnable) {
+			mListView.expandGroup(GroupID);
+        }
+        else {
+			mListView.collapseGroup(GroupID);
+		}
+	}
+
+	/**
+	 * Menu정보가 DB에 없을 경우 불러올 스크린 로딩
+	 *
+	 * @return MenuListDataClass 타입의 초기정보
+	 **/
+	private MenuListDataClass loadDefaultMenuList() {
+		try {
+			MenuListDataClass tempMenuListDataClass = new MenuListDataClass();
+			tempMenuListDataClass.SetArrayGroup(API_Menu.SubMenuCtrl.Name);
+
+			ArrayList<String> arrayList = new ArrayList<String>();
+
+			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
+			int nAirQualitySensorUsage = mWallpadDeviceSet.GetDeviceSetted("센서AP");
+			int[] nLightType = mWallpadDeviceSet.Get_Light_info();
+			int[] nDoorlockType = mWallpadDeviceSet.Get_DoorLock_Info();
+			int[] nVentilType = mWallpadDeviceSet.Get_Ventil_Info();
+			int nHeatingUsage = mWallpadDeviceSet.Get_Temper_Info();
+			int nGasValveUsage = mWallpadDeviceSet.Get_GAS_Info();
+			boolean bElecCooktopUsage = mWallpadDeviceSet.Get_ElectricRange_Use();
+			boolean bCooktopOutletUsage = mWallpadDeviceSet.Get_CookTopConcent_Use();
+			int nSystemAirconUsage = mWallpadDeviceSet.Get_AirCON_Info();
+			int nPurityUsage = mWallpadDeviceSet.Get_Purity_Info();
+			mWallpadDeviceSet.closeDB();
+
+			WallpadStatusData mWallpadStatusData = new WallpadStatusData(getContext());
+			boolean bElecOutletUsage = mWallpadStatusData.Get_MultiSwitch_Concent_Use();
+			mWallpadStatusData.closeDB();
+
+			int nChildCnt = 0;
+
+			//[수정필요]
+			//추가 또는 수정해야할 부분 1. - Menu정보가 DB에 없을 경우 불러올 스크린 종류(시작)
+			if (nLightType[0] == WallpadDeviceSet.DO_USE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_Lamp);
+				nChildCnt++;
+			}
+
+			if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
+				Log.i(TAG, "bElecOutletUsage = " + bElecOutletUsage + " @@@@@@@@@@@@@@@@");
+				Log.i(TAG, "MultiConcentExist = " + bMultiConcentExist + " @@@@@@@@@@@@@@@@");
+				if ((OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) || (nLightType[0] == 1 && bElecOutletUsage && bMultiConcentExist)) {
+					arrayList.add(API_Menu.SubMenuCtrl.Name_Concent);
+					nChildCnt++;
+				}
+			}
+
+			if (nHeatingUsage == WallpadDeviceSet.DO_USE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_Heating);
+				nChildCnt++;
+			}
+
+			if (nGasValveUsage == WallpadDeviceSet.DO_USE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_Gas);
+				nChildCnt++;
+			}
+
+			if (bCooktopOutletUsage) {
+				// 쿡탑콘센트
+				arrayList.add(API_Menu.SubMenuCtrl.Name_CooktopConcent);
+				nChildCnt++;
+				Log.i(TAG, "cooktopConcentUse = " + bCooktopOutletUsage + " @@@@@@@@@@@@@@@@");
+				Log.i(TAG, "Name_CooktopConcent Added ~~~ " + " @@@@@@@@@@@@@@@@");
+			}
+
+			if (bElecCooktopUsage) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_ElectricRange);
+				nChildCnt++;
+			}
+
+			if (nDoorlockType[0] == WallpadDeviceSet.DO_USE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_DoorLock);
+				nChildCnt++;
+			}
+
+			if (nVentilType[0] == WallpadDeviceSet.DO_USE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_Venti);
+				nChildCnt++;
+			}
+
+			//전동커튼
+			arrayList.add(API_Menu.SubMenuCtrl.Name_Curtain);
+			nChildCnt++;
+
+			if (nSystemAirconUsage != WallpadDeviceSet.SYSTEMAIRCON_NONE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_SystemAircon);
+				nChildCnt++;
+			}
+
+			if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
+					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
+			{
+				if (!bKitchenLightonLivingEM &&(nDistributionPanelType != Version.DISTRIBUTION_MODEL.KNX_DIST)) {
+					// knx분전반은 거실조명 그룹설정 메뉴에서 빠짐
+					arrayList.add(API_Menu.SubMenuCtrl.Name_LivingLightConfig);
+					nChildCnt++;
+				}
+
+				if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+					arrayList.add(API_Menu.SubMenuCtrl.Name_Concent);
+					nChildCnt++;
+				}
+
+				if (nPurityUsage == WallpadDeviceSet.DO_USE) {
+					arrayList.add(API_Menu.SubMenuCtrl.Name_Purity);
+					nChildCnt++;
+				}
+			}
+
+			if (nAirQualitySensorUsage == WallpadDeviceSet.DEV_DATA_ENABLE) {
+				arrayList.add(API_Menu.SubMenuCtrl.Name_InnerAirQuality);
+				nChildCnt++;
+				arrayList.add(API_Menu.SubMenuCtrl.Name_InnerAirInfo);
+				nChildCnt++;
+			}
+
+			//추가 또는 수정해야할 부분 1. - Menu정보가 DB에 없을 경우 불러올 스크린 종류(끝)
+			Log.i(TAG, "childCount = " + nChildCnt);
+
+			tempMenuListDataClass.SetArrayChild(API_Menu.SubMenuCtrl.Name, arrayList);
+			tempMenuListDataClass.idMappingTable = new ChildIDMapping[nChildCnt];
+			for (int i = 0; i < nChildCnt; i++) {
+				tempMenuListDataClass.idMappingTable[i] = new ChildIDMapping();
+
+				//[수정필요]
+				//추가 또는 수정해야할 부분 2. - 불러올 스크린의 ID를 임의로 입력(시작)
+				if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Lamp)) {
+					if (Version.getGatewayUsage()) {
+						if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
+								|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDCLivingNEach_Lamp;
+							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+						}
+						else {
+							if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
+								//  스마트 분전반
+								tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
+								tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+							}
+							else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+								// KNX 분전반
+								tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
+								tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+							}
+							else {
+								tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.HDC_LivingLamp;
+								tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+							}
+						}
+					}
+					else {
+						if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_LIVING) {
+							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.OutSide_livingLamp;
+							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+						}
+						else if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
+							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.OutSide_EachLamp;
+							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Lamp;
+						}
+					}
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Concent)) {
+					if (nLightType[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
+						if ((OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) || (bElecOutletUsage && bMultiConcentExist)) {
+							tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Concent;
+							tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Concent;
+						}
+					}
+					else if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Concent;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Concent;
+					}
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Gas)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Gas;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Gas;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_CooktopConcent)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Cooktop_Concent;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_CooktopConcent;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_DoorLock)) {
+					if (nDoorlockType[1] == DOORLOCK_TYPE_NORMAL) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLock485;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
+					}
+					else if (nDoorlockType[1] == DOORLOCK_TYPE_RF) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLockWL;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
+					}
+					else if (nDoorlockType[1] == DOORLOCK_TYPE_FINGERPRINT) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.DoorLockWL;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_DoorLock;
+					}
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Venti)) {
+					Log.d(TAG, "[loadDefaultMenuList] nVentilType[1] = " + nVentilType[1]);
+					if (nVentilType[1] == WallpadDeviceSet.VENTIL_TYPE_NORMAL) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.ChangAir_Normal;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Venti;
+					}
+					else if (nVentilType[1] == WallpadDeviceSet.VENTIL_TYPE_LH) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.ChangAir_LH;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Venti;
+					}
+					else if (nVentilType[1] == WallpadDeviceSet.VENTIL_TYPE_HOOD) {
+						tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.ChangAir_Hood;
+						tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Venti;
+					}
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Heating)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Heating_V2;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Heating;
+				}
+				/*
+				//확인 필요
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Heating)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Heating_V1;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Heating;
+				}
+				*/
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_Curtain)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Curtain;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_Curtain;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_InnerAirQuality)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Inner_AirQuality;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_InnerAirQuality;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_InnerAirInfo)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Inner_AirInfo;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_InnerAirInfo;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_ElectricRange)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.Electric_Range;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_ElectricRange;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_SystemAircon)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.SystemAircon;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_SystemAircon;
+				}
+				else if (arrayList.get(i).equals(API_Menu.SubMenuCtrl.Name_LivingLightConfig)) {
+					tempMenuListDataClass.idMappingTable[i].Id = API_Menu.SubMenuCtrl.LivingLightConfig;
+					tempMenuListDataClass.idMappingTable[i].Name = API_Menu.SubMenuCtrl.Name_LivingLightConfig;
+				}
+				else {
+					Log.w(TAG, "[loadDefaultMenuList] arrayList.get(" + i + ") is not supported menu!!");
+				}
+				//추가 또는 수정해야할 부분 2. - 불러올 스크린의 ID를 임의로 입력(끝)
+			}
+			return tempMenuListDataClass;
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] loadDefaultMenuList()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return null;
+		}
+	}
+
+	/**
+	 * Menu Event intent filter 등록
+	 **/
+	private void reg_Receiver() {
+		try {
+			IntentFilter filter = new IntentFilter();
+			filter.addAction("MENU_EVENT");
+			registerReceiver(mWallPadAlertBR, filter);
+
+			filter = new IntentFilter();
+			filter.addAction(define.NOTIFY_DAIL);
+			filter.addAction("WALLPAD_DIAL_GLOBALSCREEN_TOUCH");
+			registerReceiver(mWallPadJogBR, filter);
+
+			filter = new IntentFilter();
+			filter.addAction(ID.main.BR_KCC_DIM);
+			registerReceiver(mKccDimmBR, filter);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] reg_Receiver()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * 조그버튼 입력 받을 시 처리
+	 **/
+    BroadcastReceiver mWallPadJogBR = new BroadcastReceiver() {
+		@Override
+        public void onReceive(Context context, Intent intent) {
+			WpadActivity.setFinishTimerReset();
+		}
+	};
+
+	/**
+	 * KCC디밍조절기 BR 등록
+	 **/
+    BroadcastReceiver mKccDimmBR = new BroadcastReceiver() {
+		@Override
+        public void onReceive(Context context, Intent intent) {
+			WpadActivity.setFinishTimerReset();
+
+			DebugLogOutput("[mKccDimmBR] - onReceive - mKccDimmBR");
+			Device_Update_Dimming(false, (byte)0);
+			Draw_Update_DimmBtn();
+		}
+	};
+
+	/**
+	 * 메뉴에서 버튼 터치 처리
+	 **/
+    BroadcastReceiver mWallPadAlertBR = new BroadcastReceiver() {
+		@Override
+        public void onReceive(Context context, Intent intent) {
+		int groupPosition = intent.getIntExtra("groupPosition", -1);
+		int childPosition = intent.getIntExtra("childPosition", -1);
+
+		Log.i(TAG, "[mWallPadAlertBR] groupPosition :" + groupPosition + ", childPosition :" + childPosition);
+		if ((groupPosition >= 0) && (childPosition >= 0)) {
+			if (MenuOpen == true) {
+				Sound().Play(SND.effect.TOUCH_LATCHED);
+				CloseMenuLayout();
+
+				if (menueListDataClass == null) {
+					return;
+				}
+				String childName = menueListDataClass.arrayChild.get(menueListDataClass.arrayGroup.get(groupPosition)).get(childPosition);
+				for (int i = 0; i < menueListDataClass.idMappingTable.length; i++) {
+					if (menueListDataClass.idMappingTable[i].Name.equals(childName)) {
+						API_Menu api_Menu = new API_Menu();
+						int TempID = api_Menu.GetMyGroupID(getApplicationContext().getPackageName());
+						int ChildID = menueListDataClass.idMappingTable[i].Id;
+						int ChildGroupID = (ChildID / 1000) * 1000;
+						Log.i(TAG, "[mWallPadAlertBR] Child ID :" + ChildID);
+
+						if (TempID == 0) {
+							return;
+						}
+
+						if (ChildGroupID == TempID) {
+							//해당 APP내에서 스크린 전환 필요
+							//[수정필요]
+							if (OPERATION_MODE == Common.MODE_NOMAL) {
+								mTempCurrentScreenId = ChildID;
+								mWallPadApiCheckHandler.sendEmptyMessage(0);
+							}
+							else {
+								boolean result = setChangeScreen(ChildID, false);
+								if (result == false) {
+									setChangeScreen(API_Menu.SubMenuCtrl.HDC_LivingLamp, false);
+								}
+							}
+							WpadActivity.setFinishTimerReset();
+						}
+						else {
+							//외부 앱 호출 후, 본 APP Finish 필요
+							api_Menu.startSubScreenActivity(getApplicationContext(), menueListDataClass.idMappingTable[i].Id, API_Menu.MENU_START_OPTION_1, api_Menu.GetAPK_Name_ByID(ChildGroupID));
+							Intent mIntent = new Intent();
+							mIntent.putExtra("Finish_Kind", "HomeButton");
+							MainActivity.this.setResult(RESULT_OK, mIntent);
+							finish();
+						}
+						break;
+					}
+				}
+			}
+		}
+		}
+	};
+
+	/**
+	 * 디바이스 서비스 APP 을 체크하여 실행되어있지 않을시 실행시킨다.
+	 */
+	private void StartDevService() {
+		try {
+			ActivityManager am = (ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
+			List<ActivityManager.RunningAppProcessInfo> appList = am.getRunningAppProcesses();
+
+			boolean DevServiceExist = false;
+            for (int i = 0; i < appList.size(); i++) {
+				ActivityManager.RunningAppProcessInfo rapi = appList.get(i);
+				Log.i(TAG, "App List i = " + i + " / name = " + rapi.getClass().getName());
+
+                if (rapi.processName.equals("com.artncore.deviceservice")) {
+					Log.d(TAG, "Filter 1 : Service already running");
+					DevServiceExist = true;
+					break;
+				}
+			}
+
+			ActivityManager am2 = (ActivityManager)getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
+			List<ActivityManager.RunningServiceInfo> rs = am2.getRunningServices(1000);
+
+            for (int i = 0; i < rs.size(); i++) {
+				ActivityManager.RunningServiceInfo rsi = rs.get(i);
+				//Log.d("run service","Package Name " + i + " = " + rsi.service.getPackageName());
+				//Log.d("run service","Class Name : " + i + " = " + rsi.service.getClassName());
+                if (rsi.service.getPackageName().equals("com.artncore.deviceservice")) {
+					Log.d(TAG, "Filter 2 : Service already running");
+					DevServiceExist = true;
+					break;
+				}
+			}
+
+            if (!DevServiceExist) {
+				Log.d(TAG, "Call Service Start");
+				Intent intent = new Intent("wallpaddevservice.ServiceMain");
+				startService(intent);
+
+                try {
+					Thread.sleep(3000);
+                } catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e) {
+                	Log.e(TAG, "[Exception] StartDevService().sleep(...)");
+				}
+			}
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.w(TAG, "[Exception] StartDevService()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+
+	/**
+	 * DB 에서 룸이름 정보를 가져온다.
+	 *
+	 * @return (String []) null - 실패, not null
+	 */
+	private String[] getRoomNameFromDB() {
+		try {
+			WallpadStatusData wallpadStatusData = new WallpadStatusData(getContext().getApplicationContext());
+			String[] RoomNameList = wallpadStatusData.GetDevRoomName();
+			wallpadStatusData.closeDB();
+            if (RoomNameList == null) {
+				Log.e(TAG, "[getRoomNameFromDB] - RoomNameList is null !!!");
+				return null;
+			}
+
+            if (RoomNameList.length != 6) {
+				Log.e(TAG, "[getRoomNameFromDB.length Not Match (" + RoomNameList.length + ")");
+				return null;
+			}
+
+            if (DEBUG_LOG_ON) {
+				for (int i = 0; i < RoomNameList.length; i++)
+					DebugLogOutput("[getRoomNameFromDB] RoomNameList[" + i + "] " + RoomNameList[i]);
+			}
+
+			return RoomNameList;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] getRoomNameFromDB()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return null;
+	}
+
+	/**
+	 * DB 에서 룸이름 정보를 가져온다. 난방, 조명 개발 명칭 가져오기
+	 *
+	 * @param Device - int
+	 * @return (String []) null - 실패, not null
+	 */
+
+	private String[] getRoomNameFromDB(int Device) {
+		try {
+			String[] RoomNameList = null;
+			WallpadStatusData wallpadStatusData = new WallpadStatusData(getContext().getApplicationContext());
+
+            if (Device == HEATING) {
+				RoomNameList = wallpadStatusData.GetDevRoomName("heating");
+            }
+            else {
+				RoomNameList = wallpadStatusData.GetDevRoomName("light");
+			}
+
+			wallpadStatusData.closeDB();
+            if (RoomNameList == null) {
+				Log.e(TAG, "[DB_GetRoomName] - RoomNameList is null !!!");
+				return null;
+			}
+
+            if (RoomNameList.length != 6) {
+				Log.e(TAG, "[DB_GetRoomName] - RoomNameList.length Not Match (" + RoomNameList.length + ")");
+				return null;
+			}
+
+            if (DEBUG_LOG_ON) {
+				for (int i = 0; i < RoomNameList.length; i++)
+					DebugLogOutput("RoomNameList[" + i + "] " + RoomNameList[i]);
+			}
+
+			return RoomNameList;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] DB_GetRoomName(int Device)");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return null;
+	}
+
+	/**
+	 * DB에서 방 이름을 가져와서 방 명칭 관련 변수에 값을 넣는다.
+	 **/
+	private void GetRoomName() {
+		try {
+			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(getContext().getApplicationContext());
+			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
+			wallpadDeviceSet.closeDB();
+
+			Log.e(TAG, "[GetRoomName] UseEachRoomName = " + UseEachRoomName);
+
+			if (UseEachRoomName == false) {
+				// 명칭 통합사용
+				if (nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
+					// SK건설
+					mRoomNameList_Light = mDefaultRoomNameList_Light_SK;
+					mRoomNameList_Heating = mDefaultRoomNameList_Heating_SK;
+				}
+				else {
+					mRoomNameList_Light = getRoomNameFromDB();
+					if (mRoomNameList_Light == null) {
+						mRoomNameList_Light = mDefaultRoomNameList;
+					}
+
+					if (GetEasyModeUXUse()) {
+						mRoomNameList_Heating = mDefaultRoomNameList_Heating_easymode;
+					}
+					else {
+						mRoomNameList_Heating = getRoomNameFromDB();
+						if (mRoomNameList_Heating == null) {
+							mRoomNameList_Heating = mDefaultRoomNameList;
+						}
+					}
+				}
+			}
+			else {
+				// 명칭 난방, 조명 분리 사용
+				mRoomNameList_Light = getRoomNameFromDB(LIGHT);
+				if (mRoomNameList_Light == null) {
+					mRoomNameList_Light = mDefaultRoomNameList_Light;
+				}
+
+				if (GetEasyModeUXUse()) {
+					mRoomNameList_Heating = mDefaultRoomNameList_Heating_easymode;
+				}
+				else {
+					mRoomNameList_Heating = getRoomNameFromDB(HEATING);
+					if (mRoomNameList_Heating == null) {
+						mRoomNameList_Heating = mDefaultRoomNameList_Heating;
+					}
+				}
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetRoomName()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	/**
+	 * TOP 에 보일러 아이콘 활성화 & 비활성화
+	 *
+	 * @param Enabled - true : 활성화,  false : 비활성화
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean setTopBoilerBtnVisible(boolean Enabled) {
+		try {
+			if (Enabled == true) {
+				Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 0");
+                if (TopBoilerBtn.getVisibility() != View.VISIBLE) {
+					Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 1");
+					if (TopBackBtn.getVisibility() == View.VISIBLE) {
+						// 1019
+						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 2");
+						WpadUtil.ViewMove(TopBoilerBtn, 893, 0);
+						WpadUtil.ViewMove(TopManualBtn, 767, 0);
+                    }
+					else {
+						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 3-1");
+						WpadUtil.ViewMove(TopBoilerBtn, 1019, 0);
+						//WpadUtil.ViewMove(TopManualBtn, 893, 0);
+					}
+
+					if(TopBoilerBtn!=null) TopBoilerBtn.setVisibility(View.VISIBLE);
+					if(TopBoilerBtn!=null) TopBoilerBtn.bringToFront();
+
+                    if (TopBoilerBtn!=null && TopBoilerBtn.getVisibility() == View.VISIBLE) {
+						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 3-2");
+						WpadUtil.ViewMove(TopManualBtn, 893, 0);
+						//TopManualBtn.bringToFront();
+					}
+				}
+            }
+			else {
+				Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 4");
+                if (TopBoilerBtn.getVisibility() != View.INVISIBLE) {
+					Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 5");
+					TopBoilerBtn.setVisibility(View.INVISIBLE);
+
+                    if (TopBackBtn.getVisibility() == View.VISIBLE) {
+						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 6");
+						WpadUtil.ViewMove(TopManualBtn, 893, 0);
+                    }
+                    else {
+						Log.i(TAG, "[setTopBoilerBtnVisible] ENTER 7");
+						WpadUtil.ViewMove(TopManualBtn, 1019, 0);
+					}
+				}
+			}
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception ex) {
+			Log.e(TAG, "[Exception] setTopBoilerBtnVisible(boolean Enabled)");
+			//ex.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, ex);
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * 실내공기질 돌아가기 버튼 활성화 & 비활성화
+	 *
+	 * @param Enabled - true : 활성화,  false : 비활성화
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean setAIRBackBtnVisible(boolean Enabled) {
+		if (Enabled == true) {
+			if (TopAirBackBtn.getVisibility() != View.VISIBLE) TopAirBackBtn.setVisibility(View.VISIBLE);
+
+			TopAirBackBtn.bringToFront();
+
+            if (TopAirBackBtn.getVisibility() == View.VISIBLE) {
+				WpadUtil.ViewMove(TopManualBtn, 893, 0);
+			}
+			if(TopManualBtn!=null) TopManualBtn.setVisibility(View.INVISIBLE);
+		}
+		else {
+			if (TopAirBackBtn.getVisibility() != View.INVISIBLE) TopAirBackBtn.setVisibility(View.INVISIBLE);
+
+			if (TopAirBackBtn.getVisibility() == View.INVISIBLE) {
+				WpadUtil.ViewMove(TopManualBtn, 1019, 0);
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * 환기제어 돌아가기 버튼 활성화 & 비활성화
+	 *
+	 * @param Enabled - true : 활성화,  false : 비활성화
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+	public boolean setVentilBackBtnVisible(boolean Enabled) {
+		if (Enabled == true) {
+			if (BTN_TOP_BACK_VENTIL.getVisibility() != View.VISIBLE) BTN_TOP_BACK_VENTIL.setVisibility(View.VISIBLE);
+
+			BTN_TOP_BACK_VENTIL.bringToFront();
+
+			if (BTN_TOP_BACK_VENTIL.getVisibility() == View.VISIBLE) {
+				WpadUtil.ViewMove(TopManualBtn, 893, 0);
+			}
+
+			if(TopManualBtn!=null) TopManualBtn.setVisibility(View.INVISIBLE);
+		}
+		else {
+			if (BTN_TOP_BACK_VENTIL.getVisibility() != View.INVISIBLE) BTN_TOP_BACK_VENTIL.setVisibility(View.INVISIBLE);
+
+			if (BTN_TOP_BACK_VENTIL.getVisibility() == View.INVISIBLE) {
+				WpadUtil.ViewMove(TopManualBtn, 1019, 0);
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * 상단 KCC디밍조절 버튼 활성화 & 비활성화
+	 *
+	 * @param Enabled - true : 활성화,  false : 비활성화
+	 * @return (boolean) true : 성공,  false : 실패
+	 */
+    public void setKccDimmBtnVisible(boolean Enabled) {
+		WallpadDeviceSet wdst = new WallpadDeviceSet(getContext());
+		int dimmUse = wdst.GetDeviceSetted("KCC디밍제어기"); // 1: 사용안함 / 2: 사용함
+		wdst.closeDB();
+		Log.i(TAG, "[setKccDimmBtnVisible] - KCC Dimm : " + dimmUse);
+
+		// null, 사용안함 이면 안나오도록 한다.
+		if (dimmUse == 0 || dimmUse == 1) {
+			Log.w(TAG, "[setKccDimmBtnVisible] - KCC Dimm NOT USE !!!");
+			Enabled = false;
+			KccDimUse = 0;
+        }
+		else {
+			KccDimUse = 1;
+		}
+
+        for (int i = 0; i < TopDimmingBtn.length; i++) {
+            if (Enabled == true) {
+                if (TopDimmingBtn[i].getVisibility() != View.VISIBLE)
+                    TopDimmingBtn[i].setVisibility(View.VISIBLE);
+				TopDimmingBtn[i].bringToFront();
+            }
+            else {
+                if (TopDimmingBtn[i].getVisibility() != View.INVISIBLE)
+                    TopDimmingBtn[i].setVisibility(View.INVISIBLE);
+			}
+		}
+	}
+
+	/**
+	 * 조명제어기의 디밍 레벨을 조절한다.
+	 *
+	 * @param Level - 디밍레벨
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+    private int Device_SetDimmingLevel(byte Level) {
+		DebugLogOutput("[Device_SetAllDimmingLevel] - Start   (Level : " + Level + ")");
+
+		// 1. Api Load Check
+        if (ledDimmingAPI == null) {
+			Log.e(TAG, "[Device_SetAllDimmingLevel] ledDimmingAPI unload !!!");
+			return -1;
+		}
+
+		// 2. Param Range Check
+        if (mDimData.DimData.DeviceCnt == 0) {
+			Log.w(TAG, "[Device_SetAllDimmingLevel] mData.DeviceCnt == 0");
+			return -2;
+		}
+
+		// 3. Light Control
+        try {
+			int ret = ledDimmingAPI.SetDimmingLevel(0, Level);
+            if (ret < 0) {
+				Log.e(TAG, "[Device_SetAllDimmingLevel] SetAllDimmingLevel Error (" + ret + ")   ErrorCode = " + ledDimmingAPI.ErrorCode.ErrStr());
+				return -6;
+			}
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetAllDimmingLevel] - [Exception Error] ledDimmingAPI.SetAllDimmingLevel()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetAllDimmingLevel] - OK");
+
+		return 0;
+	}
+
+    private void Draw_Update_DimmBtn() {
+		// 디밍 표시
+		Log.i(TAG, "[Draw_Update_DimmBtn] - Dimming Draw Start");
+        if (mDimData.DimData == null) {
+			Log.w(TAG, "[Draw_Update_DimmBtn] - mDimData.DimData null");
+			return;
+        }
+        else {
+			Log.i(TAG, "[Draw_Update_DimmBtn] - mDimData.DimData normal");
+		}
+
+		byte Level = mDimData.DimData.Device[0].device.Level;
+		Log.i(TAG, "[Draw_Update_DimmBtn] - Level =" + Level);
+
+        for (int i = 0; i < 4; i++) {
+            if (Level == mLevelArray[i]) {
+				Log.i(TAG, "[Draw_Update_DimmBtn] - Same Level Button i = " + i);
+				TopDimmingBtn[i].setButtonRearImage();
+            }
+            else {
+				Log.i(TAG, "[Draw_Update_DimmBtn] - Diff Level Button i = " + i);
+				TopDimmingBtn[i].setButtonFrontImage();
+			}
+		}
+		Log.i(TAG, "[Draw_Update_DimmBtn] - Dimming Draw End");
+	}
+
+	/**
+	 * KCC 디밍제어기의 상태를 갱신한다.
+	 *
+	 * @param real - (boolean) true : 실시간 , false : 가장최근
+	 * @param index - (byte) 방 인덱스 (0~5개별방, Common.INDEX_ALL 전체)
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+    private int Device_Update_Dimming(boolean real, byte index) {
+		DebugLogOutput("[Device_Update_Dimming] - Start   (real : " + real + ", index:" + index + ")");
+
+		// 1. Api Load Check
+        if (ledDimmingAPI == null) {
+			Log.e(TAG, "[Device_Update_Dimming] ledDimmingAPI unload !!!");
+			return -1;
+		}
+
+		// 2. refresh
+        try {
+			int ret = ledDimmingAPI.Refresh(index, real);
+
+            if (ret < 0) {
+				Log.e(TAG, "[Device_Update_Dimming] Refresh(" + index + ", " + real + ")  ret = " + ret + " / ErrorCode = " + ledDimmingAPI.ErrorCode.ErrStr());
+				return -2;
+			}
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_Update_Dimming] - [Exception Error] ledDimmingAPI.Refresh(index:" + index + ", real:" + real + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		// 3. Range Check
+        if (ledDimmingAPI.data.DeviceCnt <= 0) {
+			Log.e(TAG, "[Device_Update_Dimming] - DeviceCnt Out of range !!! (DeviceCnt:" + ledDimmingAPI.data.DeviceCnt + ")");
+			return -10;
+		}
+
+		// 4. Data Copy
+		mDimData.DimData = ledDimmingAPI.data;
+
+		// 5. Debug Msg
+		DebugLogOutput("---------------------------------------");
+		DebugLogOutput("[Device_Update_Dimming]");
+		DebugLogOutput("---------------------------------------");
+		DebugLogOutput("DeviceCnt   = " + ledDimmingAPI.data.DeviceCnt);
+		byte DeviceCnt = ledDimmingAPI.data.DeviceCnt;
+		if (index == define.DEVICE_ALL_OR_NOTHING) {
+			for (byte i = 0; i < DeviceCnt; i++) {
+				DebugLogOutput(ledDimmingAPI.data.Device[i].info.ToDebugString(i));
+				DebugLogOutput(ledDimmingAPI.data.Device[i].device.ToDebugString(i));
+			}
+        }
+		else {
+			DebugLogOutput(ledDimmingAPI.data.Device[index].device.ToDebugString(index));
+		}
+		DebugLogOutput("---------------------------------------");
+
+		DebugLogOutput("[Device_Update_Dimming] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 현관호출 or 전화호출시 사용되는 keycode - Broadcast 을 송신한다.
+	 *
+	 * @param code - (int) 송신할 keycode
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int setSendEventBR(int code) {
+		try {
+			KeyEvent event = new KeyEvent(KeyEvent.ACTION_UP, code);
+			Intent intent = new Intent("EVENT_DEVICE_CONTROL", null);
+			intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
+			intent.putExtra("keycode",code);
+			getContext().sendBroadcast(intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[setSendEventBR] - [Exception Error] code:" + code);
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+		return 0;
+	}
+
+	/**
+	 * 히든메뉴의 버튼 타임아웃을 설정한다.
+	 */
+    private void HideMenu_setTimeOut() {
+		if (mHideMenuTimer != null) mHideMenuTimer.cancel();
+
+		mHideMenuTimer = new CountDownTimer( 1 * 1000, 1000) {
+			@Override
+			public void onFinish() {
+				Log.d(TAG, "mHideMenuTimer - onFinish !!!");
+				mHideMenuEntryStatus = 0;
+			}
+
+			@Override
+			public void onTick(long millisUntilFinished) {
+			}
+		};
+		mHideMenuTimer.cancel();
+		mHideMenuTimer.start();
+	}
+
+	/**
+	 * 히든메뉴 진입용 프로세스
+	 *
+	 * @param TargetId - 히든메뉴용 버튼 ID
+	 */
+	private void HideMenuEntryProc(int TargetId) {
+		if (OPERATION_MODE != Common.MODE_NOMAL) return;
+		if (mHideMenuOn) return;
+
+		if (TargetId == ID.main.button.HIDE1) {
+			if (mHideMenuEntryStatus == 0) { mHideMenuEntryStatus = 1; HideMenu_setTimeOut(); }
+			else if (mHideMenuEntryStatus == 2) { mHideMenuEntryStatus = 3; HideMenu_setTimeOut(); }
+			else if (mHideMenuEntryStatus == 4) { mHideMenuEntryStatus = 5; HideMenu_setTimeOut(); }
+		}
+		else if (TargetId == ID.main.button.HIDE2) {
+			if (mHideMenuEntryStatus == 1) { mHideMenuEntryStatus = 2; HideMenu_setTimeOut(); }
+			else if (mHideMenuEntryStatus == 3) { mHideMenuEntryStatus = 4; HideMenu_setTimeOut(); }
+			else if (mHideMenuEntryStatus == 5) {
+				mHideMenuEntryStatus = 6;
+				mHideMenuOn = true;
+                if (mHideMenuTimer != null) {
+					mHideMenuTimer.cancel();
+					mHideMenuTimer = null;
+
+					TopBackground.setImageResource(0);
+					TopBackground.setBackgroundColor(Color.RED);
+
+					Sound().Play(SND.call.CALLSTART);
+					super.setFinishTimerDestroy();
+
+					Log.i(TAG, "================================");
+					Log.i(TAG, "[HideMenu] START !!!!!");
+					Log.i(TAG, "================================");
+				}
+			}
+		}
+	}
+
+	public boolean GetEasyModeUXUse() {
+		try {
+			WallpadDeviceSet deviceSet = new WallpadDeviceSet(mContext);
+			boolean bSupport = deviceSet.Get_EasyModeUX_Support();
+			deviceSet.closeDB();
+			WallpadStatusData data = new WallpadStatusData(mContext);
+			boolean bUse = data.GetEasyModeUxUse();
+			data.closeDB();
+			Log.d(TAG, "[GetEasyModeUXUse] bSupport [" + bSupport + "], bUse [" + bUse + "]");
+			return bSupport & bUse;
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetEasyModeUXUse()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return false;
+	}
+
+	public boolean getAirSensorAPUsage() {
+		try {
+			boolean bUsage = false;
+			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
+			int nAirQualityEnable = mWallpadDeviceSet.GetDeviceSetted("센서AP");
+			mWallpadDeviceSet.closeDB();
+			if(nAirQualityEnable == WallpadDeviceSet.DEV_DATA_ENABLE) bUsage = true;
+			Log.d(TAG, "[getAirSensorAPUsage] bUsage [" + bUsage + "]");
+			return bUsage;
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] getAirSensorAPUsage()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+		}
+		return false;
+	}
+
+	/**
+	 * 제어기 상태를 가져온다.
+	 *
+	 * @param bReal - (boolean) true : 실시간 , false : 가장최근
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int updateVentilatorData(boolean bReal) {
+		Log.i(TAG, "[updateVentilatorData] - Start   (bReal : " + bReal + ")");
+
+		// 1. Api Load Check
+		if (mVentilAPI == null) {
+			Log.e(TAG, "[updateVentilatorData] - mVentilAPI unload !!!");
+			return -1;
+		}
+
+		// 2. reflash
+		try {
+			int ret = mVentilAPI.Refresh(bReal);
+			if (ret < 0) {
+				Log.e(TAG, "[updateVentilatorData] Refresh - ret (" + ret + ")   ErrorCode = " + mVentilAPI.ErrorCode.ErrStr());
+				return -2;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[updateVentilatorData] - [Exception Error] mVentilAPI.Refresh(" + bReal + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		// 3. Data Copy
+		VentilStatus = mVentilAPI.data;
+
+		// 4. Debug Msg
+		Log.i(TAG, VentilStatus.ToDebugString());
+		Log.i(TAG, VentilStatus.ToFaultString());
+
+		Log.i(TAG, "[updateVentilatorData] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * Knx 환기 제어기 상태를 가져온다.
+	 *
+	 * @param bReal - (boolean) true : 실시간 , false : 가장최근
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int updateKnxVentilatorData(boolean bReal) {
+		Log.i(TAG, "[updateKnxVentilatorData] - Start   (bReal : " + bReal + ")");
+
+		// 1. Api Load Check
+		if (mKnxVentilAPI == null) {
+			Log.e(TAG, "[updateKnxVentilatorData] - mVentilAPI unload !!!");
+			return -1;
+		}
+
+		// 2. reflash
+		try {
+			int ret = mKnxVentilAPI.Refresh(Common.INDEX_ALL, bReal);
+			if (ret < 0) {
+				Log.e(TAG, "[updateKnxVentilatorData] Refresh - ret (" + ret + ")   ErrorCode = " + mKnxVentilAPI.ErrorCode.ErrStr());
+				return -2;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[updateKnxVentilatorData] - [Exception Error] mKnxVentilAPI.Refresh(" + bReal + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		// 3. Data Copy
+		VentilStatus = mKnxVentilAPI.data.Device[0];
+
+		// 4. Debug Msg
+		Log.i(TAG, VentilStatus.ToDebugString());
+		Log.i(TAG, VentilStatus.ToFaultString());
+
+		Log.i(TAG, "[updateVentilatorData] - OK");
+
+		return 0;
+	}
+
+	public static int nConstructionFunction = WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_NONE;
+	private void getConstructionFunction() {
+		try {
+			WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
+			nConstructionFunction = mWallpadDeviceSet.Get_Construction_SpecialFunc();
+			mWallpadDeviceSet.closeDB();
+		} catch (Exception e) {
+			Log.e(TAG, "[Exception] getConstructionFunction()");
+			e.printStackTrace();
+		}
+	}
+
+
+}

+ 397 - 397
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/declare/Common.java

@@ -1,397 +1,397 @@
-package kr.co.icontrols.wallpadhomectrl.declare;
-
-import android.os.Build;
-import android.util.Log;
-import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
-import android.content.Context;
-import android.view.WindowManager;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
-import kr.co.icontrols.wallpadsupport.Version;
-import com.util.LogUtil;
-
-public final class Common
-{
-    public final static boolean DEBUG_LOG_ON = true;
-
-    public final static String GLE_MODEL = "AN_8935_iHN1010GLE";
-
-    public final static byte     INDEX_ALL = (byte)0xFF;           // 인덱스 전체 지정
-
-    // Auto FINISH
-    public final static boolean FINISH_TIME_ENABLE = true;                  // 자동 종료 사용유무
-    public final static int     FINISH_TIME_SEC = 30;                       // 메인화면 자동 종료 시간 (초)
-    public final static int     FINISH_TIME_POPUP_NORMAL_SEC = 30;          // 팝업 일반 자동 종료 시간 (초)
-    public final static int     FINISH_TIME_POPUP_ALARM_SEC = 10;           // 팝업 알람 자동 종료 시간 (초)
-
-    // UX mode
-    public final static int     UX_NORMAL_MODE = 0;             // 노말
-    public final static int     UX_EASY_MODE = 1;               // 간편모드
-
-    // Operation mode
-    public final static int     MODE_NOMAL = 0;                 // 노말
-    public final static int     MODE_BUSINESS_SAMPLE = 1;       // 영업샘플
-
-    public final static int     MODE = MODE_NOMAL;
-
-    // DevService Check
-    public final static boolean CHECK_DEV_SERVICE = true;                  // 디바이스서비스 실행여부 체크
-
-    // Button Delay
-    public final static int     BTN_DELAY_DEVCTRL = 300;                 // 디바이스 컨트롤을 하는 버튼의 경우 설정되는 딜레이시간
-    public final static int     BTN_DELAY_DEVCTRL_VENTIL = 1000;                 // 디바이스 컨트롤을 하는 버튼의 경우 설정되는 딜레이시간 (환기)
-    public final static int     BTN_DELAY_SHOWPOPUP = 500;               // 팝업 활성화 버튼 딜레이
-
-    // Popup Type
-    public final static int     POPUP_STYLE_NOMAL    = 0;
-    public final static int     POPUP_STYLE_ALARM    = 1;
-
-    // Screen Size
-    public final static int     SCREEN_SIZE_POPUP_NOMAL_W = 990;		// 팝업 해상도 (가로)
-    public final static int     SCREEN_SIZE_POPUP_NOMAL_H = 680;		// 팝업 해상도 (세로)
-
-    public final static int     SCREEN_SIZE_POPUP_ALARM_W = 990;        // 팝업 해상도 (가로)
-    public final static int     SCREEN_SIZE_POPUP_ALARM_H = 576;        // 팝업 해상도 (세로)
-
-    public final static int     CTRL_MARGIN_LEFT    = 200;      // Ctrl Layout 의 좌측 마진
-    public final static int     CTRL_MARGIN_TOP     = 61;       // Ctrl Layout 의 상측 마진
-
-    public final static int     PSTN_RING_V40 = 264;
-
-    // Manual Type
-    public final static int MANUAL_STYLE_NORMAL = 0;            // 30초 뒤 자동 종료 되는 Type
-    public final static int FINISH_TIME_MANUAL_SEC = 10; 		// 매뉴얼 화면 자동 종료 시간 (초)
-
-    // Manual Screen Size
-    public final static int SCREEN_SIZE_MANUAL_W = 1280;			// 매뉴얼 화면 해상도 (가로)
-    public final static int SCREEN_SIZE_MANUAL_H = 800;				// 매뉴얼 화면 해상도 (세로)
-
-    // 거실에너지미터 연동
-    public static byte LIVINGEM_CTRL_NORMAL = (byte) 0x00;
-    public static byte LIVINGEM_CTRL_DIM = (byte) 0x01;
-    public static byte LIVINGEM_CTRL_COLOR = (byte) 0x02;
-    public static byte LIVINGEM_LIGHTSTATUS_ON = (byte) 0x01;
-    public static byte LIVINGEM_CTRL_TYPE_JOGDIAL = (byte) 0x00;
-    public static byte LIVINGEM_CTRL_TYEP_BLE = (byte) 0x01;
-
-
-    /**
-     * 공통사용되는 FONT Size를 정의한다.
-     */
-    public final class fontsize
-    {
-        /** 18 (OLD:8pt) */
-        public final static int     _18                     = 18;
-
-        public final static int     _20                     = 20;
-        /** 22 (OLD:10pt) */
-        public final static int     _22                     = 22;
-        /** 24 (OLD:11pt) */
-        public final static int     _24                     = 24;
-        /** 26 기본 사이즈 (OLD:12pt) */
-        public final static int     _26_DEFAULT             = 26;
-        /** 30 팝업 알람 설명 (OLD:14pt) */
-        public final static int     _30                     = 30;
-        /** 32 (OLD:15pt) */
-        public final static int     _32_POPUP_TITLE         = 32;
-
-        public final static int     _34					    = 34;
-
-        public final static int     _35                     = 35;
-
-        public final static int     _36                     = 36;
-
-        public final static int     _40                     = 40;
-
-        public final static int     _44                     = 44;
-
-        public final static int     _46                     = 46;
-
-        public final static int     _50                     = 50;
-        /** 52 (OLD:24pt) */
-        public final static int     _52                     = 52;
-
-        public final static int     _56                     = 56;
-
-        /** 64 (OLD:30pt) */
-        public final static int     _64                     = 64;
-
-        public final static int     _80                     = 80;
-        /** 86 (OLD:40pt) */
-        public final static int     _86                     = 86;
-    }
-
-    public static int getPopupScreenSize_W(int Style)
-    {
-        if     (Style == POPUP_STYLE_NOMAL) return SCREEN_SIZE_POPUP_NOMAL_W;
-        else if(Style == POPUP_STYLE_ALARM) return SCREEN_SIZE_POPUP_ALARM_W;
-        else    Log.e("Common", "getPopupScreenSize_W - Out of range !!! (" + Style +")");
-        return 0;
-    }
-    public static int getPopupScreenSize_H(int Style)
-    {
-        if     (Style == POPUP_STYLE_NOMAL) return SCREEN_SIZE_POPUP_NOMAL_H;
-        else if(Style == POPUP_STYLE_ALARM) return SCREEN_SIZE_POPUP_ALARM_H;
-        else    Log.e("Common", "getPopupScreenSize_H - Out of range !!! (" + Style +")");
-        return 0;
-    }
-
-    public static int CtrlMarginLEFT(int left)
-    {
-        int retLeft = left - CTRL_MARGIN_LEFT;
-        if(retLeft < 0)
-        {
-            Log.e("Common", "CtrlMarginLEFT - Out of range !!! (" + left +")");
-            return 0;
-        }
-        return retLeft;
-    }
-    public static int CtrlMarginTOP(int top)
-    {
-        int retTop = top - CTRL_MARGIN_TOP;
-        if(retTop < 0)
-        {
-            Log.e("Common", "CtrlMarginTOP - Out of range !!! (" + top +")");
-            return 0;
-        }
-        return retTop;
-    }
-
-    public static int PopupNomalMarginLEFT(int left)
-    {
-        int mainleft = 145;
-        int retLeft = left - mainleft;
-        if(retLeft < 0)
-        {
-            Log.e("Common", "PopupNomalMarginLEFT - Out of range !!! (" + left +")");
-            return 0;
-        }
-        return retLeft;
-    }
-    public static int PopupNomalMarginTOP(int top)
-    {
-        int maintop = 60;
-        int retTop = top - maintop;
-        if(retTop < 0)
-        {
-            Log.e("Common", "PopupNomalMarginTOP - Out of range !!! (" + top +")");
-            return 0;
-        }
-        return retTop;
-    }
-
-    public static int PopupAlarmMarginLEFT(int left)
-    {
-        int mainleft = 145;
-        int retLeft = left - mainleft;
-        if(retLeft < 0)
-        {
-            Log.e("Common", "PopupAlarmMarginLEFT - Out of range !!! (" + left +")");
-            return 0;
-        }
-        return retLeft;
-    }
-    public static int PopupAlarmMarginTOP(int top)
-    {
-        int maintop = 112;
-        int retTop = top - maintop;
-        if(retTop < 0)
-        {
-            Log.e("Common", "PopupAlarmMarginTOP - Out of range !!! (" + top +")");
-            return 0;
-        }
-        return retTop;
-    }
-
-    public static int getManualScreenSize_W(int Style) {
-        if (Style == MANUAL_STYLE_NORMAL) return SCREEN_SIZE_MANUAL_W;
-        else Log.e("Common", "getManualScreenSize_W - Out of range !!! (" + Style +")");
-        return 0;
-    }
-
-    public static int getManualScreenSize_H(int Style) {
-        if (Style == MANUAL_STYLE_NORMAL) return SCREEN_SIZE_MANUAL_H;
-        else Log.e("Common", "getManualScreenSize_H - Out of range !!! (" + Style +")");
-        return 0;
-    }
-
-
-
-    public static class ImgPosion
-    {
-        int x = 0;
-        int y = 0;
-        public static int GetX( int  OrgPos)
-        {
-            return OrgPos - 0;
-        }
-        public static int GetY( int OrgPos)
-        {
-            return OrgPos - 110;
-        }
-    }
-
-    /**
-     * 제어기기 영업샘플모드 활성화 상태를 가져온다.
-     *
-     * @return (boolean) true : 활성 , false : 비활성 or 에러
-     */
-    public static boolean GetDeviceSampleMode(Context context)
-    {
-        try
-        {
-            WallpadSalesSampleData wssd = new WallpadSalesSampleData(context);
-            int mode = wssd.getSalesSampleData(WallpadSalesSampleData.SALES_SAMPLE_MODE_DEVICE_CONTROLLER);
-            wssd.closeDB();
-            Log.d("Common", "[GetSampleMode] mode = " + mode);
-
-            if(mode == 1) return true;
-        }
-        catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e)
-        {
-            Log.e("Common", "[ExceptionError] - GetDeviceSampleMode");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-
-        return false;
-    }
-
-    static final String TAG = "Global";
-    static boolean bLOG = true;
-
-    private static void LOG(String log) {
-        if (bLOG) Log.v(TAG, log);
-    }
-
-    public static boolean ctrlLCDOnOff(boolean bOn) {
-        try {
-            // 절전모드 사용시 호출수신등의 이벤트로 LCD 화면을 ON한다.
-            // 모든 이벤트가 끝나고, 메인화면으로 전환시 절전모드를 다시 동작시킨다.
-            LOG("[ctrlLCDOnOff] bOn [" + bOn + "]");
-            if (bOn) {
-                Log.d(TAG, "[ctrlLCDOnOff] Screen On: " + MainActivity.mPowerManager.isScreenOn());
-                if (getCompareBSPVersion()) {
-                    if (!checkLCDOnByCMD()) {
-                        Log.d(TAG, "[ctrlLCDOnOff] V40Interface LcdWakeUp Call!!");
-                        MainActivity.mV40IF.LcdWakeUp(); // 절전상태일 경우, jni LcdWakeUp 먼저 호출
-                    }
-                }
-                else {
-                    if (!MainActivity.mPowerManager.isScreenOn()) {
-                        Log.d(TAG, "[ctrlLCDOnOff] V40Interface LcdWakeUp Call!!");
-                        MainActivity.mV40IF.LcdWakeUp(); // 절전상태일 경우, jni LcdWakeUp 먼저 호출
-                    }
-                }
-            }
-
-            return true;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] ctrlLCDOnOff(bOn) : " + e);
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return false;
-        }
-    }
-
-    /**
-     * LCD backlight off시 센서값 keyevent가 발생하지 않는 증상 해결을 위한 임시코드
-     *  우선 IHN-1020B-I에만 적용 후, 결과를 보고 다른 일체형 월패드에도 적용 예정
-     *  Jeff, 2020.09.07
-     * @return true: LCD backlight On, false: LCD backlight Off
-     */
-    public static boolean checkLCDOnByCMD() {
-        try {
-            Runtime mRuntime = Runtime.getRuntime();
-            Process mProcess;
-            String cmd = "getprop persist.sys.lcdcon";
-
-            mProcess = mRuntime.exec(cmd);
-            BufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));
-            String line;
-            String strResult = null;
-
-            while ((line = br.readLine()) != null) {
-                strResult = line;
-            }
-
-            if(strResult!=null)
-            {
-                if (strResult.equals("0")) {
-                    Log.e(TAG, "[checkLCDOnByCMD] LCD On");
-                    return true;
-                }
-                else if (strResult.equals("1")) {
-                    Log.e(TAG, "[checkLCDOnByCMD] LCD Off");
-                    return false;
-                }
-                else {
-                    Log.e(TAG, "[checkLCDOnByCMD] Unknown value [" + strResult + "], return false!!!");
-                    return false;
-                }
-            }
-            else
-            {
-                return false;
-            }
-
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return false;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] checkLCDOnByCMD()");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return false;
-        }
-    }
-
-    /**
-     * 절전모드에서 백라이트를 키는 경우, BSP에서 PowerManager 또는 속성값으로 상태를 구분하는데
-     * BSP 버전에 따라 상이하게 동작하므로 BSP 버전 구분하여 절전모드 판별 필요
-     * @return true: 기준 BSP 이후 버전, false: 기준 BSP 이전 버전
-     */
-    public static boolean getCompareBSPVersion() {
-        try {
-            StringBuilder strBSPVersion = new StringBuilder();
-            StringBuffer sysInfoBuffer = new StringBuffer();
-            sysInfoBuffer.append(Build.DISPLAY);
-            strBSPVersion.append(sysInfoBuffer.toString());
-
-            String result = strBSPVersion.toString();
-            Log.d(TAG, "[getCompareBSPVersion] result [" + result + "]");
-
-            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
-            Date date = simpleDateFormat.parse(result);
-            Date standardDate = simpleDateFormat.parse("2020.09.18"); // 비교 기준 BSP 버전
-            if (date.compareTo(standardDate) >= 0) {
-                Log.d(TAG, "[getCompareBSPVersion] BSP VERSION OVER!");
-                return true;
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] getCompareBSPVersion()");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-        return false;
-    }
-
-
-}
-
+package kr.co.icontrols.wallpadhomectrl.declare;
+
+import android.os.Build;
+import android.util.Log;
+import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
+import android.content.Context;
+import android.view.WindowManager;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import kr.co.icontrols.wallpadhomectrl.MainActivity;
+import kr.co.icontrols.wallpadsupport.Version;
+import com.util.LogUtil;
+
+public final class Common
+{
+    public final static boolean DEBUG_LOG_ON = true;
+
+    public final static String GLE_MODEL = "AN_8935_iHN1010GLE";
+
+    public final static byte     INDEX_ALL = (byte)0xFF;           // 인덱스 전체 지정
+
+    // Auto FINISH
+    public final static boolean FINISH_TIME_ENABLE = true;                  // 자동 종료 사용유무
+    public final static int     FINISH_TIME_SEC = 30;                       // 메인화면 자동 종료 시간 (초)
+    public final static int     FINISH_TIME_POPUP_NORMAL_SEC = 30;          // 팝업 일반 자동 종료 시간 (초)
+    public final static int     FINISH_TIME_POPUP_ALARM_SEC = 10;           // 팝업 알람 자동 종료 시간 (초)
+
+    // UX mode
+    public final static int     UX_NORMAL_MODE = 0;             // 노말
+    public final static int     UX_EASY_MODE = 1;               // 간편모드
+
+    // Operation mode
+    public final static int     MODE_NOMAL = 0;                 // 노말
+    public final static int     MODE_BUSINESS_SAMPLE = 1;       // 영업샘플
+
+    public final static int     MODE = MODE_NOMAL;
+
+    // DevService Check
+    public final static boolean CHECK_DEV_SERVICE = true;                  // 디바이스서비스 실행여부 체크
+
+    // Button Delay
+    public final static int     BTN_DELAY_DEVCTRL = 300;                 // 디바이스 컨트롤을 하는 버튼의 경우 설정되는 딜레이시간
+    public final static int     BTN_DELAY_DEVCTRL_VENTIL = 1000;                 // 디바이스 컨트롤을 하는 버튼의 경우 설정되는 딜레이시간 (환기)
+    public final static int     BTN_DELAY_SHOWPOPUP = 500;               // 팝업 활성화 버튼 딜레이
+
+    // Popup Type
+    public final static int     POPUP_STYLE_NOMAL    = 0;
+    public final static int     POPUP_STYLE_ALARM    = 1;
+
+    // Screen Size
+    public final static int     SCREEN_SIZE_POPUP_NOMAL_W = 990;		// 팝업 해상도 (가로)
+    public final static int     SCREEN_SIZE_POPUP_NOMAL_H = 680;		// 팝업 해상도 (세로)
+
+    public final static int     SCREEN_SIZE_POPUP_ALARM_W = 990;        // 팝업 해상도 (가로)
+    public final static int     SCREEN_SIZE_POPUP_ALARM_H = 576;        // 팝업 해상도 (세로)
+
+    public final static int     CTRL_MARGIN_LEFT    = 200;      // Ctrl Layout 의 좌측 마진
+    public final static int     CTRL_MARGIN_TOP     = 61;       // Ctrl Layout 의 상측 마진
+
+    public final static int     PSTN_RING_V40 = 264;
+
+    // Manual Type
+    public final static int MANUAL_STYLE_NORMAL = 0;            // 30초 뒤 자동 종료 되는 Type
+    public final static int FINISH_TIME_MANUAL_SEC = 10; 		// 매뉴얼 화면 자동 종료 시간 (초)
+
+    // Manual Screen Size
+    public final static int SCREEN_SIZE_MANUAL_W = 1280;			// 매뉴얼 화면 해상도 (가로)
+    public final static int SCREEN_SIZE_MANUAL_H = 800;				// 매뉴얼 화면 해상도 (세로)
+
+    // 거실에너지미터 연동
+    public static byte LIVINGEM_CTRL_NORMAL = (byte) 0x00;
+    public static byte LIVINGEM_CTRL_DIM = (byte) 0x01;
+    public static byte LIVINGEM_CTRL_COLOR = (byte) 0x02;
+    public static byte LIVINGEM_LIGHTSTATUS_ON = (byte) 0x01;
+    public static byte LIVINGEM_CTRL_TYPE_JOGDIAL = (byte) 0x00;
+    public static byte LIVINGEM_CTRL_TYEP_BLE = (byte) 0x01;
+
+
+    /**
+     * 공통사용되는 FONT Size를 정의한다.
+     */
+    public final class fontsize
+    {
+        /** 18 (OLD:8pt) */
+        public final static int     _18                     = 18;
+
+        public final static int     _20                     = 20;
+        /** 22 (OLD:10pt) */
+        public final static int     _22                     = 22;
+        /** 24 (OLD:11pt) */
+        public final static int     _24                     = 24;
+        /** 26 기본 사이즈 (OLD:12pt) */
+        public final static int     _26_DEFAULT             = 26;
+        /** 30 팝업 알람 설명 (OLD:14pt) */
+        public final static int     _30                     = 30;
+        /** 32 (OLD:15pt) */
+        public final static int     _32_POPUP_TITLE         = 32;
+
+        public final static int     _34					    = 34;
+
+        public final static int     _35                     = 35;
+
+        public final static int     _36                     = 36;
+
+        public final static int     _40                     = 40;
+
+        public final static int     _44                     = 44;
+
+        public final static int     _46                     = 46;
+
+        public final static int     _50                     = 50;
+        /** 52 (OLD:24pt) */
+        public final static int     _52                     = 52;
+
+        public final static int     _56                     = 56;
+
+        /** 64 (OLD:30pt) */
+        public final static int     _64                     = 64;
+
+        public final static int     _80                     = 80;
+        /** 86 (OLD:40pt) */
+        public final static int     _86                     = 86;
+    }
+
+    public static int getPopupScreenSize_W(int Style)
+    {
+        if     (Style == POPUP_STYLE_NOMAL) return SCREEN_SIZE_POPUP_NOMAL_W;
+        else if(Style == POPUP_STYLE_ALARM) return SCREEN_SIZE_POPUP_ALARM_W;
+        else    Log.e("Common", "getPopupScreenSize_W - Out of range !!! (" + Style +")");
+        return 0;
+    }
+    public static int getPopupScreenSize_H(int Style)
+    {
+        if     (Style == POPUP_STYLE_NOMAL) return SCREEN_SIZE_POPUP_NOMAL_H;
+        else if(Style == POPUP_STYLE_ALARM) return SCREEN_SIZE_POPUP_ALARM_H;
+        else    Log.e("Common", "getPopupScreenSize_H - Out of range !!! (" + Style +")");
+        return 0;
+    }
+
+    public static int CtrlMarginLEFT(int left)
+    {
+        int retLeft = left - CTRL_MARGIN_LEFT;
+        if(retLeft < 0)
+        {
+            Log.e("Common", "CtrlMarginLEFT - Out of range !!! (" + left +")");
+            return 0;
+        }
+        return retLeft;
+    }
+    public static int CtrlMarginTOP(int top)
+    {
+        int retTop = top - CTRL_MARGIN_TOP;
+        if(retTop < 0)
+        {
+            Log.e("Common", "CtrlMarginTOP - Out of range !!! (" + top +")");
+            return 0;
+        }
+        return retTop;
+    }
+
+    public static int PopupNomalMarginLEFT(int left)
+    {
+        int mainleft = 145;
+        int retLeft = left - mainleft;
+        if(retLeft < 0)
+        {
+            Log.e("Common", "PopupNomalMarginLEFT - Out of range !!! (" + left +")");
+            return 0;
+        }
+        return retLeft;
+    }
+    public static int PopupNomalMarginTOP(int top)
+    {
+        int maintop = 60;
+        int retTop = top - maintop;
+        if(retTop < 0)
+        {
+            Log.e("Common", "PopupNomalMarginTOP - Out of range !!! (" + top +")");
+            return 0;
+        }
+        return retTop;
+    }
+
+    public static int PopupAlarmMarginLEFT(int left)
+    {
+        int mainleft = 145;
+        int retLeft = left - mainleft;
+        if(retLeft < 0)
+        {
+            Log.e("Common", "PopupAlarmMarginLEFT - Out of range !!! (" + left +")");
+            return 0;
+        }
+        return retLeft;
+    }
+    public static int PopupAlarmMarginTOP(int top)
+    {
+        int maintop = 112;
+        int retTop = top - maintop;
+        if(retTop < 0)
+        {
+            Log.e("Common", "PopupAlarmMarginTOP - Out of range !!! (" + top +")");
+            return 0;
+        }
+        return retTop;
+    }
+
+    public static int getManualScreenSize_W(int Style) {
+        if (Style == MANUAL_STYLE_NORMAL) return SCREEN_SIZE_MANUAL_W;
+        else Log.e("Common", "getManualScreenSize_W - Out of range !!! (" + Style +")");
+        return 0;
+    }
+
+    public static int getManualScreenSize_H(int Style) {
+        if (Style == MANUAL_STYLE_NORMAL) return SCREEN_SIZE_MANUAL_H;
+        else Log.e("Common", "getManualScreenSize_H - Out of range !!! (" + Style +")");
+        return 0;
+    }
+
+
+
+    public static class ImgPosion
+    {
+        int x = 0;
+        int y = 0;
+        public static int GetX( int  OrgPos)
+        {
+            return OrgPos - 0;
+        }
+        public static int GetY( int OrgPos)
+        {
+            return OrgPos - 110;
+        }
+    }
+
+    /**
+     * 제어기기 영업샘플모드 활성화 상태를 가져온다.
+     *
+     * @return (boolean) true : 활성 , false : 비활성 or 에러
+     */
+    public static boolean GetDeviceSampleMode(Context context)
+    {
+        try
+        {
+            WallpadSalesSampleData wssd = new WallpadSalesSampleData(context);
+            int mode = wssd.getSalesSampleData(WallpadSalesSampleData.SALES_SAMPLE_MODE_DEVICE_CONTROLLER);
+            wssd.closeDB();
+            Log.d("Common", "[GetSampleMode] mode = " + mode);
+
+            if(mode == 1) return true;
+        }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
+        {
+            Log.e("Common", "[ExceptionError] - GetDeviceSampleMode");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+
+        return false;
+    }
+
+    static final String TAG = "Global";
+    static boolean bLOG = true;
+
+    private static void LOG(String log) {
+        if (bLOG) Log.v(TAG, log);
+    }
+
+    public static boolean ctrlLCDOnOff(boolean bOn) {
+        try {
+            // 절전모드 사용시 호출수신등의 이벤트로 LCD 화면을 ON한다.
+            // 모든 이벤트가 끝나고, 메인화면으로 전환시 절전모드를 다시 동작시킨다.
+            LOG("[ctrlLCDOnOff] bOn [" + bOn + "]");
+            if (bOn) {
+                Log.d(TAG, "[ctrlLCDOnOff] Screen On: " + MainActivity.mPowerManager.isScreenOn());
+                if (getCompareBSPVersion()) {
+                    if (!checkLCDOnByCMD()) {
+                        Log.d(TAG, "[ctrlLCDOnOff] V40Interface LcdWakeUp Call!!");
+                        MainActivity.mV40IF.LcdWakeUp(); // 절전상태일 경우, jni LcdWakeUp 먼저 호출
+                    }
+                }
+                else {
+                    if (!MainActivity.mPowerManager.isScreenOn()) {
+                        Log.d(TAG, "[ctrlLCDOnOff] V40Interface LcdWakeUp Call!!");
+                        MainActivity.mV40IF.LcdWakeUp(); // 절전상태일 경우, jni LcdWakeUp 먼저 호출
+                    }
+                }
+            }
+
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] ctrlLCDOnOff(bOn) : " + e);
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+
+    /**
+     * LCD backlight off시 센서값 keyevent가 발생하지 않는 증상 해결을 위한 임시코드
+     *  우선 IHN-1020B-I에만 적용 후, 결과를 보고 다른 일체형 월패드에도 적용 예정
+     *  Jeff, 2020.09.07
+     * @return true: LCD backlight On, false: LCD backlight Off
+     */
+    public static boolean checkLCDOnByCMD() {
+        try {
+            Runtime mRuntime = Runtime.getRuntime();
+            Process mProcess;
+            String cmd = "getprop persist.sys.lcdcon";
+
+            mProcess = mRuntime.exec(cmd);
+            BufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));
+            String line;
+            String strResult = null;
+
+            while ((line = br.readLine()) != null) {
+                strResult = line;
+            }
+
+            if(strResult!=null)
+            {
+                if (strResult.equals("0")) {
+                    Log.e(TAG, "[checkLCDOnByCMD] LCD On");
+                    return true;
+                }
+                else if (strResult.equals("1")) {
+                    Log.e(TAG, "[checkLCDOnByCMD] LCD Off");
+                    return false;
+                }
+                else {
+                    Log.e(TAG, "[checkLCDOnByCMD] Unknown value [" + strResult + "], return false!!!");
+                    return false;
+                }
+            }
+            else
+            {
+                return false;
+            }
+
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] checkLCDOnByCMD()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+
+    /**
+     * 절전모드에서 백라이트를 키는 경우, BSP에서 PowerManager 또는 속성값으로 상태를 구분하는데
+     * BSP 버전에 따라 상이하게 동작하므로 BSP 버전 구분하여 절전모드 판별 필요
+     * @return true: 기준 BSP 이후 버전, false: 기준 BSP 이전 버전
+     */
+    public static boolean getCompareBSPVersion() {
+        try {
+            StringBuilder strBSPVersion = new StringBuilder();
+            StringBuffer sysInfoBuffer = new StringBuffer();
+            sysInfoBuffer.append(Build.DISPLAY);
+            strBSPVersion.append(sysInfoBuffer.toString());
+
+            String result = strBSPVersion.toString();
+            Log.d(TAG, "[getCompareBSPVersion] result [" + result + "]");
+
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
+            Date date = simpleDateFormat.parse(result);
+            Date standardDate = simpleDateFormat.parse("2020.09.18"); // 비교 기준 BSP 버전
+            if (date.compareTo(standardDate) >= 0) {
+                Log.d(TAG, "[getCompareBSPVersion] BSP VERSION OVER!");
+                return true;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] getCompareBSPVersion()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+        return false;
+    }
+
+
+}
+

+ 34 - 2
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/declare/ID.java

@@ -69,7 +69,7 @@ public final class ID
 		public final static int PurityMainScreen = 60000;          // 청정환기 - 메인
 		public final static int PurityPopupScreen = 61000;          // 청정환기 - 팝업
 
-		public final static int HybridCookTopMainScreen             			  = 62000;
+		public final static int HybridCookTopMainScreen             			  = 62000;        // 하이브리드쿡탑
 		public final static int CurTainV1MainScreen             			  = 63000; // 하이브리드쿡탑
 	}
 
@@ -450,7 +450,7 @@ public final class ID
 	public static final class LightHdcLivPopupScreenID {
 		final static int BASE = screen.LightEtcEachMainScreen;
 
-		public final static String BR_HDCLIVINGLIGHT = "kr.co.icontrols.wallpadhomectrl.BR_HDCLIVINGLIGHT";
+		public final static String BR_HDCLIVINGLIGHT = "kr.co.icontrols.wallpadglobalscreen.BR_HDCLIVINGLIGHT";
 
 		public static final class layout {
 			public final static int LIGHT = BASE + 1;
@@ -1127,6 +1127,7 @@ public final class ID
 			public final static int AIRQUALITY_STATUS_PM10 = BASE + 117;
 			public final static int AIRQUALITY_STATUS_PM2p5 = BASE + 118;
 			public final static int AIRQUALITY_STATUS_CO2 = BASE + 119;
+			public final static int BRIGHTNESS_STATUS = BASE + 120;
 		}
 
 		public static final class BTN {
@@ -1149,6 +1150,25 @@ public final class ID
 			public final static int MODE_NORMAL = BASE + 224;
 			public final static int ONOFF_AUTOCLEAN = BASE + 225;
 			public final static int ONOFF_RESERVATION = BASE + 226;
+			public final static int ONOFF_CONFIG = BASE + 227;
+
+
+			public final static int ROOM_BACK  = BASE + 228;
+			public final static int ROOM_NEXT  = BASE + 229;
+
+			public final static int SANITIZTION_BG    = BASE + 230;
+
+			public final static int ONOFF_VENTILATION  = BASE + 231;
+			public final static int ONOFF_SANITIZATION = BASE + 232;
+
+			public final static int ROOM_ONOFF_1  = BASE + 400;
+			public final static int ROOM_ONOFF_2  = BASE + 401;
+			public final static int ROOM_ONOFF_3  = BASE + 402;
+			public final static int ROOM_ONOFF_4  = BASE + 403;
+			public final static int ROOM_ONOFF_5  = BASE + 404;
+			public final static int ROOM_ONOFF_6  = BASE + 405;
+			public final static int ROOM_ONOFF_7  = BASE + 406;
+			public final static int ROOM_ONOFF_8  = BASE + 407;
 		}
 
 		public static final class TXT {
@@ -1162,6 +1182,9 @@ public final class ID
 			public final static int TITLE_VENTILMODE = BASE + 307;
 			public final static int TITLE_WINDVOL = BASE + 308;
 			public final static int TITLE_TIMER = BASE + 309;
+			public final static int TITLE_ONOFF_SANITIZATION = BASE + 310;
+			public final static int TITLE_ONOFF_VENTILATION = BASE + 311;
+
 			public final static int HEATER_TIME = BASE + 320;
 			public final static int TIMER_VALUE = BASE + 321;
 			public final static int INSTRUCTION = BASE + 322;
@@ -1175,6 +1198,15 @@ public final class ID
 			public final static int AIRQUALITY_FIGURE_PM10 	  = BASE + 356;
 			public final static int AIRQUALITY_FIGURE_PM2p5 	  = BASE + 357;
 			public final static int AIRQUALITY_FIGURE_CO2 	  = BASE + 358;
+
+			public final static int ROOM_TITLE_1  = BASE + 500;
+			public final static int ROOM_TITLE_2  = BASE + 501;
+			public final static int ROOM_TITLE_3  = BASE + 502;
+			public final static int ROOM_TITLE_4  = BASE + 503;
+			public final static int ROOM_TITLE_5  = BASE + 504;
+			public final static int ROOM_TITLE_6  = BASE + 505;
+			public final static int ROOM_TITLE_7  = BASE + 506;
+			public final static int ROOM_TITLE_8  = BASE + 507;
 		}
 	}
 

+ 18 - 18
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_airquality/AirQualityMainScreen.java

@@ -640,21 +640,21 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL4.PM10.NORMAL) {StatusImage_dust.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.PM10.BAD) {StatusImage_dust.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.PM10.WORSE) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL4.PM2_5.GOOD) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_good);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.NORMAL) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.BAD) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.WORSE) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL4.CO2.GOOD) {StatusImage_co2.setImageResource(R.drawable.air_quality8_good);}
 				else if (level == AIRLevel.LEVEL4.CO2.NORMAL) {StatusImage_co2.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.CO2.BAD) {StatusImage_co2.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.CO2.WORSE) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_normal);}
 			}
 		}
 		else if (AirDust4OR8 == 8) {
@@ -667,7 +667,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.PM10.QUITEBAD) {StatusImage_dust.setImageResource(R.drawable.air_quality8_quite_bad);}
 				else if (level == AIRLevel.LEVEL8.PM10.WORSE) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worse);}
 				else if (level == AIRLevel.LEVEL8.PM10.WORST) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL8.PM2_5.BEST) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_best);}
@@ -678,7 +678,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.PM2_5.QUITEBAD) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_quite_bad);}
 				else if (level == AIRLevel.LEVEL8.PM2_5.WORSE) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worse);}
 				else if (level == AIRLevel.LEVEL8.PM2_5.WORST) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL8.CO2.BEST) {StatusImage_co2.setImageResource(R.drawable.air_quality8_best);}
@@ -689,7 +689,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.CO2.QUITEBAD) {StatusImage_co2.setImageResource(R.drawable.air_quality8_quite_bad);}
 				else if (level == AIRLevel.LEVEL8.CO2.WORSE) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worse);}
 				else if (level == AIRLevel.LEVEL8.CO2.WORST) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_normal);}
 			}
 		}
 		else {
@@ -699,21 +699,21 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL4.PM10.NORMAL) {StatusImage_dust.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.PM10.BAD) {StatusImage_dust.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.PM10.WORSE) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_dust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL4.PM2_5.GOOD) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_good);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.NORMAL) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.BAD) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.PM2_5.WORSE) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_finedust.setImageResource(R.drawable.air_quality8_normal);}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL4.CO2.GOOD) {StatusImage_co2.setImageResource(R.drawable.air_quality8_good);}
 				else if (level == AIRLevel.LEVEL4.CO2.NORMAL) {StatusImage_co2.setImageResource(R.drawable.air_quality8_normal);}
 				else if (level == AIRLevel.LEVEL4.CO2.BAD) {StatusImage_co2.setImageResource(R.drawable.air_quality8_bad);}
 				else if (level == AIRLevel.LEVEL4.CO2.WORSE) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
-				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_worst);}
+				else if (level == (byte)0xFF) {StatusImage_co2.setImageResource(R.drawable.air_quality8_normal);}
 			}
 		}
 	}
@@ -738,21 +738,21 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL4.PM10.NORMAL) {StatusText_dust.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.PM10.BAD) {StatusText_dust.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.PM10.WORSE) {StatusText_dust.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_dust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_dust.setText("정보없음");}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL4.PM2_5.GOOD) {StatusText_finedust.setText("좋음");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.NORMAL) {StatusText_finedust.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.BAD) {StatusText_finedust.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.WORSE) {StatusText_finedust.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_finedust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_finedust.setText("정보없음");}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL4.CO2.GOOD) {StatusText_co2.setText("좋음");}
 				else if (level == AIRLevel.LEVEL4.CO2.NORMAL) {StatusText_co2.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.CO2.BAD) {StatusText_co2.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.CO2.WORSE) {StatusText_co2.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_co2.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_co2.setText("정보없음");}
 			}
 		}
 		else if (AirDust4OR8 == 8) {
@@ -765,7 +765,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.PM10.QUITEBAD) {StatusText_dust.setText("상당히 나쁨");}
 				else if (level == AIRLevel.LEVEL8.PM10.WORSE) {StatusText_dust.setText("매우 나쁨");}
 				else if (level == AIRLevel.LEVEL8.PM10.WORST) {StatusText_dust.setText("최악");}
-				else if (level == (byte)0xFF) {StatusText_dust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_dust.setText("정보없음");}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL8.PM2_5.BEST) {StatusText_finedust.setText("아주좋음");}
@@ -776,7 +776,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.PM2_5.QUITEBAD) {StatusText_finedust.setText("상당히 나쁨");}
 				else if (level == AIRLevel.LEVEL8.PM2_5.WORSE) {StatusText_finedust.setText("매우 나쁨");}
 				else if (level == AIRLevel.LEVEL8.PM2_5.WORST) {StatusText_finedust.setText("최악");}
-				else if (level == (byte)0xFF) {StatusText_finedust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_finedust.setText("정보없음");}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL8.CO2.BEST) {StatusText_co2.setText("아주좋음");}
@@ -787,7 +787,7 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL8.CO2.QUITEBAD) {StatusText_co2.setText("상당히 나쁨");}
 				else if (level == AIRLevel.LEVEL8.CO2.WORSE) {StatusText_co2.setText("매우 나쁨");}
 				else if (level == AIRLevel.LEVEL8.CO2.WORST) {StatusText_co2.setText("최악");}
-				else if (level == (byte)0xFF) {StatusText_co2.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_co2.setText("정보없음");}
 			}
 		}
 		else {
@@ -797,21 +797,21 @@ public class AirQualityMainScreen extends WpadScreen {
 				else if (level == AIRLevel.LEVEL4.PM10.NORMAL) {StatusText_dust.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.PM10.BAD) {StatusText_dust.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.PM10.WORSE) {StatusText_dust.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_dust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_dust.setText("정보없음");}
 			}
 			else if (type == TYPE_FINEDUST) {
 				if (level == AIRLevel.LEVEL4.PM2_5.GOOD) {StatusText_finedust.setText("좋음");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.NORMAL) {StatusText_finedust.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.BAD) {StatusText_finedust.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.PM2_5.WORSE) {StatusText_finedust.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_finedust.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_finedust.setText("정보없음");}
 			}
 			else if (type == TYPE_CO2) {
 				if (level == AIRLevel.LEVEL4.CO2.GOOD) {StatusText_co2.setText("좋음");}
 				else if (level == AIRLevel.LEVEL4.CO2.NORMAL) {StatusText_co2.setText("보통");}
 				else if (level == AIRLevel.LEVEL4.CO2.BAD) {StatusText_co2.setText("나쁨");}
 				else if (level == AIRLevel.LEVEL4.CO2.WORSE) {StatusText_co2.setText("매우 나쁨");}
-				else if (level == (byte)0xFF) {StatusText_co2.setText("지원안함");}
+				else if (level == (byte)0xFF) {StatusText_co2.setText("정보없음");}
 			}
 		}
 	}

+ 160 - 0
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_concent/ConcentPopupScreen.java

@@ -92,6 +92,7 @@ public class ConcentPopupScreen extends WpadScreen {
 			NumImg = new WpadImageView(getContext(), TOUCH_KIND.NONE, 26, 26,
 					NumberImgArray[number-1], 0, id);
 			ViewRegistration(getLayout(), NumImg, left, top-10);
+			NumImg.setVisibility(View.GONE);
 			/*Number = new WpadTextView(getContext(), false, 15, 25, Gravity.CENTER, Color.BLACK, Common.fontsize._20, true, id+10);
 			ViewRegistration(getLayout(), Number, left+(65-15), top+(65-25-3));
 			Number.setText(String.format("%d", number));*/
@@ -104,10 +105,12 @@ public class ConcentPopupScreen extends WpadScreen {
 					id);
 			ViewRegistration(getLayout(), Button, left, top);
 			Button.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Button.setVisibility(View.GONE);
 
 			NumImg = new WpadImageView(getContext(), TOUCH_KIND.NONE, 26, 26,
 					NumberImgArray[number-1], 0, id);
 			ViewRegistration(getLayout(), NumImg, left-33, top);
+			NumImg.setVisibility(View.GONE);
 
 			/*Number = new WpadTextView(getContext(), false, 15, 25, Gravity.CENTER, Color.BLACK, Common.fontsize._20, true, id+10);
 			ViewRegistration(getLayout(), Number, left+55, top+42);
@@ -121,10 +124,12 @@ public class ConcentPopupScreen extends WpadScreen {
 					id);
 			ViewRegistration(getLayout(), Button, left, top);
 			Button.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Button.setVisibility(View.GONE);
 
 			NumImg = new WpadImageView(getContext(), TOUCH_KIND.NONE, 26, 26,
 					NumberImgArray[number-1], 0, id);
 			ViewRegistration(getLayout(), NumImg, left-30, top-20);
+			NumImg.setVisibility(View.GONE);
 
 			/*Number = new WpadTextView(getContext(), false, 15, 25, Gravity.CENTER, Color.BLACK, Common.fontsize._20, true, id+10);
 			ViewRegistration(getLayout(), Number, left+55, top+42);
@@ -648,20 +653,30 @@ public class ConcentPopupScreen extends WpadScreen {
 
             NowText1 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.NOW1);
             ViewRegistration(getLayout(), NowText1, Common.PopupNomalMarginLEFT(504), Common.PopupNomalMarginTOP(485));
+			NowText1.setVisibility(View.GONE);
+
             NowText2 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.NOW2);
             ViewRegistration(getLayout(), NowText2, Common.PopupNomalMarginLEFT(830), Common.PopupNomalMarginTOP(485));
+			NowText2.setVisibility(View.GONE);
 
             SetText1 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.SET1);
             ViewRegistration(getLayout(), SetText1, Common.PopupNomalMarginLEFT(504), Common.PopupNomalMarginTOP(539));
+			SetText1.setVisibility(View.GONE);
+
             SetText2 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.SET2);
             ViewRegistration(getLayout(), SetText2, Common.PopupNomalMarginLEFT(830), Common.PopupNomalMarginTOP(539));
+			SetText2.setVisibility(View.GONE);
 
             SetBtn1 = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 170, 42, R.drawable.popup_concent_set, R.drawable.popup_concent_set_p, ID.ConcentPopup.button.SET1);
             ViewRegistration(getLayout(), SetBtn1, Common.PopupNomalMarginLEFT(436), Common.PopupNomalMarginTOP(600));
             SetBtn1.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			SetBtn1.setVisibility(View.GONE);
+
             SetBtn2 = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 170, 42, R.drawable.popup_concent_set, R.drawable.popup_concent_set_p, ID.ConcentPopup.button.SET2);
             ViewRegistration(getLayout(), SetBtn2, Common.PopupNomalMarginLEFT(762), Common.PopupNomalMarginTOP(600));
             SetBtn2.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			SetBtn2.setVisibility(View.GONE);
+
         }
         else if (page == 2) {
             ConcentImg3 = new NumView(NumView.TYPE_CONCENT_IMG, Common.PopupNomalMarginLEFT(398), Common.PopupNomalMarginTOP(430), 3, ID.ConcentPopup.image.CONCENT3);
@@ -679,25 +694,170 @@ public class ConcentPopupScreen extends WpadScreen {
 
             NowText3 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.NOW3);
             ViewRegistration(getLayout(), NowText3, Common.PopupNomalMarginLEFT(504), Common.PopupNomalMarginTOP(485));
+			NowText3.setVisibility(View.GONE);
+
             NowText4 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.NOW4);
             ViewRegistration(getLayout(), NowText4, Common.PopupNomalMarginLEFT(830), Common.PopupNomalMarginTOP(485));
+			NowText4.setVisibility(View.GONE);
 
             SetText3 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.SET3);
             ViewRegistration(getLayout(), SetText3, Common.PopupNomalMarginLEFT(504), Common.PopupNomalMarginTOP(539));
+			SetText3.setVisibility(View.GONE);
+
             SetText4 = new WpadTextView(getContext(), false, 110, 27, Gravity.RIGHT, Color.WHITE, Common.fontsize._20, false, ID.ConcentPopup.text.SET4);
             ViewRegistration(getLayout(), SetText4, Common.PopupNomalMarginLEFT(830), Common.PopupNomalMarginTOP(539));
+			SetText4.setVisibility(View.GONE);
 
             SetBtn3 = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 170, 42, R.drawable.popup_concent_set, R.drawable.popup_concent_set_p, ID.ConcentPopup.button.SET3);
             ViewRegistration(getLayout(), SetBtn3, Common.PopupNomalMarginLEFT(436), Common.PopupNomalMarginTOP(600));
             SetBtn3.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			SetBtn3.setVisibility(View.GONE);
+
             SetBtn4 = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 170, 42, R.drawable.popup_concent_set, R.drawable.popup_concent_set_p, ID.ConcentPopup.button.SET4);
             ViewRegistration(getLayout(), SetBtn4, Common.PopupNomalMarginLEFT(762), Common.PopupNomalMarginTOP(600));
             SetBtn4.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			SetBtn4.setVisibility(View.GONE);
         }
 
+		ShowRealUI();
         Draw_Update();
     }
 
+	/**
+	 * 실제로 화면에 콘센트 갯수에 맞게 표출하기 위해 추가함
+	 */
+	protected void ShowRealUI()
+	{
+		//전체 갯수에서 확인이 필요함 만약에 4개라는 가정하에 가면 해당 정보가 맞음
+		int ConcentCount = mData.Device[mCurrentRoomIndex].device.hOutletCnt;
+		if(ConcentCount == 1)
+		{
+			//홀수
+			Background.setImageResource(R.drawable.bg_concent_popup_odd);
+		}
+		else if(ConcentCount == 3 && mCurrentPage == 2)
+		{
+			//홀수
+			Background.setImageResource(R.drawable.bg_concent_popup_odd);
+		}
+		else
+		{
+			//짝수
+			Background.setImageResource(R.drawable.bg_concent_popup);
+		}
+
+		for(int i =0; i< ConcentCount; i++)
+		{
+			NumView connect = null;
+			NumView energy = null;
+			NumView connectImg = null;
+			WpadTextView now_text = null;
+			WpadTextView set_text = null;
+			WpadImageView set_btn = null;
+
+			switch (i)
+			{
+				case 0:
+					connect = Concent1;
+					energy = Energy1;
+					connectImg = ConcentImg1;
+					now_text = NowText1;
+					set_text = SetText1;
+					set_btn = SetBtn1;
+					break;
+				case 1:
+					connect = Concent2;
+					energy = Energy2;
+					connectImg = ConcentImg2;
+					now_text = NowText2;
+					set_text = SetText2;
+					set_btn = SetBtn2;
+					break;
+				case 2:
+					connect = Concent3;
+					energy = Energy3;
+					connectImg = ConcentImg3;
+					now_text = NowText3;
+					set_text = SetText3;
+					set_btn = SetBtn3;
+					break;
+				case 3:
+					connect = Concent4;
+					energy = Energy4;
+					connectImg = ConcentImg4;
+					now_text = NowText4;
+					set_text = SetText4;
+					set_btn = SetBtn4;
+					break;
+				default:
+					break;
+			}
+
+			if(connect!=null)
+			{
+				if(connect.Button!=null)
+				{
+					connect.Button.setVisibility(View.VISIBLE);
+				}
+				if(connect.Number!=null)
+				{
+					connect.Number.setVisibility(View.VISIBLE);
+				}
+				if(connect.NumImg!=null)
+				{
+					connect.NumImg.setVisibility(View.VISIBLE);
+				}
+			}
+
+			if(energy!=null)
+			{
+				if(energy.Button!=null)
+				{
+					energy.Button.setVisibility(View.VISIBLE);
+				}
+				if(energy.Number!=null)
+				{
+					energy.Number.setVisibility(View.VISIBLE);
+				}
+				if(energy.NumImg!=null)
+				{
+					energy.NumImg.setVisibility(View.VISIBLE);
+				}
+			}
+
+			if(connectImg!=null)
+			{
+				if(connectImg.Button!=null)
+				{
+					connectImg.Button.setVisibility(View.VISIBLE);
+				}
+				if(connectImg.Number!=null)
+				{
+					connectImg.Number.setVisibility(View.VISIBLE);
+				}
+				if(connectImg.NumImg!=null)
+				{
+					connectImg.NumImg.setVisibility(View.VISIBLE);
+				}
+			}
+
+			if(now_text!=null)
+			{
+				now_text.setVisibility(View.VISIBLE);
+			}
+
+			if(set_text!=null)
+			{
+				set_text.setVisibility(View.VISIBLE);
+			}
+
+			if(set_btn!=null)
+			{
+				set_btn.setVisibility(View.VISIBLE);
+			}
+		}
+	}
+
 	/**
 	 * 룸의 이름을 화면에 반영한다.
 	 *

+ 584 - 584
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_gas/GasMainScreen.java

@@ -1,584 +1,584 @@
-/*
- * Copyright (C) 2014 Android WallPad Project
- *
- * FileName  : GasMainScreen.java
- * Project   : Android WallPad Project
- * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
- * Author    : Kang Sang Ho  , lairu@icontrols.co.kr
- */
-
-package kr.co.icontrols.wallpadhomectrl.screen.screen_gas;
-
-import com.artncore.wallpadapi.GasAPI;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.artncore.wallpadapi.WallPadDevAPI;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Color;
-import android.os.CountDownTimer;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.RelativeLayout;
-
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
-import kr.co.icontrols.wallpadhomectrl.R;
-import kr.co.icontrols.wallpadhomectrl.declare.*;
-import kr.co.icontrols.wallpadsupport.*;
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-import com.util.LogUtil;
-
-
-/**
- * @description
- * 월패드 [우리집제어->가스] 화면 이다.<br>
- * 가스 상태 (열림, 동작중, 닫힘) 표시, 닫기 실행<br>
- * 을(를) 여기서 처리한다.
- */
-@SuppressLint("ViewConstructor")
-public class GasMainScreen extends WpadScreen
-{
-	private final String TAG = "GasMainScreen";
-
-	private final boolean DEBUG_LOG_ON = true;
-	private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
-
-	// =================================================================================================
-	// [[ Declaration ]] region
-	// =================================================================================================
-	// [Image]
-	private WpadImageView Background;
-	private WpadImageView StatusImage;
-
-	// [Text]
-	private WpadTextView StatusText;
-
-	// [Button]
-	private WpadImageView CloseBtn;
-	//private WpadImageView AllCloseBtn;
-
-	// [Text]
-
-	// [Variables]
-	private int OPERATION_MODE = -1;
-
-	/*private GasAPI.Data data = null;
-	// [Class]
-	private class GasView
-	{
-		public WpadImageView Background;        // 배경
-		public WpadImageView StatusImage;       // 가스 상태 이미지
-		public WpadImageView CloseBtn;          // 닫기 버튼
-
-		public WpadTextView StatusText;         // 벨브 상태
-
-		*//**
-		 * 생성자
-		 * param left  - (int) 좌측마진
-		 * param top   - (int) 상측마진
-		 * param index - (int) 인덱스
-		 *//*
-		private GasView(int left, int top, int index)
-		{
-			Background = new WpadImageView(getContext(), TOUCH_KIND.NONE, 294, 324, R.drawable.bg_s_gas_box, R.drawable.bg_s_gas_box, ID.gasmain.image.BACKGROUND + index);
-			ViewRegistration(getLayout(), Background, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top));
-
-			StatusImage = new WpadImageView(getContext(), TOUCH_KIND.NONE, 278, 260, R.drawable.control_s_gas_image2, 0, ID.gasmain.image.STATUS_IMG + index);
-			ViewRegistration(getLayout(), StatusImage, Common.CtrlMarginLEFT(left+7), Common.CtrlMarginTOP(top+63));
-
-			CloseBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 294, 64, R.drawable.control_s_gas_btn_close_normal, R.drawable.control_s_gas_btn_close_pressed,
-					ID.gasmain.button.CLOSE + index);
-			ViewRegistration(getLayout(), CloseBtn, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top+324));
-			CloseBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			StatusText = new WpadTextView(getContext(), false, 294, 50, Gravity.CENTER, Color.BLACK, Common.fontsize._26_DEFAULT, true, ID.gasmain.text.STATUS + index);
-			ViewRegistration(getLayout(), StatusText, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top+12));
-		}
-	}
-	private GasView[] gasView = null;*/
-
-	private class Data
-	{
-		byte Status;                            // 0x00 닫힘 , 0x01 열림 , 0x02 동작중
-
-		public Data()
-		{
-			Status = GasAPI.GASSTATUS.Operation;      // 초기상태 동작중
-		}
-	}
-	private Data data = null;
-
-	// [API]
-	private GasAPI gasApi = null;          // 가스제어기 API
-	private TransactionDisplay transactionDisplay = null;
-
-	// =================================================================================================
-	// [[ Create & Close ]] region
-	// =================================================================================================
-	/**
-	 * GasMainScreen 클래스 생성자
-	 *
-	 * @param context - 부모 context
-	 * @param layout  - 사용할 main layout
-	 * param sound   - 상속받은 WpadSound
-	 * @param wpapi   - 상속받은 WallPadAPI
-	 * @param operationMode - 동작모드
-	 */
-	public GasMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)
-	{
-		super(context, layout);
-		Log.i(TAG, "[START - Screen] --------------------------------------------");
-
-		// 1. Data Create
-		DebugLogOutput("[Create] - Step1 : Data Create");
-		OPERATION_MODE = operationMode;
-		data = new Data();
-
-		// 2. Device API Load & Update
-		DebugLogOutput("[Create] - Step2 : Device API Load & Update");
-		if(OPERATION_MODE == Common.MODE_NOMAL)
-		{
-			DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
-			if(Device_ApiLoad(wpapi) >= 0) Device_Update(false);
-		}
-		else if(OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
-		{
-			DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
-			data.Status = GasAPI.GASSTATUS.Open;
-		}
-		else
-		{
-			DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
-			OPERATION_MODE = Common.MODE_NOMAL;
-		}
-
-		// 3. Image Create
-		DebugLogOutput("[Create] - Step3 : Image Create");
-		Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.GasMainScreenID.image.BACKGROUND);
-		ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
-		StatusImage = new WpadImageView(context, TOUCH_KIND.NONE, 822, 544, R.drawable.control_gas_image1, 0, ID.GasMainScreenID.image.STATUS_IMG);
-		ViewRegistration(layout, StatusImage, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(169));
-		StatusText = new WpadTextView(context, false, 150, 50, Gravity.START, Color.WHITE, Common.fontsize._36, true, ID.GasMainScreenID.text.STATUS);
-		ViewRegistration(layout, StatusText, Common.ImgPosion.GetX(143), Common.ImgPosion.GetY(219));
-		//StatusText.setText("test1111");
-
-		// 4. Button Create
-		DebugLogOutput("[Create] - Step4 : Button Create");
-		CloseBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 544, R.drawable.btn_gas_normal, R.drawable.btn_gas_close_pressed, ID.GasMainScreenID.button.CLOSE);
-		//ViewRegistration(layout, CloseBtn, Common.CtrlMarginLEFT(362), Common.CtrlMarginTOP(538));
-		ViewRegistration(layout, CloseBtn, Common.ImgPosion.GetX(957), Common.ImgPosion.GetY(169));
-		CloseBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-
-		// 5. Draw_Update
-		DebugLogOutput("[Create] - Step5 : Draw_Update");
-		Draw_Update();
-
-		if(gasApi != null)
-		{
-			Device_BrRegistration(true);
-			if(MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) gasApi, (WpadScreen) this);
-		}
-	}
-
-	/**
-	 * 본 스크린 종료시 호출됨
-	 */
-	@Override
-	protected void onClose()
-	{
-		super.onClose();
-
-		// 등록된 BR 을 해제 한다.
-		if(gasApi != null)
-		{
-			Device_BrRegistration(false);
-			if(MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
-		}
-
-		Log.i(TAG, "[END   - Screen] ********************************************");
-	}
-
-
-	// =================================================================================================
-	// [[ BroadcastReceiver ]] region
-	// =================================================================================================
-	/**
-	 * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
-	 */
-	@Override
-	protected void onBrReceive(Intent intent)
-	{
-		super.onBrReceive(intent);
-
-		String ActionName = intent.getAction();
-
-		DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
-		if(ActionName.equals(ID.GasMainScreenID.BR_GAS))
-		{
-			DebugLogOutput("onBrReceive - BR_GAS");
-			Device_Update(false);
-			Draw_Update();
-		}
-	}
-
-
-	// =================================================================================================
-	// [[ Touch & Key Event ]] region
-	// =================================================================================================
-	/**
-	 * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
-	 */
-	@Override
-	protected void onTouchEvent(View v, MotionEvent event)
-	{
-		super.onTouchEvent(v, event);
-
-		int TargetId = v.getId();
-		int MoveEvent = event.getAction();
-
-		if(MoveEvent == MotionEvent.ACTION_UP)
-		{
-			if(TargetId == ID.GasMainScreenID.button.CLOSE)
-			{
-				DebugLogOutput("onTouchEvent [CLOSE] BUTTON !!!");
-
-				if(OPERATION_MODE == Common.MODE_NOMAL)
-				{
-					// 이미 닫힌 상태에서 버튼을 누르면 disable이 아닌 normal로 돌아가는 것을 방지
-					if(data.Status == GasAPI.GASSTATUS.Close)
-					{
-						CloseBtn.setImageResource(R.drawable.btn_gas_disable);
-					}
-
-					int ret = Device_GasClose();
-					if(ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-
-				}
-				else if(OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
-				{
-					Sample_GasClose();
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-		}
-	}
-
-
-	// =================================================================================================
-	// [[ Draw ]] region
-	// =================================================================================================
-	/**
-	 * 변경되는 이미지를 다시 그린다.
-	 */
-	private void Draw_Update()
-	{
-		Draw_GasStatusChange(data.Status);
-	}
-
-	/**
-	 * 가스 제어기 이미지 상태 변경
-	 *
-	 * @param Status - 변경할 이미지 (0x00 닫힘 , 0x01 열림 , 0x02 동작중 , 그외 범위이탈 에러로그 출력)
-	 */
-	private void Draw_GasStatusChange(byte Status)
-	{
-		int ImageId = 0;
-		String Text = null;
-
-		if(Status == GasAPI.GASSTATUS.Close)
-		{
-			ImageId = R.drawable.control_gas_image1; // close
-			Text = "닫힘";
-			CloseBtn.setImageResource(R.drawable.btn_gas_disable);
-		}
-		else if(Status == GasAPI.GASSTATUS.Open)
-		{
-			ImageId = R.drawable.control_gas_image3; // open
-			Text = "열림";
-			CloseBtn.setImageResource(R.drawable.btn_gas_normal);
-		}
-		else if(Status == GasAPI.GASSTATUS.Operation)
-		{
-			ImageId = R.drawable.control_gas_image2; // moving
-			Text = "동작중";
-			CloseBtn.setImageResource(R.drawable.btn_gas_normal);
-		}
-		else
-		{
-			Log.e(TAG, "[Draw_GasStatusChange] - Status  Out of range !!! (" + Status + ")");
-			return;
-		}
-
-		if(StatusImage != null) StatusImage.setImageResource(ImageId);
-		if(StatusText != null) StatusText.setText(Text);
-	}
-
-
-	// =================================================================================================
-	// [[ Device ]] region
-	// =================================================================================================
-	/**
-	 * 디바이스 API 를 Load 한다.
-	 *
-	 * @param wpapi - 생성시 전달받은 WallPadAPI
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_ApiLoad(WallPadAPI wpapi)
-	{
-		// 1. Mode Check
-		if(OPERATION_MODE != Common.MODE_NOMAL) return -1;
-
-		DebugLogOutput("[Device_ApiLoad] - Start");
-
-		// 2. wpapi Check
-		if(wpapi == null)
-		{
-			Log.e(TAG, "[Device_ApiLoad] - wpapi is null");
-			return -2;
-		}
-
-		// 3. Load API
-		DebugLogOutput("[Device_ApiLoad] - Step1 : GasValve API Load...");
-		try
-		{
-			gasApi = wpapi.Get_GasController();
-		}
-		catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e)
-		{
-			Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_GasValveController");
-			Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-		if(gasApi == null)
-		{
-			Log.e(TAG, "[Device_ApiLoad] - gasApi is null");
-			return -4;
-		}
-
-		DebugLogOutput("[Device_ApiLoad] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 디바이스에 알림 BR 을 등록한다.
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_BrRegistration(boolean OnOff)
-	{
-		DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
-
-		String BR_NAME = ID.GasMainScreenID.BR_GAS;
-
-		// 1. Api Load Check
-		if(gasApi == null)
-		{
-			Log.e(TAG, "[Device_BrRegistration] - gasApi unload !!!");
-			return -1;
-		}
-
-		if(OnOff)
-		{
-			try
-			{
-				//DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
-				gasApi.regChangedBR(BR_NAME);
-				//DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
-			}
-			catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-				return -101;
-			}
-			catch (Exception e)
-			{
-				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] gasApi.regChangedBR");
-				Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
-				//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-				return -101;
-			}
-			super.addBrActionFilter(BR_NAME);
-		}
-		else
-		{
-			try
-			{
-				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
-				gasApi.unregChangedBR(BR_NAME);
-				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
-			}
-			catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-				return -102;
-			}
-			catch (Exception e)
-			{
-				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] gasApi.unregChangedBR");
-				Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
-				//e.printStackTrace();
-            	LogUtil.errorLogInfo("", TAG, e);
-				return -102;
-			}
-			super.removeBrActionFilter(BR_NAME);
-		}
-
-		return 0;
-	}
-
-	/**
-	 * 제어기 상태를 가져온다.
-	 *
-	 * @param real - (boolean) true : 실시간 , false : 가장최근
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_Update(boolean real)
-	{
-		DebugLogOutput("[Device_Update] - Start   (real : " + real + ")");
-
-		// 1. Api Load Check
-		if(gasApi == null)
-		{
-			Log.e(TAG, "[Device_Update] - gasApi unload !!!");
-			return -1;
-		}
-
-		try
-		{
-			// 2. Reflash
-			int ret = gasApi.Refresh((byte)0, real);
-			if(ret < 0)
-			{
-				Log.e(TAG, "[Device_Update] getState - ret (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
-				return -2;
-			}
-
-			// 2.1 추가 가스 확인
-			if(gasApi.data.DeviceCnt == 2)
-			{
-				int ret2 = gasApi.Refresh((byte)1, real);
-				if(ret2 < 0)
-				{
-					Log.e(TAG, "[Device_Update] getState - ret (" + ret2 + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
-					return -2;
-				}
-			}
-
-			/*
-			// 2. Reflash
-			int ret = gasApi.Refresh(real);
-			if(ret < 0)
-			{
-				Log.e(TAG, "[Device_Update] getState - ret (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
-				return -2;
-			}
-			*/
-
-			// 3. Range Check
-			if(!GasAPI.GASSTATUS.CheckRange(gasApi.data.Device[0].GasStatus))
-			{
-				Log.e(TAG, "[Device_Update] - Status - Out of range !!! (" + gasApi.data.Device[0].GasStatus + ")");
-				return -3;
-			}
-
-			// 4. Data Copy
-			data.Status = gasApi.data.Device[0].GasStatus;
-
-			// 5. Debug msg
-			DebugLogOutput(gasApi.data.Device[0].ToDebugString());
-
-			DebugLogOutput("[Device_Update] - OK");
-
-		}
-		catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -4;
-        }
-		catch (Exception e)
-		{
-			Log.w(TAG, "[Device_Update] - Exception");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -4; // @@@@@@@
-		}
-
-		return 0;
-	}
-
-	/**
-	 * 가스 밸브를 닫는다.
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_GasClose()
-	{
-		DebugLogOutput("[Device_GasClose] - Start");
-
-		if(gasApi == null)
-		{
-			Log.e(TAG, "[Device_GasClose] - gasApi unload !!!");
-			return -1;
-		}
-		byte b0 = 0;
-		int ret = gasApi.SetClose(b0); // @@@@@@@@@@@@@@
-		if(ret < 0)
-		{
-			Log.e(TAG, "[Device_GasClose] - SetClose (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
-			return -2;
-		}
-
-		DebugLogOutput("[Device_GasClose] - OK");
-
-		return 0;
-	}
-
-
-	// =================================================================================================
-	// [[ Sample ]] region
-	// =================================================================================================
-	/**
-	 * (영업샘플모드) 가상으로 가스 제어기 밸브제어기를 닫는다.
-	 */
-	private CountDownTimer SampleModeTimer = null;
-	private void Sample_GasClose()
-	{
-		if(SampleModeTimer != null) SampleModeTimer.cancel();
-
-		Draw_GasStatusChange(GasAPI.GASSTATUS.Operation);
-
-		SampleModeTimer = new CountDownTimer( 4 * 1000, 1000) {
-			@Override
-			public void onFinish() {
-				Log.d(TAG, "SampleModeTimer - onFinish !!!");
-
-				Draw_GasStatusChange(GasAPI.GASSTATUS.Open);
-			}
-
-			@Override
-			public void onTick(long arg0) {
-				long RemainingTime = arg0/1000;
-				if( RemainingTime <= 2)
-				{
-					Log.d(TAG, "SampleModeTimer - onTick2 (" + RemainingTime + ")");
-
-					Draw_GasStatusChange(GasAPI.GASSTATUS.Close);
-				}
-			}
-		};
-		SampleModeTimer.cancel();
-		SampleModeTimer.start();
-	}
-	// =================================================================================================
-}
+/*
+ * Copyright (C) 2014 Android WallPad Project
+ *
+ * FileName  : GasMainScreen.java
+ * Project   : Android WallPad Project
+ * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
+ * Author    : Kang Sang Ho  , lairu@icontrols.co.kr
+ */
+
+package kr.co.icontrols.wallpadhomectrl.screen.screen_gas;
+
+import com.artncore.wallpadapi.GasAPI;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.artncore.wallpadapi.WallPadDevAPI;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.CountDownTimer;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import kr.co.icontrols.wallpadhomectrl.MainActivity;
+import kr.co.icontrols.wallpadhomectrl.R;
+import kr.co.icontrols.wallpadhomectrl.declare.*;
+import kr.co.icontrols.wallpadsupport.*;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
+
+
+/**
+ * @description
+ * 월패드 [우리집제어->가스] 화면 이다.<br>
+ * 가스 상태 (열림, 동작중, 닫힘) 표시, 닫기 실행<br>
+ * 을(를) 여기서 처리한다.
+ */
+@SuppressLint("ViewConstructor")
+public class GasMainScreen extends WpadScreen
+{
+	private final String TAG = "GasMainScreen";
+
+	private final boolean DEBUG_LOG_ON = true;
+	private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
+
+	// =================================================================================================
+	// [[ Declaration ]] region
+	// =================================================================================================
+	// [Image]
+	private WpadImageView Background;
+	private WpadImageView StatusImage;
+
+	// [Text]
+	private WpadTextView StatusText;
+
+	// [Button]
+	private WpadImageView CloseBtn;
+	//private WpadImageView AllCloseBtn;
+
+	// [Text]
+
+	// [Variables]
+	private int OPERATION_MODE = -1;
+
+	/*private GasAPI.Data data = null;
+	// [Class]
+	private class GasView
+	{
+		public WpadImageView Background;        // 배경
+		public WpadImageView StatusImage;       // 가스 상태 이미지
+		public WpadImageView CloseBtn;          // 닫기 버튼
+
+		public WpadTextView StatusText;         // 벨브 상태
+
+		*//**
+		 * 생성자
+		 * param left  - (int) 좌측마진
+		 * param top   - (int) 상측마진
+		 * param index - (int) 인덱스
+		 *//*
+		private GasView(int left, int top, int index)
+		{
+			Background = new WpadImageView(getContext(), TOUCH_KIND.NONE, 294, 324, R.drawable.bg_s_gas_box, R.drawable.bg_s_gas_box, ID.gasmain.image.BACKGROUND + index);
+			ViewRegistration(getLayout(), Background, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top));
+
+			StatusImage = new WpadImageView(getContext(), TOUCH_KIND.NONE, 278, 260, R.drawable.control_s_gas_image2, 0, ID.gasmain.image.STATUS_IMG + index);
+			ViewRegistration(getLayout(), StatusImage, Common.CtrlMarginLEFT(left+7), Common.CtrlMarginTOP(top+63));
+
+			CloseBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 294, 64, R.drawable.control_s_gas_btn_close_normal, R.drawable.control_s_gas_btn_close_pressed,
+					ID.gasmain.button.CLOSE + index);
+			ViewRegistration(getLayout(), CloseBtn, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top+324));
+			CloseBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			StatusText = new WpadTextView(getContext(), false, 294, 50, Gravity.CENTER, Color.BLACK, Common.fontsize._26_DEFAULT, true, ID.gasmain.text.STATUS + index);
+			ViewRegistration(getLayout(), StatusText, Common.CtrlMarginLEFT(left), Common.CtrlMarginTOP(top+12));
+		}
+	}
+	private GasView[] gasView = null;*/
+
+	private class Data
+	{
+		byte Status;                            // 0x00 닫힘 , 0x01 열림 , 0x02 동작중
+
+		public Data()
+		{
+			Status = GasAPI.GASSTATUS.Operation;      // 초기상태 동작중
+		}
+	}
+	private Data data = null;
+
+	// [API]
+	private GasAPI gasApi = null;          // 가스제어기 API
+	private TransactionDisplay transactionDisplay = null;
+
+	// =================================================================================================
+	// [[ Create & Close ]] region
+	// =================================================================================================
+	/**
+	 * GasMainScreen 클래스 생성자
+	 *
+	 * @param context - 부모 context
+	 * @param layout  - 사용할 main layout
+	 * param sound   - 상속받은 WpadSound
+	 * @param wpapi   - 상속받은 WallPadAPI
+	 * @param operationMode - 동작모드
+	 */
+	public GasMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)
+	{
+		super(context, layout);
+		Log.i(TAG, "[START - Screen] --------------------------------------------");
+
+		// 1. Data Create
+		DebugLogOutput("[Create] - Step1 : Data Create");
+		OPERATION_MODE = operationMode;
+		data = new Data();
+
+		// 2. Device API Load & Update
+		DebugLogOutput("[Create] - Step2 : Device API Load & Update");
+		if(OPERATION_MODE == Common.MODE_NOMAL)
+		{
+			DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
+			if(Device_ApiLoad(wpapi) >= 0) Device_Update(false);
+		}
+		else if(OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
+		{
+			DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
+			data.Status = GasAPI.GASSTATUS.Open;
+		}
+		else
+		{
+			DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
+			OPERATION_MODE = Common.MODE_NOMAL;
+		}
+
+		// 3. Image Create
+		DebugLogOutput("[Create] - Step3 : Image Create");
+		Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.GasMainScreenID.image.BACKGROUND);
+		ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
+		StatusImage = new WpadImageView(context, TOUCH_KIND.NONE, 822, 544, R.drawable.control_gas_image1, 0, ID.GasMainScreenID.image.STATUS_IMG);
+		ViewRegistration(layout, StatusImage, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(169));
+		StatusText = new WpadTextView(context, false, 150, 50, Gravity.START, Color.WHITE, Common.fontsize._36, true, ID.GasMainScreenID.text.STATUS);
+		ViewRegistration(layout, StatusText, Common.ImgPosion.GetX(143), Common.ImgPosion.GetY(219));
+		//StatusText.setText("test1111");
+
+		// 4. Button Create
+		DebugLogOutput("[Create] - Step4 : Button Create");
+		CloseBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 544, R.drawable.btn_gas_normal, R.drawable.btn_gas_close_pressed, ID.GasMainScreenID.button.CLOSE);
+		//ViewRegistration(layout, CloseBtn, Common.CtrlMarginLEFT(362), Common.CtrlMarginTOP(538));
+		ViewRegistration(layout, CloseBtn, Common.ImgPosion.GetX(957), Common.ImgPosion.GetY(169));
+		CloseBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+
+		// 5. Draw_Update
+		DebugLogOutput("[Create] - Step5 : Draw_Update");
+		Draw_Update();
+
+		if(gasApi != null)
+		{
+			Device_BrRegistration(true);
+			if(MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) gasApi, (WpadScreen) this);
+		}
+	}
+
+	/**
+	 * 본 스크린 종료시 호출됨
+	 */
+	@Override
+	protected void onClose()
+	{
+		super.onClose();
+
+		// 등록된 BR 을 해제 한다.
+		if(gasApi != null)
+		{
+			Device_BrRegistration(false);
+			if(MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
+		}
+
+		Log.i(TAG, "[END   - Screen] ********************************************");
+	}
+
+
+	// =================================================================================================
+	// [[ BroadcastReceiver ]] region
+	// =================================================================================================
+	/**
+	 * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
+	 */
+	@Override
+	protected void onBrReceive(Intent intent)
+	{
+		super.onBrReceive(intent);
+
+		String ActionName = intent.getAction();
+
+		DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
+		if(ActionName.equals(ID.GasMainScreenID.BR_GAS))
+		{
+			DebugLogOutput("onBrReceive - BR_GAS");
+			Device_Update(false);
+			Draw_Update();
+		}
+	}
+
+
+	// =================================================================================================
+	// [[ Touch & Key Event ]] region
+	// =================================================================================================
+	/**
+	 * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
+	 */
+	@Override
+	protected void onTouchEvent(View v, MotionEvent event)
+	{
+		super.onTouchEvent(v, event);
+
+		int TargetId = v.getId();
+		int MoveEvent = event.getAction();
+
+		if(MoveEvent == MotionEvent.ACTION_UP)
+		{
+			if(TargetId == ID.GasMainScreenID.button.CLOSE)
+			{
+				DebugLogOutput("onTouchEvent [CLOSE] BUTTON !!!");
+
+				if(OPERATION_MODE == Common.MODE_NOMAL)
+				{
+					// 이미 닫힌 상태에서 버튼을 누르면 disable이 아닌 normal로 돌아가는 것을 방지
+					if(data.Status == GasAPI.GASSTATUS.Close)
+					{
+						CloseBtn.setImageResource(R.drawable.btn_gas_disable);
+					}
+
+					int ret = Device_GasClose();
+					if(ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+
+				}
+				else if(OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
+				{
+					Sample_GasClose();
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+		}
+	}
+
+
+	// =================================================================================================
+	// [[ Draw ]] region
+	// =================================================================================================
+	/**
+	 * 변경되는 이미지를 다시 그린다.
+	 */
+	private void Draw_Update()
+	{
+		Draw_GasStatusChange(data.Status);
+	}
+
+	/**
+	 * 가스 제어기 이미지 상태 변경
+	 *
+	 * @param Status - 변경할 이미지 (0x00 닫힘 , 0x01 열림 , 0x02 동작중 , 그외 범위이탈 에러로그 출력)
+	 */
+	private void Draw_GasStatusChange(byte Status)
+	{
+		int ImageId = 0;
+		String Text = null;
+
+		if(Status == GasAPI.GASSTATUS.Close)
+		{
+			ImageId = R.drawable.control_gas_image1; // close
+			Text = "닫힘";
+			CloseBtn.setImageResource(R.drawable.btn_gas_disable);
+		}
+		else if(Status == GasAPI.GASSTATUS.Open)
+		{
+			ImageId = R.drawable.control_gas_image3; // open
+			Text = "열림";
+			CloseBtn.setImageResource(R.drawable.btn_gas_normal);
+		}
+		else if(Status == GasAPI.GASSTATUS.Operation)
+		{
+			ImageId = R.drawable.control_gas_image2; // moving
+			Text = "동작중";
+			CloseBtn.setImageResource(R.drawable.btn_gas_normal);
+		}
+		else
+		{
+			Log.e(TAG, "[Draw_GasStatusChange] - Status  Out of range !!! (" + Status + ")");
+			return;
+		}
+
+		if(StatusImage != null) StatusImage.setImageResource(ImageId);
+		if(StatusText != null) StatusText.setText(Text);
+	}
+
+
+	// =================================================================================================
+	// [[ Device ]] region
+	// =================================================================================================
+	/**
+	 * 디바이스 API 를 Load 한다.
+	 *
+	 * @param wpapi - 생성시 전달받은 WallPadAPI
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_ApiLoad(WallPadAPI wpapi)
+	{
+		// 1. Mode Check
+		if(OPERATION_MODE != Common.MODE_NOMAL) return -1;
+
+		DebugLogOutput("[Device_ApiLoad] - Start");
+
+		// 2. wpapi Check
+		if(wpapi == null)
+		{
+			Log.e(TAG, "[Device_ApiLoad] - wpapi is null");
+			return -2;
+		}
+
+		// 3. Load API
+		DebugLogOutput("[Device_ApiLoad] - Step1 : GasValve API Load...");
+		try
+		{
+			gasApi = wpapi.Get_GasController();
+		}
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e)
+		{
+			Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_GasValveController");
+			Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+		if(gasApi == null)
+		{
+			Log.e(TAG, "[Device_ApiLoad] - gasApi is null");
+			return -4;
+		}
+
+		DebugLogOutput("[Device_ApiLoad] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 디바이스에 알림 BR 을 등록한다.
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_BrRegistration(boolean OnOff)
+	{
+		DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
+
+		String BR_NAME = ID.GasMainScreenID.BR_GAS;
+
+		// 1. Api Load Check
+		if(gasApi == null)
+		{
+			Log.e(TAG, "[Device_BrRegistration] - gasApi unload !!!");
+			return -1;
+		}
+
+		if(OnOff)
+		{
+			try
+			{
+				//DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
+				gasApi.regChangedBR(BR_NAME);
+				//DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
+			}
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return -101;
+			}
+			catch (Exception e)
+			{
+				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] gasApi.regChangedBR");
+				Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
+				//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+				return -101;
+			}
+			super.addBrActionFilter(BR_NAME);
+		}
+		else
+		{
+			try
+			{
+				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
+				gasApi.unregChangedBR(BR_NAME);
+				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
+			}
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return -102;
+			}
+			catch (Exception e)
+			{
+				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] gasApi.unregChangedBR");
+				Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
+				return -102;
+			}
+			super.removeBrActionFilter(BR_NAME);
+		}
+
+		return 0;
+	}
+
+	/**
+	 * 제어기 상태를 가져온다.
+	 *
+	 * @param real - (boolean) true : 실시간 , false : 가장최근
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_Update(boolean real)
+	{
+		DebugLogOutput("[Device_Update] - Start   (real : " + real + ")");
+
+		// 1. Api Load Check
+		if(gasApi == null)
+		{
+			Log.e(TAG, "[Device_Update] - gasApi unload !!!");
+			return -1;
+		}
+
+		try
+		{
+			// 2. Reflash
+			int ret = gasApi.Refresh((byte)0, real);
+			if(ret < 0)
+			{
+				Log.e(TAG, "[Device_Update] getState - ret (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
+				return -2;
+			}
+
+			// 2.1 추가 가스 확인
+			if(gasApi.data.DeviceCnt == 2)
+			{
+				int ret2 = gasApi.Refresh((byte)1, real);
+				if(ret2 < 0)
+				{
+					Log.e(TAG, "[Device_Update] getState - ret (" + ret2 + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
+					return -2;
+				}
+			}
+
+			/*
+			// 2. Reflash
+			int ret = gasApi.Refresh(real);
+			if(ret < 0)
+			{
+				Log.e(TAG, "[Device_Update] getState - ret (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
+				return -2;
+			}
+			*/
+
+			// 3. Range Check
+			if(!GasAPI.GASSTATUS.CheckRange(gasApi.data.Device[0].GasStatus))
+			{
+				Log.e(TAG, "[Device_Update] - Status - Out of range !!! (" + gasApi.data.Device[0].GasStatus + ")");
+				return -3;
+			}
+
+			// 4. Data Copy
+			data.Status = gasApi.data.Device[0].GasStatus;
+
+			// 5. Debug msg
+			DebugLogOutput(gasApi.data.Device[0].ToDebugString());
+
+			DebugLogOutput("[Device_Update] - OK");
+
+		}
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -4;
+        }
+		catch (Exception e)
+		{
+			Log.w(TAG, "[Device_Update] - Exception");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -4; // @@@@@@@
+		}
+
+		return 0;
+	}
+
+	/**
+	 * 가스 밸브를 닫는다.
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_GasClose()
+	{
+		DebugLogOutput("[Device_GasClose] - Start");
+
+		if(gasApi == null)
+		{
+			Log.e(TAG, "[Device_GasClose] - gasApi unload !!!");
+			return -1;
+		}
+		byte b0 = 0;
+		int ret = gasApi.SetClose(b0); // @@@@@@@@@@@@@@
+		if(ret < 0)
+		{
+			Log.e(TAG, "[Device_GasClose] - SetClose (" + ret + ")   ErrorCode = " + gasApi.ErrorCode.ErrStr());
+			return -2;
+		}
+
+		DebugLogOutput("[Device_GasClose] - OK");
+
+		return 0;
+	}
+
+
+	// =================================================================================================
+	// [[ Sample ]] region
+	// =================================================================================================
+	/**
+	 * (영업샘플모드) 가상으로 가스 제어기 밸브제어기를 닫는다.
+	 */
+	private CountDownTimer SampleModeTimer = null;
+	private void Sample_GasClose()
+	{
+		if(SampleModeTimer != null) SampleModeTimer.cancel();
+
+		Draw_GasStatusChange(GasAPI.GASSTATUS.Operation);
+
+		SampleModeTimer = new CountDownTimer( 4 * 1000, 1000) {
+			@Override
+			public void onFinish() {
+				Log.d(TAG, "SampleModeTimer - onFinish !!!");
+
+				Draw_GasStatusChange(GasAPI.GASSTATUS.Open);
+			}
+
+			@Override
+			public void onTick(long arg0) {
+				long RemainingTime = arg0/1000;
+				if( RemainingTime <= 2)
+				{
+					Log.d(TAG, "SampleModeTimer - onTick2 (" + RemainingTime + ")");
+
+					Draw_GasStatusChange(GasAPI.GASSTATUS.Close);
+				}
+			}
+		};
+		SampleModeTimer.cancel();
+		SampleModeTimer.start();
+	}
+	// =================================================================================================
+}

+ 37 - 8
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_gas/HybridCookTopMainScreen.java

@@ -235,18 +235,16 @@ public class HybridCookTopMainScreen extends WpadScreen {
 
         public void setErrorCode(byte code)
         {
-            String strCode = "Error : 0x" + code;
+            final String strCode = "Error : 0x" + String.format("%02X", code);
             TXT_ERRORCODE.setText(strCode);
-
         }
 
         public void clearErrorCode()
         {
-            TXT_STATUS.setText("");
+            TXT_ERRORCODE.setText("");
         }
 
         public void setVisibility(boolean set) {
-//            Log.i(TAG, "[setVisibility] set [" + set + "]");
             if (set) {
                 BACKGROUND.setVisibility(View.VISIBLE);
                 BTN_ONOFF.setVisibility(View.VISIBLE);
@@ -514,7 +512,7 @@ public class HybridCookTopMainScreen extends WpadScreen {
                     //임의로 모드 변경
                     if(mData.Device[MainDeviceID].circuit[index].hStatus == DataClasses.CooktopCtrl.DEVICE_STATUS.OPEN)
                     {
-                        ctrlDeviceMode((byte)index);
+                        ctrlDeviceMode((byte)(index));
                         Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
                     }
                 }
@@ -614,7 +612,7 @@ public class HybridCookTopMainScreen extends WpadScreen {
         {
             //  콘센트 ON/OFF 업데이트
             if( mData.Device[MainDeviceID].circuit[RoomIndex].hStatus != DataClasses.CooktopCtrl.DEVICE_STATUS.NOINFO) {
-                if(mData.Device[MainDeviceID].circuit[RoomIndex].hStatus != DataClasses.CooktopCtrl.DEVICE_STATUS.OPEN)
+                if(mData.Device[MainDeviceID].circuit[RoomIndex].hStatus == DataClasses.CooktopCtrl.DEVICE_STATUS.OPEN)
                 {
                     OnCount++;
                 }
@@ -746,17 +744,28 @@ public class HybridCookTopMainScreen extends WpadScreen {
             if(mode == 0x01)
             {
                 roomView[index].BTN_ONOFF.setButtonFrontImage();
-                roomView[index].TXT_STATUS.setText("OFF");
+                //roomView[index].TXT_STATUS.setText("OFF");
+                Message msg = StatusChangeHandler.obtainMessage();
+                msg.what = index;
+                msg.arg1 = 1;
+                StatusChangeHandler.sendMessage(msg);
             }
             else if(mode == 0x02)
             {
                 if(roomView[index].getisGas())
                     roomView[index].BTN_ONOFF.setImageResource(R.drawable.btn_gas_45);
+                Message msg = StatusChangeHandler.obtainMessage();
+                msg.what = index;
+                msg.arg1 = 2;
+                StatusChangeHandler.sendMessage(msg);
             }
             else if(mode == 0x03)
             {
                 roomView[index].BTN_ONOFF.setButtonRearImage();
-                roomView[index].TXT_STATUS.setText("ON");
+                Message msg = StatusChangeHandler.obtainMessage();
+                msg.what = index;
+                msg.arg1 = 0;
+                StatusChangeHandler.sendMessage(msg);
             }
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
@@ -768,6 +777,26 @@ public class HybridCookTopMainScreen extends WpadScreen {
         }
     }
 
+
+    private Handler StatusChangeHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            int index = msg.what;
+            if(msg.arg1 == 0)
+            {
+                roomView[index].TXT_STATUS.setText("ON");
+            }
+            else if(msg.arg1 == 1)
+            {
+                roomView[index].TXT_STATUS.setText("OFF");
+            }
+            else
+            {
+                roomView[index].TXT_STATUS.setText("CHANGING");
+            }
+        }
+    };
+
     private void movePage(boolean bNext) {
         try {
             if (bNext) {

+ 1732 - 1732
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_heating/HeatingV2MainScreen.java

@@ -1,1732 +1,1732 @@
-/*
- * Copyright (C) 2018 Android WallPad Project
- *
- * FileName  : HeatingV2MainScreen.java
- * Project   : Android WallPad Project
- * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
- * Author    : Choi In Bo  , inbo207@icontrols.co.kr
- */
-
-package kr.co.icontrols.wallpadhomectrl.screen.screen_heating;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Color;
-import android.util.Log;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.RelativeLayout;
-
-import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
-import com.artncore.commons.DataClasses.HeatingV2;
-import com.artncore.wallpadapi.HeatingV2API;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.artncore.wallpadapi.WallPadDevAPI;
-import com.util.LogUtil;
-
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
-import kr.co.icontrols.wallpadhomectrl.R;
-import kr.co.icontrols.wallpadhomectrl.declare.Common;
-import kr.co.icontrols.wallpadhomectrl.declare.ID;
-import kr.co.icontrols.wallpadhomectrl.declare.TransactionDisplay;
-import kr.co.icontrols.wallpadsupport.Version;
-import kr.co.icontrols.wallpadsupport.WpadImageView;
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-import kr.co.icontrols.wallpadsupport.WpadScreen;
-import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-import kr.co.icontrols.wallpadsupport.WpadTextView;
-
-
-/**
- * @description
- * 월패드 [우리집제어->난방] 화면 이다.<br>
- * 프로토콜V2을 본 화면에서 연동 처리한다.<br>
- * 각방 난방ON/OFF, 각방 세부화면 팝업링크, 전체방 일시정지 or 외출 실행 해제<br>
- * 을(를) 여기서 처리한다.
- */
-@SuppressLint({ "ViewConstructor", "DefaultLocale" })
-public class HeatingV2MainScreen extends WpadScreen {
-    private final String TAG = "HeatingV2MainScreen";
-
-    private final boolean DEBUG_LOG_ON = true;
-    private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
-
-    // =================================================================================================
-    // [[ Declaration ]] region
-    // =================================================================================================
-    // [Image]
-    private WpadImageView BACKGROUND;
-
-    // [Button]
-    private WpadImageView BTN_ENTIRE_ON;      // 전체방 On
-    private WpadImageView BTN_ENTIRE_OFF;        // 전체방 Off
-
-    private WpadImageView BTN_ENTIRE_SET_PAUSEOUT;      // 전체방 일시정지 or 외출 [실행]
-    private WpadImageView BTN_ENTIRE_UNSET_PAUSEOUT;        // 전체방 일시정지 or 외출 [해제]
-
-    private WpadImageView BTN_PAGE_UP;
-    private WpadImageView BTN_PAGE_DOWN;
-
-    // [Text]
-    private WpadTextView TXT_PAGE_NO;
-
-    private int UX_MODE = -1; // UX 모드 (0: 일반 / 1: 간편모드)
-
-    private int ROOM_CNT = ROOM_CNT_NORMAL;   // 한 화면에 표시하는 방개수
-    private final static int ROOM_CNT_EASYMODE = 4;
-    private final static int ROOM_CNT_NORMAL = 6;
-
-    int nDistributionPanelType = Version.DISTRIBUTION_MODEL.OTHER;
-
-    private String[] mKNXDefaultRoomNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방"};
-
-    // [Package]
-    /**
-     * 개별방의 View 구조를 정의한다.
-     */
-    private class RoomView {
-        public WpadImageView BACKGROUND;        // 배경
-        public WpadImageView IMG_FIRE;          // 불꽃표시
-
-        public WpadImageView BTN_TITLE;          // 방표시 버튼
-        public WpadImageView BTN_ONOFF;          // 운전모드 ON/OFF 버튼
-
-        public WpadTextView TXT_TITLE;          // 방이름
-        public WpadTextView TXT_MODE;           // 운전모드 표시
-        public WpadTextView TXT_TEMPER_CURRENT;        // 현재온도
-        public WpadTextView TXT_TEMPER_SET;        // 설정온도
-
-        /**
-         * 생성자
-         * @param left  - (int) 좌측마진
-         * @param top   - (int) 상측마진
-         * @param index - (int) 인덱스
-         */
-        private RoomView(int left, int top, int index) {
-            if (UX_MODE == Common.UX_EASY_MODE) {
-                BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 390, 271,  R.drawable.bg_room_easymode, R.drawable.bg_room_easymode, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-
-                int[] mOffImg_easymode = {R.drawable.btn_heat_onoff_off_easymode, R.drawable.btn_heat_onoff_off_easymode};
-                int[] mOnImg_easymode = {R.drawable.btn_heat_onoff_on_easymode, R.drawable.btn_heat_onoff_on_easymode};
-                BTN_ONOFF = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 120, mOffImg_easymode, mOnImg_easymode, ID.heatingV2main.button.ROOM_ONOFF_1 + index);
-                //ViewRegistration(getLayout(), OnOffBtn, left+119, top+67);
-                ViewRegistration(getLayout(), BTN_ONOFF, Common.ImgPosion.GetX(left+37), Common.ImgPosion.GetY(top+111));
-                BTN_ONOFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            }
-            else {
-                // 룸뷰 배경 그리기
-                if (nRoomCnt == 1) {
-                    BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                    ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                }
-                else if (nRoomCnt == 2) {
-                    if (index == 1) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 3) {
-                    if (index == 2) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 4) {
-                    if (index == 1 || index == 3) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 5) {
-                    if (index == 2 || index == 4) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 6) {
-                    if (index == 2 || index == 5) {
-                        // 3번째 와 6번째 혹은 2번째이거나 5번쨰(행의 마지막 순번)
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 7) {
-                    if (index == 2 || index == 5) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-                else if (nRoomCnt == 8) {
-                    if (index == 2 || index == 5 || index == 7) {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                    else {
-                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
-                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                    }
-                }
-
-                int[] mOffImg = {R.drawable.btn_heat_onoff_off, R.drawable.btn_heat_onoff_off};
-                int[] mOnImg = {R.drawable.btn_heat_onoff_on, R.drawable.btn_heat_onoff_on};
-                BTN_ONOFF = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 140, 100, mOffImg, mOnImg, ID.heatingV2main.button.ROOM_ONOFF_1 + index);
-                //ViewRegistration(getLayout(), OnOffBtn, left+119, top+67);
-                ViewRegistration(getLayout(), BTN_ONOFF, Common.ImgPosion.GetX(left+134), Common.ImgPosion.GetY(top+71));
-                BTN_ONOFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            }
-
-            int[][] mFirePos = {{100, 105}, {305, 116}};
-            IMG_FIRE = new WpadImageView(getContext(), TOUCH_KIND.NONE, 26, 32, R.drawable.heating_fire, 0, ID.heatingV2main.image.ROOM_FIRE_1 + index);
-            //ViewRegistration(getLayout(), FireMark, left+100, top+115);
-            ViewRegistration(getLayout(), IMG_FIRE, Common.ImgPosion.GetX(left+mFirePos[UX_MODE][0]), Common.ImgPosion.GetY(top+mFirePos[UX_MODE][1]));
-
-            int[][] mTitleImg = {{R.drawable.btn_heat_room_name_normal, R.drawable.btn_heat_room_name_normal_easymode}, {R.drawable.btn_heat_room_name_pressed, R.drawable.btn_heat_room_name_pressed_easymode}};
-            int[][] mTitleSize = {{271, 56}, {370, 60}};
-            BTN_TITLE = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, mTitleSize[UX_MODE][0], mTitleSize[UX_MODE][1], mTitleImg[0][UX_MODE], mTitleImg[1][UX_MODE], ID.heatingV2main.button.ROOM_TITLE_1 + index);
-            //ViewRegistration(getLayout(), TitleBtn, left+10, top+10);
-            ViewRegistration(getLayout(), BTN_TITLE, Common.ImgPosion.GetX(left+10), Common.ImgPosion.GetY(top+10));
-            BTN_TITLE.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-
-            int[] mTitleFontSize = {Common.fontsize._35, Common.fontsize._44};
-            TXT_TITLE = new WpadTextView(getContext(), false, mTitleSize[UX_MODE][0], mTitleSize[UX_MODE][1], Gravity.CENTER, Color.BLACK, mTitleFontSize[UX_MODE], true, ID.heatingV2main.text.ROOM_TITLE_1 + index);
-            //ViewRegistration(getLayout(), TitleText, left+10, top+10);
-            ViewRegistration(getLayout(), TXT_TITLE, Common.ImgPosion.GetX(left+10), Common.ImgPosion.GetY(top+10) - UX_MODE*2);
-
-            int[] mModeFontSize = {Common.fontsize._32_POPUP_TITLE, Common.fontsize._40};
-            int[][] mModeSize = {{128, 51}, {155, 50}};
-            int[][] mModePos = {{13, 105}, {196, 107}};
-            boolean bTextBold = (UX_MODE == Common.UX_EASY_MODE) ? false : true;
-            TXT_MODE = new WpadTextView(getContext(), false, mModeSize[UX_MODE][0], mModeSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mModeFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_MODE_1 + index);
-            ViewRegistration(getLayout(), TXT_MODE, Common.ImgPosion.GetX(left+mModePos[UX_MODE][0]), Common.ImgPosion.GetY(top+mModePos[UX_MODE][1]));
-
-            int[][] mTempSize = {{102, 63}, {90, 48}};
-            int[][] mNowTempPos = {{40, 185}, {163, 192}};
-            int[] mTempFontSize = {Common.fontsize._30, Common.fontsize._40};
-            TXT_TEMPER_CURRENT = new WpadTextView(getContext(), false, mTempSize[UX_MODE][0], mTempSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mTempFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_NOWTEMP_1 + index);
-            ViewRegistration(getLayout(), TXT_TEMPER_CURRENT, Common.ImgPosion.GetX(left+mNowTempPos[UX_MODE][0]), Common.ImgPosion.GetY(top+mNowTempPos[UX_MODE][1]));
-
-            int[][] mSetTempPos = {{187, 185}, {281, 192}};
-            TXT_TEMPER_SET = new WpadTextView(getContext(), false, mTempSize[UX_MODE][0], mTempSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mTempFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_SETTEMP_1 + index);
-            ViewRegistration(getLayout(), TXT_TEMPER_SET, Common.ImgPosion.GetX(left+mSetTempPos[UX_MODE][0]), Common.ImgPosion.GetY(top+mSetTempPos[UX_MODE][1]));
-        }
-
-
-        public void setVisibility(boolean set) {
-//            Log.i(TAG, "[setVisibility] set [" + set + "]");
-            if (set) {
-                BACKGROUND.setVisibility(View.VISIBLE);
-                IMG_FIRE.setVisibility(View.VISIBLE);
-                BTN_TITLE.setVisibility(View.VISIBLE);
-                BTN_ONOFF.setVisibility(View.VISIBLE);
-                TXT_TITLE.setVisibility(View.VISIBLE);
-                TXT_MODE.setVisibility(View.VISIBLE);
-                TXT_TEMPER_CURRENT.setVisibility(View.VISIBLE);
-                TXT_TEMPER_SET.setVisibility(View.VISIBLE);
-            }
-            else {
-                BACKGROUND.setVisibility(View.INVISIBLE);
-                IMG_FIRE.setVisibility(View.INVISIBLE);
-                BTN_TITLE.setVisibility(View.INVISIBLE);
-                BTN_ONOFF.setVisibility(View.INVISIBLE);
-                TXT_TITLE.setVisibility(View.INVISIBLE);
-                TXT_MODE.setVisibility(View.INVISIBLE);
-                TXT_TEMPER_CURRENT.setVisibility(View.INVISIBLE);
-                TXT_TEMPER_SET.setVisibility(View.INVISIBLE);
-            }
-        }
-    }
-
-    /**
-     * 전체방의 구조를 정의한다.
-     */
-    private RoomView [] roomView = null;
-
-    private class Data {
-        HeatingV2API.Data heatingV2;
-        public Data() {
-            heatingV2 = new HeatingV2API.Data();
-        }
-    }
-
-    // [Variables]
-    private int OPERATION_MODE = -1;                    // 동작모드
-    private Data mData = null;                          // 데이터
-    private String [] astrRoomTitle = null;             // 각방 명칭
-    private int nRoomCnt = 0;
-    public static int nCurrentPageNo = 1;
-    public static int nTotalPageNo = 1;
-
-    /**
-     * 방 개수에 따른 좌표를 정의한다.
-     */
-    private  int [][][] mRoomPos = new int [][][]
-            {
-                    { {345, 328}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                         // 1개(가이드 좌표 X - 임의 설정)
-                    { {200, 328}, {489, 328}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                     // 2개(가이드 좌표 X - 임의 설정)
-                    { {50, 328}, {339, 328}, {628, 328}, {0, 0}, {0, 0}, {0, 0} },                 // 3개(가이드 좌표 O)
-                    { {200, 168}, {489, 168}, {200, 462}, {489, 462}, {0, 0}, {0, 0} },             // 4개(가이드 좌표 O)
-                    { {70, 168}, {359, 168}, {648, 168}, {200, 462}, {489, 462}, {0, 0}},            // 5개(가이드 좌표 O)
-                    { {70, 168}, {359, 168}, {648, 168}, {70, 462}, {359, 462}, {648, 462} },       // 6개(가이드 좌표 O)
-                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {345, 328} },                  // 7개
-                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {200, 328}, {489, 328}},       // 8개
-                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {50, 328}, {339, 328}, {628, 328}} // 9개
-            };
-
-    private  int [][][] mRoomPos_easymode = new int [][][]
-            {
-                    { {294, 245}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                         // 1개(가이드 좌표 X - 임의 설정)
-                    { {114, 245}, {504,245}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                     // 2개(가이드 좌표 X - 임의 설정)
-                    { {114, 110}, {504, 110}, {294, 381}, {0, 0}, {0, 0}, {0, 0} },                 // 3개(가이드 좌표 O)
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {0, 0}, {0, 0} },             // 4개(가이드 좌표 O)
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {294, 245}, {0, 0}},            // 5개(가이드 좌표 O)
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 245}, {504,245} },       // 6개(가이드 좌표 O)
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {294, 381} },                  // 7개
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {114, 381}, {504, 381}},       // 8개
-                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {114, 381}, {504, 381}, {294, 245}} // 9개
-            };
-
-    private String [] mDriveModeString = new String [] { "" , "난방" , "꺼짐" , "외출", "", "취침", "예약", "일시정지", "" };
-
-    // [API]
-    private HeatingV2API heatingV2API;       // 난방 API
-    private TransactionDisplay transactionDisplay = null;
-
-    public String Heating_Manual_Str = "";
-
-    // =================================================================================================
-    // [[ Create & Close ]] region
-    // =================================================================================================
-    /**
-     * HeatingV1MainScreen 클래스 생성자
-     *
-     * @param context - 부모 context
-     * @param layout  - 사용할 main layout
-     * @param wpapi   - 상속받은 WallPadAPI
-     * @param operationMode - 동작모드
-     */
-    public HeatingV2MainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode, String [] roomNameList) {
-        super(context, layout);
-        Log.i(TAG, "[START - Screen] --------------------------------------------");
-
-        // 1. Data Create
-        DebugLogOutput("[HeatingV2MainScreen] - Step1 : Data Create");
-        OPERATION_MODE = operationMode;
-        WallpadDeviceSet wds = new WallpadDeviceSet(getContext());
-        nDistributionPanelType = wds.Get_DistributionPannelType_Info();
-        wds.closeDB();
-
-        if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) astrRoomTitle = mKNXDefaultRoomNameList;
-        else astrRoomTitle = roomNameList;
-
-        mData = new Data();
-
-        UX_MODE = ((MainActivity) context).GetEasyModeUXUse() ? Common.UX_EASY_MODE : Common.UX_NORMAL_MODE;
-        Log.d(TAG, "[HeatingV2MainScreen] UX_MODE [" + UX_MODE + "]");
-        if (UX_MODE == Common.UX_NORMAL_MODE) {
-            ROOM_CNT = ROOM_CNT_NORMAL;
-        }
-        else if (UX_MODE == Common.UX_EASY_MODE) {
-            ROOM_CNT = ROOM_CNT_EASYMODE;
-        }
-        else {
-            Log.e(TAG, "UX_MODE : " + UX_MODE + " Out of range !!!");
-        }
-
-        // 2. Device API Load & Update
-        DebugLogOutput("[HeatingV2MainScreen] - Step2 : Device API Load & Update");
-        if (OPERATION_MODE == Common.MODE_NOMAL) {
-            DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
-            if (loadDeviceAPI(wpapi) >= 0) updateDevice(Common.INDEX_ALL, false);
-        }
-        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-            DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
-            Sample_DataDefaultSetting();
-        }
-        else {
-            Log.e(TAG, "OPERATION_MODE : " + OPERATION_MODE + " Out of range !!!");
-        }
-
-        // 임시로 샘플 데이터를 통해 화면에 출력하도록 한다.
-        //Sample_DataDefaultSetting();
-
-        // 3. Image Create
-        DebugLogOutput("[HeatingV2MainScreen] - Step3 : Image Create");
-
-        HeatingV2.Info info = mData.heatingV2.Device.info;
-        nTotalPageNo = (info.RoomCount / ROOM_CNT) + (((info.RoomCount % ROOM_CNT) > 0) ? 1: 0);
-        Log.d(TAG, "[HeatingV2MainScreen] CurrentPageNum [" + nCurrentPageNo + "], TotalPageNum [" + nTotalPageNo + "]");
-
-        BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.heatingV2main.image.BACKGROUND);
-        ViewRegistration(layout, BACKGROUND, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
-
-        // 4. Button Create
-        DebugLogOutput("[HeatingV2MainScreen] - Step4 : Button Create");
-
-        int nImgID_EntireOn_Normal = 0;
-        int nImgID_EntireOn_Pressed = 0;
-        int nImgID_EntireOff_Normal = 0;
-        int nImgID_EntireOff_Pressed = 0;
-
-        int nImgID_Set_PuaseOut_Normal = 0;
-        int nImgID_Set_PuaseOut_Pressed = 0;
-        int nImgID_Unset_PuaseOut_Normal = 0;
-        int nImgID_Unset_PuaseOut_Pressed = 0;
-
-        boolean bImageIDSet = false;
-        if (info.Support.Pause) {
-            // 전체방 일시정지
-            if (UX_MODE == Common.UX_EASY_MODE) {
-                nImgID_Set_PuaseOut_Normal = R.drawable.btn_run_pause_normal_easymode;          // 전체방 일시정지 [실행]
-                nImgID_Set_PuaseOut_Pressed = R.drawable.btn_run_pause_pressed_easymode;
-                nImgID_Unset_PuaseOut_Normal = R.drawable.btn_run_release_normal_easymode;          // 전체방 일시정지 [해제]
-                nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_run_release_pressed_easymode;
-            }
-            else {
-                nImgID_Set_PuaseOut_Normal = R.drawable.control_heat_btn_all_pause_ok_normal;          // 전체방 일시정지 [실행]
-                nImgID_Set_PuaseOut_Pressed = R.drawable.control_heat_btn_all_pause_ok_pressed;
-                nImgID_Unset_PuaseOut_Normal = R.drawable.control_heat_btn_all_pause_cancel_normal;        // 전체방 일시정지 [해제]
-                nImgID_Unset_PuaseOut_Pressed = R.drawable.control_heat_btn_all_pause_cancel_pressed;
-            }
-            bImageIDSet = true;
-            Heating_Manual_Str += "Batch:Pause/";
-        }
-        else if (info.Support.Outing) {
-            if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
-                nImgID_EntireOn_Normal = R.drawable.btn_ctrl_heating_all_on_normal;          // 전체방 ON [실행]
-                nImgID_EntireOn_Pressed = R.drawable.btn_ctrl_heating_all_on_pressed;
-                nImgID_EntireOff_Normal = R.drawable.btn_ctrl_heating_all_off_normal;        // 전체방 OFF [해제]
-                nImgID_EntireOff_Pressed = R.drawable.btn_ctrl_heating_all_off_pressed;
-
-                nImgID_Set_PuaseOut_Normal = R.drawable.btn_ctrl_heating_all_goout_on_normal;          // 전체방 외출 [실행]
-                nImgID_Set_PuaseOut_Pressed = R.drawable.btn_ctrl_heating_all_goout_on_pressed;
-                nImgID_Unset_PuaseOut_Normal = R.drawable.btn_ctrl_heating_all_goout_off_normal;        // 전체방 외출 [해제]
-                nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_ctrl_heating_all_goout_off_pressed;
-                bImageIDSet = true;
-                Heating_Manual_Str += "Batch:Outing/";
-            }
-            else {
-                // 전체방 외출
-                if (UX_MODE == Common.UX_EASY_MODE) {
-                    nImgID_Set_PuaseOut_Normal = R.drawable.btn_run_goout_normal_easymode;          // 전체방 외출 [실행]
-                    nImgID_Set_PuaseOut_Pressed = R.drawable.btn_run_goout_pressed_easymode;
-                    nImgID_Unset_PuaseOut_Normal = R.drawable.btn_release_goout_normal_easymode;        // 전체방 외출 [해제]
-                    nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_release_goout_pressed_easymode;
-                }
-                else {
-                    nImgID_Set_PuaseOut_Normal = R.drawable.control_heat_btn_all_goout_ok_normal;          // 전체방 외출 [실행]
-                    nImgID_Set_PuaseOut_Pressed = R.drawable.control_heat_btn_all_goout_ok_pressed;
-                    nImgID_Unset_PuaseOut_Normal = R.drawable.control_heat_btn_all_goout_cancel_normal;        // 전체방 외출 [해제]
-                    nImgID_Unset_PuaseOut_Pressed = R.drawable.control_heat_btn_all_goout_cancel_pressed;
-                }
-                bImageIDSet = true;
-                Heating_Manual_Str += "Batch:Outing/";
-            }
-        }
-        else {
-            Log.e(TAG, "[HeatingV2MainScreen] mData.Pause & Outing Not Supported !!!");
-        }
-
-        if (bImageIDSet) {
-            if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
-                int[][] mAllOnPos = {{980, 168}, {980, 168}};
-                BTN_ENTIRE_ON = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_EntireOn_Normal, nImgID_EntireOn_Pressed, ID.heatingV2main.button.ALL_ON);
-                ViewRegistration(layout, BTN_ENTIRE_ON, Common.ImgPosion.GetX(mAllOnPos[UX_MODE][0]), Common.ImgPosion.GetY(mAllOnPos[UX_MODE][1]));
-                BTN_ENTIRE_ON.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-                int[][] mAllOffPos = {{980, 304}, {980, 384}};
-                BTN_ENTIRE_OFF = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_EntireOff_Normal, nImgID_EntireOff_Pressed, ID.heatingV2main.button.ALL_OFF);
-                ViewRegistration(layout, BTN_ENTIRE_OFF, Common.ImgPosion.GetX(mAllOffPos[UX_MODE][0]), Common.ImgPosion.GetY(mAllOffPos[UX_MODE][1]));
-                BTN_ENTIRE_OFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-                int[][] mExecutePos = {{980, 440}, {980, 440}};
-                BTN_ENTIRE_SET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_Set_PuaseOut_Normal, nImgID_Set_PuaseOut_Pressed, ID.heatingV2main.button.ALL_EXECUTION);
-                ViewRegistration(layout, BTN_ENTIRE_SET_PAUSEOUT, Common.ImgPosion.GetX(mExecutePos[UX_MODE][0]), Common.ImgPosion.GetY(mExecutePos[UX_MODE][1]));
-                BTN_ENTIRE_SET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-                int[][] mReleasePos = {{980, 576}, {980, 576}};
-                BTN_ENTIRE_UNSET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_Unset_PuaseOut_Normal, nImgID_Unset_PuaseOut_Pressed, ID.heatingV2main.button.ALL_RELEASE);
-                ViewRegistration(layout, BTN_ENTIRE_UNSET_PAUSEOUT, Common.ImgPosion.GetX(mReleasePos[UX_MODE][0]), Common.ImgPosion.GetY(mReleasePos[UX_MODE][1]));
-                BTN_ENTIRE_UNSET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            }
-            else {
-                int[][] mExecutePos = {{980, 168}, {936, 110}};
-                BTN_ENTIRE_SET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 272, nImgID_Set_PuaseOut_Normal, nImgID_Set_PuaseOut_Pressed, ID.heatingV2main.button.ALL_EXECUTION);
-                ViewRegistration(layout, BTN_ENTIRE_SET_PAUSEOUT, Common.ImgPosion.GetX(mExecutePos[UX_MODE][0]), Common.ImgPosion.GetY(mExecutePos[UX_MODE][1]));
-                BTN_ENTIRE_SET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-                int[][] mReleasePos = {{980, 440}, {936, 382}};
-                BTN_ENTIRE_UNSET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 272, nImgID_Unset_PuaseOut_Normal, nImgID_Unset_PuaseOut_Pressed, ID.heatingV2main.button.ALL_RELEASE);
-                ViewRegistration(layout, BTN_ENTIRE_UNSET_PAUSEOUT, Common.ImgPosion.GetX(mReleasePos[UX_MODE][0]), Common.ImgPosion.GetY(mReleasePos[UX_MODE][1]));
-                BTN_ENTIRE_UNSET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            }
-        }
-
-        nRoomCnt = info.RoomCount;
-        Log.i(TAG, "nRoomCnt = " + nRoomCnt);
-        Heating_Manual_Str += "Room:" + nRoomCnt + "/";
-        Log.d(TAG, "[HeatingV2MainScreen] nRoomCnt [" + nRoomCnt + "]");
-
-        /**
-         * 방명칭 수정코드 (JEFF, 2020.07.20)
-         * 사용자 설정화면에서 방명칭이 수정되어 실제 방개수보다 방명칭 개수가 적은 경우
-         * 부족한 방명칭을 보충하는 기능
-         * 사유: 방명칭 설정시 방명칭의 최대 개수는 6이 되어, 방 개수가 그 이상인 경우에는 오류 발생
-         * 추후, 방명칭 설정 기능도 수정해야 함
-         */
-        if (astrRoomTitle.length < nRoomCnt) {
-            String[] tempRoomName = new String[nRoomCnt];
-            for (int i = 0; i < nRoomCnt; i++) {
-                if (astrRoomTitle.length > i) tempRoomName[i] = astrRoomTitle[i];
-                else tempRoomName[i] = "방" + i;
-            }
-            astrRoomTitle = tempRoomName;
-            for (int i = 0; i < astrRoomTitle.length; i++) {
-                Log.i(TAG, "[HeatingV2MainScreen] mRoomNameList[" + i + "]: " + astrRoomTitle[i]);
-            }
-        }
-
-        // 5. RoomClass Create
-        DebugLogOutput("[HeatingV2MainScreen] - Step5 : RoomClass Create");
-        BTN_PAGE_UP =  new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 110, R.drawable.btn_left_normal, R.drawable.btn_left_pressed, ID.heatingV2main.button.LEFT_MOVE_BTN );
-        ViewRegistration(getLayout(), BTN_PAGE_UP, Common.ImgPosion.GetX(262), Common.ImgPosion.GetY(670));
-
-        BTN_PAGE_DOWN =  new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 110, R.drawable.btn_right_normal, R.drawable.btn_right_pressed, ID.heatingV2main.button.RIGHT_MOVE_BTN );
-        ViewRegistration(getLayout(), BTN_PAGE_DOWN, Common.ImgPosion.GetX(636), Common.ImgPosion.GetY(670));
-
-        int[] mPageFontSize = {Common.fontsize._36, Common.fontsize._44};
-        TXT_PAGE_NO = new WpadTextView(getContext(), false, 264, 110, Gravity.CENTER, Color.WHITE, mPageFontSize[UX_MODE], false, ID.heatingV2main.text.PAGE_TEXT);
-        ViewRegistration(getLayout(), TXT_PAGE_NO, Common.ImgPosion.GetX(372), Common.ImgPosion.GetY(670));
-        TXT_PAGE_NO.setText(nCurrentPageNo + "/" + nTotalPageNo);
-
-        roomView = new RoomView[info.RoomCount];
-
-        nCurrentPageNo = 1;
-        drawCurrentPage(info, (nCurrentPageNo - 1) * ROOM_CNT);
-
-        // 6. Draw_Update
-//        DebugLogOutput("[HeatingV2MainScreen] - Step6 : Draw_Update");
-
-        //     6.1. Room Name 표시
-//        Draw_TitleUpdate((CurrentPageNum - 1) * ROOM_CNT);
-//        DebugLogOutput("Draw_TitleUpdate ---");
-
-        //     6.2. 보일러 지원 여부에 따라 아이콘 보이기
-        Log.d(TAG, "[HeatingV2MainScreen] - Boiler : " + info.Support.Boiler);
-        if (info.Support.Boiler) {
-            ((MainActivity)(getContext())).setTopBoilerBtnVisible(true);
-            Heating_Manual_Str += "Boiler:" + 1 + "/";
-        }
-        else {
-            Heating_Manual_Str += "Boiler:" + 0 + "/";
-        }
-
-        //     6.3. update
-        try {
-            drawUpdate(Common.INDEX_ALL);
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-
-        DebugLogOutput("[HeatingV2MainScreen] Draw_Update ---");
-
-        if (heatingV2API != null) {
-            registerDeviceBR(true);
-            if (MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) heatingV2API, (WpadScreen) this);
-        }
-    }
-
-    /**
-     * 본 스크린 종료시 호출됨
-     */
-    @Override
-    protected void onClose() {
-        super.onClose();
-
-        // 등록된 BR 을 해제 한다.
-        if (heatingV2API != null) {
-            registerDeviceBR(false);
-            if (MainActivity.getHideMenuOn()) { if (transactionDisplay != null) transactionDisplay.Close(); }
-        }
-
-        // 보일러 지원 여부에 따라 아이콘 안보이기
-        if (mData.heatingV2.Device.info.Support.Boiler) ((MainActivity)(getContext())).setTopBoilerBtnVisible(false);
-
-        Log.i(TAG, "[END   - Screen] ********************************************");
-    }
-
-    /**
-     * 팝업종료시 데이터가 있을시 호출됨
-     */
-    @Override
-    protected void onPopupResult(Intent intent) {
-        if (intent != null) {
-            int Screen = intent.getIntExtra("SCREEN", -1);
-            if (Screen == ID.screen.HeatingV2PopupScreen) {
-                if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    double[] CurTempArray = intent.getDoubleArrayExtra("CURTEMP_ARRAY");
-                    double[] SetTempArray = intent.getDoubleArrayExtra("SETTEMP_ARRAY");
-                    byte[] ModeArray    = intent.getByteArrayExtra  ("MODE_ARRAY");
-
-                    if ((CurTempArray != null) && (SetTempArray != null) && (ModeArray != null)) {
-                        for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                            HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-                            roomData.NowTemp = CurTempArray[i];
-                            roomData.SetTemp = SetTempArray[i];
-                            roomData.Mode    = ModeArray[i];
-
-                            if (Data_DriveModeConverterOnOff((byte)i)) {
-                                if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
-                                else roomData.bValveStatus = false;
-                            }
-                            else {
-                                roomData.bValveStatus = false;
-                            }
-                        }
-                        drawUpdate(Common.INDEX_ALL);
-                    }
-                }
-            }
-        }
-    }
-
-
-    // =================================================================================================
-    // [[ BroadcastReceiver ]] region
-    // =================================================================================================
-    /**
-     * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
-     */
-    @Override
-    protected void onBrReceive(Intent intent) {
-        super.onBrReceive(intent);
-
-        String ActionName = intent.getAction();
-
-        DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
-        if (ActionName.equals(ID.heatingV2main.BR_HEATING)) {
-            DebugLogOutput("onBrReceive - BR_HEATING");
-
-            byte RoomIdx = intent.getByteExtra("STATUS", (byte)0xF0);
-            DebugLogOutput("RoomIdx : " + String.format("%02x", RoomIdx) );
-            if (RoomIdx != (byte)0xF0) {
-                if (updateDevice(RoomIdx, false) >= 0) drawUpdate(RoomIdx);
-            }
-        }
-    }
-
-
-    // =================================================================================================
-    // [[ Touch & Key Event ]] region
-    // =================================================================================================
-    /**
-     * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
-     */
-    @Override
-    protected void onTouchEvent(View v, MotionEvent event) {
-        super.onTouchEvent(v, event);
-
-        int TargetId = v.getId();
-        int MoveEvent = event.getAction();
-
-        if (MoveEvent == MotionEvent.ACTION_UP) {
-//            Log.e(TAG, "[onTouchEvent] TargetId -> " + TargetId);
-            if (TargetId == ID.heatingV2main.button.ALL_EXECUTION) {
-                // 전체방 실행 (일시정지 or 외출)
-                DebugLogOutput("onTouchEvent [ALL_EXECUTION] BUTTON !!!");
-
-                if (mData.heatingV2.Device.info.Support.Pause) {
-                    // 일시정지
-                    if (OPERATION_MODE == Common.MODE_NOMAL) {
-                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.Pause);
-                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                    }
-                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        Sample_AllPauseOnOff(true);
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                    }
-                }
-                else if (mData.heatingV2.Device.info.Support.Outing) {
-                    // 외출모드
-                    if (OPERATION_MODE == Common.MODE_NOMAL) {
-                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.Outing);
-                        if(ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                    }
-                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        Sample_AllOutingOnOff(true);
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                    }
-                }
-            }
-            else if (TargetId == ID.heatingV2main.button.ALL_RELEASE) {
-                // 전체방 해제 (일시정지 or 외출)
-                DebugLogOutput("onTouchEvent [ALL_RELEASE] BUTTON !!!");
-
-                if (mData.heatingV2.Device.info.Support.Pause) {
-                    // 일시정지
-                    if (OPERATION_MODE == Common.MODE_NOMAL) {
-                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.PauseRelease);
-                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                    }
-                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        Sample_AllPauseOnOff(false);
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                    }
-                }
-                else if (mData.heatingV2.Device.info.Support.Outing) {
-                    // 외출
-                    if (OPERATION_MODE == Common.MODE_NOMAL) {
-                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.OutingRelease);
-                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                    }
-                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        Sample_AllOutingOnOff(false);
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                    }
-                }
-            }
-            else if (TargetId == ID.heatingV2main.button.ALL_ON) {
-                // 전체방 해제 (일시정지 or 외출)
-                DebugLogOutput("onTouchEvent [ALL_ON] BUTTON !!!");
-
-                if (OPERATION_MODE == Common.MODE_NOMAL) {
-                    int ret = ctrlDeviceEntireMode(HeatingV2.MODE.HeatingON);
-                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                }
-                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    Sample_AllOutingOnOff(false);
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-            }
-            else if (TargetId == ID.heatingV2main.button.ALL_OFF) {
-                // 전체방 해제 (일시정지 or 외출)
-                DebugLogOutput("onTouchEvent [ALL_OFF] BUTTON !!!");
-
-                if (OPERATION_MODE == Common.MODE_NOMAL) {
-                    int ret = ctrlDeviceEntireMode(HeatingV2.MODE.HeatingOFF);
-                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                }
-                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    Sample_AllOutingOnOff(false);
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-            }
-            else if ((TargetId >= ID.heatingV2main.button.ROOM_TITLE_1) && (TargetId <= ID.heatingV2main.button.ROOM_TITLE_8)) {
-                // 각방 타이틀 클릭
-                int index = TargetId - ID.heatingV2main.button.ROOM_TITLE_1;
-                DebugLogOutput("onTouchEvent [ROOM_TITLE_" + (index+1) + "] BUTTON !!!");
-                Sound().Play(SND.effect.TOUCH_LATCHED);
-
-                Intent data = new Intent();
-
-                // 타겟 룸인덱스
-                data.putExtra("ROOM_INDEX", index);
-
-                // 룸명칭 리스트
-                data.putExtra("ROOM_NAME_ARRAY", astrRoomTitle);
-
-                if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    data.putExtra("ROOM_COUNT", mData.heatingV2.Device.info.RoomCount);
-
-                    double [] CurTempArray = new double [] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
-                    double [] SetTempArray = new double [] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
-                    byte   [] ModeArray    = new byte   [] { 0, 0, 0, 0, 0, 0 };
-
-                    for (int i=0 ; i<mData.heatingV2.Device.info.RoomCount ; i++) {
-                        CurTempArray[i] = mData.heatingV2.Device.Room[i].NowTemp;
-                        SetTempArray[i] = mData.heatingV2.Device.Room[i].SetTemp;
-                        ModeArray[i]    = mData.heatingV2.Device.Room[i].Mode;
-                    }
-
-                    data.putExtra("CURTEMP_ARRAY", CurTempArray);
-                    data.putExtra("SETTEMP_ARRAY", SetTempArray);
-                    data.putExtra("MODE_ARRAY"   , ModeArray);
-                }
-
-                ((MainActivity)(getContext())).StartPopup(ID.screen.HeatingV2PopupScreen, data);
-            }
-            else if ((TargetId >= ID.heatingV2main.button.ROOM_ONOFF_1) && (TargetId <= ID.heatingV2main.button.ROOM_ONOFF_8)) {
-                // 각방 ON/OFF 클릭
-                int index = TargetId - ID.heatingV2main.button.ROOM_ONOFF_1;
-                DebugLogOutput("onTouchEvent [ROOM_ONOFF_" + (index+1) + "] BUTTON !!!");
-
-                if (OPERATION_MODE == Common.MODE_NOMAL) {
-                    byte DeiveMode = HeatingV2.MODE.HeatingON;
-                    if (Data_DriveModeConverterOnOff((byte)index)) DeiveMode = HeatingV2.MODE.HeatingOFF;
-                    int ret =  ctrlDeviceMode((byte)index, DeiveMode);
-                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                }
-                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    byte DeiveMode = HeatingV2.MODE.HeatingON;
-                    if (Data_DriveModeConverterOnOff((byte)index)) DeiveMode = HeatingV2.MODE.HeatingOFF;
-                    Sample_ControlMode((byte)index, DeiveMode);
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-            }
-            else if (TargetId == ID.heatingV2main.button.LEFT_MOVE_BTN) {
-                Sound().Play(SND.effect.TOUCH_LATCHED);
-                movePage(false);
-            }
-            else if (TargetId == ID.heatingV2main.button.RIGHT_MOVE_BTN) {
-                Sound().Play(SND.effect.TOUCH_LATCHED);
-                movePage(true);
-            }
-
-
-        }
-    }
-
-
-    // =================================================================================================
-    // [[ Draw ]] region
-    // =================================================================================================
-    /**
-     * 변경되는 이미지를 다시 그린다.
-     *
-     * @param index - (byte) 변경할 방 인덱스 , Common.INDEX_ALL 일 경우 전체
-     */
-    private void drawUpdate(byte index) {
-        try {
-//            Log.e(TAG, "[drawUpdate] index: " + String.format("%02X", index));
-            int startIdx = (nCurrentPageNo - 1) * ROOM_CNT;
-            HeatingV2.Info info = mData.heatingV2.Device.info;
-            if (index == Common.INDEX_ALL) {
-                for (int i=startIdx ; i<startIdx+ROOM_CNT ; i++) {
-                    if (i < nRoomCnt) {
-                        HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-
-                        // 운전모드 표시
-                        drawModeChange(i, roomData.bValveStatus, roomData.Mode);
-
-                        // 현재온도 표시
-                        drawCurrentTemper(i, roomData.NowTemp);
-
-                        // 설정온도 표시
-                        if (Data_DriveModeConverterOnOff((byte) i)) drawSetTemper(i, roomData.SetTemp);
-                        else roomView[i].TXT_TEMPER_SET.setText("");
-                    }
-                }
-            }
-            else {
-                if (!checkRoomIndex(index)) return;
-
-                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[index];
-
-                // 운전모드 표시
-                drawModeChange(index, roomData.bValveStatus, roomData.Mode);
-
-                // 현재온도 표시
-                drawCurrentTemper(index, roomData.NowTemp);
-
-                // 설정온도 표시
-                if (Data_DriveModeConverterOnOff(index)) drawSetTemper(index, roomData.SetTemp);
-                else roomView[index].TXT_TEMPER_SET.setText("");
-            }
-
-            // 하단 전체방 외출 or 일시정지 버튼 활성화 비활성화
-            if (info.Support.Pause) {
-                byte Mode = 0;
-                byte PauseCount = 0;
-                for (byte i=0 ; i<info.RoomCount ; i++) {
-                    Mode = mData.heatingV2.Device.Room[i].Mode;
-                    if(Mode == HeatingV2.MODE.Pause) PauseCount++;
-                }
-
-                // 전체방이 일시정지일 경우
-                if (info.RoomCount == PauseCount) {
-                    if (UX_MODE == Common.UX_EASY_MODE) BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(R.drawable.btn_run_pause_disabled_easymode);
-                    else BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(R.drawable.control_heat_btn_all_pause_ok_disabled);
-                }
-                else BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();
-
-                // 전체방이 일시정지가 없을 경우
-                if (PauseCount == 0) {
-                    if (UX_MODE == Common.UX_EASY_MODE) BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(R.drawable.btn_run_release_disabled_easymode);
-                    else BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(R.drawable.control_heat_btn_all_pause_cancel_disabled);
-                }
-                else BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();
-            }
-            else if (info.Support.Outing) {
-                byte Mode = 0;
-                byte OutingCount = 0;
-                byte OffCount = 0;
-                byte OnCount = 0;
-                for (byte i = 0; i < info.RoomCount; i++) {
-                    Mode = mData.heatingV2.Device.Room[i].Mode;
-                    if (Mode == HeatingV2.MODE.Outing) OutingCount++;
-                    else if (Mode == HeatingV2.MODE.HeatingOFF) OffCount++;
-                    else if (Mode == HeatingV2.MODE.HeatingON) OnCount++;
-                }
-
-                int AllOn_DisableImageID = 0;
-                int AllOff_DisableImageID = 0;
-                int AllExecutionDisableImageID = 0;
-                int AllReleaseDisableImageID = 0;
-
-                if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
-                    AllOn_DisableImageID = R.drawable.btn_ctrl_heating_all_on_disabled;
-                    AllOff_DisableImageID = R.drawable.btn_ctrl_heating_all_off_disabled;
-                    AllExecutionDisableImageID = R.drawable.btn_ctrl_heating_all_goout_on_disabled;
-                    AllReleaseDisableImageID = R.drawable.btn_ctrl_heating_all_goout_off_disabled;
-                }
-                else {
-                    if (UX_MODE == Common.UX_EASY_MODE) {
-                        AllExecutionDisableImageID = R.drawable.btn_run_goout_disabled_easymode;
-                        AllReleaseDisableImageID = R.drawable.btn_release_goout_disabeld_easymode;
-                    }
-                    else {
-                        AllExecutionDisableImageID = R.drawable.control_heat_btn_all_goout_ok_disabled;
-                        AllReleaseDisableImageID = R.drawable.control_heat_btn_all_goout_cancel_disabled;
-                    }
-                }
-
-                if (info.RoomCount == OnCount) {
-//                    Log.e(TAG, "[drawUpdate] ========== case 1 ==========");
-                    // 전체 난방이 켜진 경우 - 전체 On(비활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(비활성화)
-                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffEnable(AllOn_DisableImageID);   // 전체방 켜기 - Disable
-                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
-
-                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
-                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
-                }
-                else if (info.RoomCount == OffCount) {
-//                    Log.e(TAG, "[drawUpdate] ========== case 2 ==========");
-                    // 전체 난방이 꺼진 경우 - 전체 On(활성화), 전체 Off(비활성화), 전체 외출(비활성화), 전체 외출해제(비활성화)
-                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 Enable
-                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffEnable(AllOff_DisableImageID);   // 전체방 끄기 - Disable
-
-                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(AllExecutionDisableImageID);   // 전체방 외출설정 - Disable
-                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
-                }
-                else if (info.RoomCount == OutingCount) {
-//                    Log.e(TAG, "[drawUpdate] ========== case 3 ==========");
-                    // 전체 난방이 외출인 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(비활성화), 전체 외출해제(활성화)
-                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
-                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
-
-                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(AllExecutionDisableImageID);   // 전체방 외출설정 - Disable
-                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
-                }
-                else {
-                    if (0 < OnCount && OnCount <info.RoomCount) {
-                        // 일부 난방이 켜진 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(모름), 전체 외출해제(모름)
-                        if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
-                        if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
-
-                        BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
-                        if (0 < OutingCount) {
-//                            Log.e(TAG, "[drawUpdate] ========== case 4 ==========");
-                            // 일부 난방이 켜지고, 외출설정된 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(활성화)
-                            BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
-                        }
-                        else {
-//                            Log.e(TAG, "[drawUpdate] ========== case 5 ==========");
-                            // 일부 난방이 켜지고, 외출해제된 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(비활성화)
-                            BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
-                        }
-                    }
-                    else {
-//                        Log.e(TAG, "[drawUpdate] ========== case 6 ==========");
-                        // 전체 난방이 꺼지거나 외출설정인 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(활성화)
-                        if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
-                        if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
-
-                        BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
-                        BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
-                    }
-                }
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] drawUpdate(byte index)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void drawCurrentPage(HeatingV2.Info info, int startIdx) {
-        try {
-            Log.d(TAG, "[drawCurrentPage] startIdx [" + startIdx + "], CurrentPageNum [" + nCurrentPageNo + "], ROOM_CNT [" + ROOM_CNT + "], roomView.length [" + roomView.length + "]");
-            if (info.RoomCount <= ROOM_CNT) {
-                BTN_PAGE_UP.setVisibility(View.INVISIBLE);
-                BTN_PAGE_DOWN.setVisibility(View.INVISIBLE);
-                TXT_PAGE_NO.setVisibility(View.INVISIBLE);
-            }
-
-            if (startIdx >= 0 && startIdx % ROOM_CNT == 0) {
-                for (int j = 0; j < roomView.length; j++) {
-                    if (roomView[j] != null) roomView[j].setVisibility(false);
-                }
-            }
-
-            int left, top;
-            for (int i = startIdx; i < info.RoomCount && i < startIdx + ROOM_CNT; i++) {
-                if (UX_MODE == Common.UX_EASY_MODE) {
-                    left = Common.ImgPosion.GetX(mRoomPos_easymode[info.RoomCount - 1][i][0]);
-                    top = Common.ImgPosion.GetX(mRoomPos_easymode[info.RoomCount - 1][i][1]);
-                }
-                else {
-                    left = Common.ImgPosion.GetX(mRoomPos[info.RoomCount - 1][i][0]);
-                    top = Common.ImgPosion.GetX(mRoomPos[info.RoomCount - 1][i][1]); // 왜 X로 했는데 좌표가 잘 맞지???
-                }
-
-//                Log.d(TAG, "[drawCurrentPage] i = " + i + " / left = " + left + " / top = " + top);
-                roomView[i] = new RoomView(left, top, i);
-                drawEntireRoomTitle(i);
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] drawCurrentPage(HeatingV2.Info info, int startIdx)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    /**
-     * {@link #roomView} 에 대한 기본적인 범위체크를 한다.
-     *
-     * @param index - (int) 체크할 인덱스
-     * @return (boolean) true : 정상, false : 범위이탈
-     */
-    private boolean checkRoomIndex(int index) {
-        if (index < 0) return false;
-        if (roomView == null) return false;
-        if (roomView.length <= index) return false;
-        if (index < ((nCurrentPageNo * 6) - 6) || ((nCurrentPageNo * 6) - 1) < index) return false;
-        return true;
-    }
-
-    /**
-     * 방명칭을 개별적으로 화면에 반영한다.
-     *
-     * @param index - (int) 변경할 룸의 인덱스
-     * param TitleStr - (String) 변경할 명칭
-     */
-    private void drawRoomTitle(int index, String value) {
-        if(!checkRoomIndex(index)) return;
-        roomView[index].TXT_TITLE.setText(value);
-    }
-
-    /**
-     * 방명칭 전체를 화면에 업데이트한다.
-     */
-    private void drawEntireRoomTitle(int idx) {
-        if (mData == null) return;
-        drawRoomTitle(idx, astrRoomTitle[idx]);
-    }
-
-    /**
-     * 현재온도를 화면에 반영한다.
-     * @param index - (int) 변경할 룸의 인덱스
-     * @param temp - (double) 변경할 온도
-     */
-    private void drawCurrentTemper(int index, double temp) {
-        if(!checkRoomIndex(index)) return;
-        String str = String.format("%.1f", temp);
-        roomView[index].TXT_TEMPER_CURRENT.setText(str);
-    }
-
-    /**
-     * 설정온도를 화면에 반영한다.
-     * @param index - (int) 변경할 룸의 인덱스
-     * @param temp - (double) 변경할 온도
-     */
-    private void drawSetTemper(int index, double temp) {
-        if (!checkRoomIndex(index)) return;
-        String str = String.format("%.1f", temp);
-        roomView[index].TXT_TEMPER_SET.setText(str);
-    }
-
-    /**
-     * 모드상태와 밸브상태를 화면에 반영한다.
-     *
-     * @param index - (int) 변경할 룸의 인덱스
-     * @param valve - (boolean) 변경할 밸브상태
-     * @param mode  - (byte) 변경할 운전모드 ( 0 : OFF, 1 : ON, 2 : 일시정지 )
-     */
-    private void drawModeChange(int index, boolean valve, byte mode) {
-        try {
-//            Log.w(TAG, "[drawModeChange] index [" + index + "], valve [" + valve + "], mode [" + mode + "], roomView.length [" + roomView.length + "]");
-            if (!checkRoomIndex(index)) return;
-
-            String str = new String();
-            if (valve) {
-                roomView[index].BACKGROUND.setButtonPressedImageID();
-                roomView[index].IMG_FIRE.setVisibility(View.VISIBLE);
-                roomView[index].TXT_MODE.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
-                str = "  ";
-            }
-            else {
-                roomView[index].BACKGROUND.setButtonDefaultImageID();
-                roomView[index].IMG_FIRE.setVisibility(View.INVISIBLE);
-                roomView[index].TXT_MODE.setGravity(Gravity.CENTER | Gravity.CENTER_VERTICAL);
-            }
-
-            float textsize = Common.fontsize._26_DEFAULT;
-
-            if (Data_DriveModeConverterOnOff((byte)index)) {
-                roomView[index].BTN_ONOFF.setButtonRearImage();
-            }
-            else {
-                if (mode == HeatingV2.MODE.Pause) textsize = Common.fontsize._20;
-                roomView[index].BTN_ONOFF.setButtonFrontImage();
-            }
-
-            if (UX_MODE == Common.UX_NORMAL_MODE) {
-                if (roomView[index].TXT_MODE.getTextSize() != textsize) roomView[index].TXT_MODE.setTextSize(TypedValue.COMPLEX_UNIT_PX, textsize);
-            }
-
-            if (mDriveModeString.length <= mode) {
-                Log.e(TAG, "[drawModeChange] - mode Out of range !!! (mode:" + mode + ")");
-            }
-            else {
-                str += mDriveModeString[mode];
-                roomView[index].TXT_MODE.setText(str);
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] drawModeChange(int index, boolean valve, byte mode)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void movePage(boolean bNext) {
-        try {
-            if (bNext) {
-                nCurrentPageNo++;
-                if (nCurrentPageNo > nTotalPageNo) nCurrentPageNo = 1;
-            }
-            else {
-                nCurrentPageNo--;
-                if (nCurrentPageNo < 1) nCurrentPageNo = nTotalPageNo;
-            }
-            TXT_PAGE_NO.setText(nCurrentPageNo + "/" + nTotalPageNo);
-
-            drawCurrentPage(mData.heatingV2.Device.info, (nCurrentPageNo - 1) * ROOM_CNT);
-            drawUpdate(Common.INDEX_ALL);
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] movePage(boolean bNext)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    // =================================================================================================
-    // [[ Device ]] region
-    // =================================================================================================
-    /**
-     * 디바이스 API 를 Load 한다.
-     *
-     * @param wpapi - 생성시 전달받은 WallPadAPI
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int loadDeviceAPI(WallPadAPI wpapi) {
-        // 1. Mode Check
-        if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
-
-        DebugLogOutput("[loadDeviceAPI] - Start");
-
-        // 2. wpapi Check
-        if (wpapi == null) {
-            Log.e(TAG, "[loadDeviceAPI] - wpapi is null");
-            return -2;
-        }
-
-        // 3. Load API
-        DebugLogOutput("[loadDeviceAPI] - Step1 : heatingAPI API Load...");
-        try {
-            heatingV2API = wpapi.Get_HeatingV2Controller();
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        } catch (Exception e) {
-            Log.e(TAG, "[loadDeviceAPI] - [Exception Error] wpapi.Get_HeatingV2Controller");
-            Log.e(TAG, "[loadDeviceAPI] - " + e.toString());
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-
-        if (heatingV2API == null) {
-            Log.e(TAG, "[loadDeviceAPI] - heatingV2API is null");
-            return -4;
-        }
-
-        DebugLogOutput("[loadDeviceAPI] - OK");
-
-        return 0;
-    }
-
-    /**
-     * 디바이스에 알림 BR 을 등록한다.
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int registerDeviceBR(boolean OnOff) {
-        DebugLogOutput("[registerDeviceBR] - Start (OnOff:" + OnOff + ")");
-
-        String BR_NAME = ID.heatingV2main.BR_HEATING;
-
-        // 1. Api Load Check
-        if (heatingV2API == null) {
-            Log.e(TAG, "[registerDeviceBR] - heatingV2API unload !!!");
-            return -1;
-        }
-
-        if (OnOff) {
-            try {
-                //DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
-                heatingV2API.regChangedBR(BR_NAME);
-                //DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-                return -101;
-            } catch (Exception e) {
-                Log.e(TAG, "[registerDeviceBR] - [Exception Error] heatingV2API.regChangedBR");
-                Log.e(TAG, "[registerDeviceBR] - " + e.toString());
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-                return -101;
-            }
-            super.addBrActionFilter(BR_NAME);
-        }
-        else {
-            try {
-                //DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
-                heatingV2API.unregChangedBR(BR_NAME);
-                //DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-                return -102;
-            } catch (Exception e) {
-                Log.e(TAG, "[registerDeviceBR] - [Exception Error] heatingV2API.unregChangedBR");
-                Log.e(TAG, "[registerDeviceBR] - " + e.toString());
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-                return -102;
-            }
-            super.removeBrActionFilter(BR_NAME);
-        }
-
-        return 0;
-    }
-
-    /**
-     * 제어기 상태를 가져온다.
-     *
-     * @param Index - (byte) {link REFRESH_IDX} 값 <br>
-     *                       REFRESH_IDX.ROOM1 ~ REFRESH_IDX.ROOM8 : 방개별 갱신 <br>
-     *                       REFRESH_IDX.ALL : 방전체 갱신 <br>
-     *                       REFRESH_IDX.INFO : 기기정보 갱신<br>
-     *                       REFRESH_IDX.BOILER : 보일러정보 갱신<br>
-     *                       REFRESH_IDX.SPECIALFUNC : 특화기능 정보 갱신<br>
-     *
-     * @param real  - (boolean) true : 실시간, false : 가장최근 (Index 가 REFRESH_IDX.INFO 일경우 가장최근만 적용됨)
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int updateDevice(byte Index, boolean real) {
-        try {
-            DebugLogOutput("[updateDevice] - Start   (Index:" + String.format("0x%02X", Index) + ", real:" + real + ")");
-
-            // 1. Api Load Check
-            if (heatingV2API == null) {
-                Log.e(TAG, "[updateDevice] - heatingV2API unload !!!");
-                return -1;
-            }
-
-            if (!(((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) || (Index == HeatingV2API.REFRESH_IDX.ALL) || (Index == HeatingV2API.REFRESH_IDX.BOILER) || (Index == HeatingV2API.REFRESH_IDX.SPECIALFUNC))) {
-                Log.e(TAG, "[updateDevice] - param [Index:" + Index + "] Out of range !!!");
-                return -2;
-            }
-
-            if (!(((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) || (Index == HeatingV2API.REFRESH_IDX.ALL))) {
-                // 본화면에는 없는 기능인 보일러 , 특화기능 알림은 업데이트 하지않는다.
-                DebugLogOutput("[updateDevice] - this Screen No Display (Index:" + Index + ")");
-                return -3;
-            }
-
-            // 2. Reflash
-            try {
-                int ret = (byte) heatingV2API.Refresh(Index, real);
-                if (ret < 0) {
-                    Log.e(TAG, "[updateDevice] Refresh - ret (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
-                    return -2;
-                }
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-                return -100;
-            }
-            catch (Exception e) {
-                Log.e(TAG, "[updateDevice] - [Exception Error] heatingV2API.Refresh()");
-                Log.e(TAG, "[updateDevice] - " + e.toString());
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-                return -100;
-            }
-
-            // 4. Data Copy
-            mData.heatingV2 = heatingV2API.data;
-
-            // 5. Debug msg
-            if (DEBUG_LOG_ON) {
-                DebugLogOutput("---------------------------------------");
-                DebugLogOutput("[updateDevice]");
-                DebugLogOutput("---------------------------------------");
-
-                if ((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) {
-                    DebugLogOutput(mData.heatingV2.Device.Room[Index].ToDebugString(Index));
-                }
-                else if (Index == HeatingV2API.REFRESH_IDX.ALL) {
-                    for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                        DebugLogOutput(mData.heatingV2.Device.Room[i].ToDebugString(i));
-                    }
-                }
-                else if (Index == HeatingV2API.REFRESH_IDX.INFO) {
-                    DebugLogOutput(mData.heatingV2.Device.info.ToDebugString());
-                }
-                else if (Index == HeatingV2API.REFRESH_IDX.BOILER) {
-                    DebugLogOutput(mData.heatingV2.Boiler.ToDebugString());
-                }
-                else if (Index == HeatingV2API.REFRESH_IDX.SPECIALFUNC) {
-                    DebugLogOutput(mData.heatingV2.SpecialFunc.ToDebugString());
-                }
-                DebugLogOutput("---------------------------------------");
-            }
-            DebugLogOutput("[updateDevice] - OK");
-            return 0;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -99;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] updateDevice(byte Index, boolean real)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -99;
-        }
-    }
-
-    /**
-     * 난방제어기 V2의 운전모드를 제어한다.
-     *
-     * @param RoomIdx    - (byte) 제어할 방 인덱스 (0~5)
-     * @param DeiveMode  - (byte) 변경할 운전모드 (지원 타입별로 범위 상이함) HeatingAPI.V2DRIVEMODE_NONE 은 변경하지않음
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int ctrlDeviceMode(byte RoomIdx, byte DeiveMode) {
-        DebugLogOutput("[ctrlDeviceMode] - (RoomIdx:" + RoomIdx + ", DeiveMode:" + String.format("%02x", DeiveMode) + ")");
-        return ctrlDeviceUnitStatus(RoomIdx, DeiveMode, 0);
-    }
-
-    /**
-     * 각방 제어 (운전모드 및 설정온도 변경)
-     *
-     * @param RoomIndex     - (byte) 제어할 방 인덱스 (0~5)
-     * @param SetMode   - (byte) 변경할 운전모드  {link MODE} 에 따름 ( 미설정시 MODE.Idle )
-     * @param SetTemp   - (double) 변경할 설정온도 (미설정시 '0')
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int ctrlDeviceUnitStatus(byte RoomIndex, byte SetMode, double SetTemp) {
-        DebugLogOutput("[ctrlDeviceUnitStatus] - (RoomIndex:" + RoomIndex + ", SetMode:" + String.format("%02x", SetMode) + ", SetTemp:" + SetTemp + ")");
-
-        // 1. API Load Check
-        if (heatingV2API == null) {
-            Log.e(TAG, "[ctrlDeviceUnitStatus] - heatingV2API unload !!!");
-            return -1;
-        }
-
-        // 2. Control Device
-        try {
-            int ret = heatingV2API.SetEachRoomStatus(RoomIndex, SetMode, SetTemp);
-            if (ret < 0) {
-                Log.e(TAG, "[ctrlDeviceUnitStatus] - heatingV2API.SetEachRoomStatus (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
-                return -2;
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        } catch (Exception e) {
-            Log.e(TAG, "[ctrlDeviceUnitStatus] - [Exception Error] heatingV2API.SetEachRoomStatus()");
-            Log.e(TAG, "[ctrlDeviceUnitStatus] - " + e.toString());
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-
-        DebugLogOutput("[ctrlDeviceUnitStatus] - OK");
-
-        return 0;
-    }
-
-    /**
-     * 난방제어기 V2을 전체방 운전모드를 제어한다.
-     *
-     * @param DeriveMode    - (byte) 변경할 운전모드 (지원 타입별로 범위 상이함) HeatingAPI.V2DRIVEMODE_NONE 은 변경하지않음
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int ctrlDeviceEntireMode(byte DeriveMode) {
-        DebugLogOutput("[ctrlDeviceEntireMode] - (DeriveMode:" + String.format("%02x", DeriveMode) + ")");
-
-        // 1. API Load Check
-        if (heatingV2API == null) {
-            Log.e(TAG, "[ctrlDeviceEntireMode] - heatingV2API unload !!!");
-            return -1;
-        }
-
-        // 2. Param Range Check
-
-        // 3. Control Device
-        try {
-            int ret = heatingV2API.SetAllRoomStatus(DeriveMode);
-            if (ret < 0) {
-                Log.e(TAG, "[ctrlDeviceEntireMode] - heatingV2API.SetAllRoomStatus (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
-                return -2;
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        } catch (Exception e) {
-            Log.e(TAG, "[ctrlDeviceEntireMode] - [Exception Error] heatingV2API.SetAllRoomStatus()");
-            Log.e(TAG, "[ctrlDeviceEntireMode] - " + e.toString());
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-
-        DebugLogOutput("[ctrlDeviceEntireMode] - OK");
-
-        return 0;
-    }
-
-    // =================================================================================================
-    // [[ Sample ]] region
-    // =================================================================================================
-    /**
-     * (영업샘플모드) 초기 값을 정의한다.
-     */
-    private void Sample_DataDefaultSetting() {
-        mData.heatingV2 = new HeatingV2API.Data();
-        byte RoomCount = (byte) ROOM_CNT;
-        int GetRoomCount = DB_GetSampleRoomNumber();
-        if(GetRoomCount > 0) RoomCount = (byte) GetRoomCount;
-//        RoomCount = 6; // 테스트 @@@@@@@@@@
-        mData.heatingV2.Device.SetRoomCount(RoomCount);
-
-        HeatingV2.Info info = mData.heatingV2.Device.info;
-        if (Version.getGatewayUsage()) {
-            // 현산향 (게이트웨이 사용)
-            info.Support.SetTempPoint05 = true;           // 설정온도단위 (true:0.5도 , false:1도)
-            info.Support.Outing         = false;          // 외출 : 난방모드 외출 기능 지원여부 (true:지원, false:미지원)
-            info.Support.Sleep          = true;           // 취침 : 취침 관련 프로토콜 지원여부 (true:지원, false:미지원)
-            info.Support.Reservation    = true;           // 예약 : 24시간예약 관련 프로토콜 지원여부
-            info.Support.Pause          = true;           // 일시정지 : 난방모드 일시정지 기능 지원여부
-
-            info.Support.AI             = true;           // 인공지능 : 난방운전방식중 인공지능 설정 기능 지원여부
-            info.Support.OutsideTempUse = true;           // 외기온도 : 외기온도 사용여부
-            info.Support.Boiler         = true;           // 보일러지원 : 보일러 지원여부
-
-            info.Support.MinSetTemp     = 5;              // 지원하는 최저설정온도
-            info.Support.MaxSetTemp     = 40;             // 지원하는 최대설정온도
-        }
-        else {
-            // 대외향 (게이트웨이 미사용)
-            info.Support.SetTempPoint05 = true;           // 설정온도단위 (true:0.5도 , false:1도)
-            info.Support.Outing         = true;           // 외출 : 난방모드 외출 기능 지원여부 (true:지원, false:미지원)
-            info.Support.Sleep          = false;          // 취침 : 취침 관련 프로토콜 지원여부 (true:지원, false:미지원)
-            info.Support.Reservation    = false;          // 예약 : 24시간예약 관련 프로토콜 지원여부
-            info.Support.Pause          = false;          // 일시정지 : 난방모드 일시정지 기능 지원여부
-
-            info.Support.AI             = false;          // 인공지능 : 난방운전방식중 인공지능 설정 기능 지원여부
-            info.Support.OutsideTempUse = false;          // 외기온도 : 외기온도 사용여부
-            info.Support.Boiler         = false;          // 보일러지원 : 보일러 지원여부
-
-            info.Support.MinSetTemp     = 5;              // 지원하는 최저설정온도
-            info.Support.MaxSetTemp     = 40;             // 지원하는 최대설정온도
-        }
-
-        for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-            boolean ON = false;
-            HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-            switch (i) {
-                case 0:
-                    roomData.Mode = HeatingV2.MODE.HeatingON;
-                    roomData.SetTemp = 19.5;
-                    roomData.NowTemp = 18.0;
-                    ON = true;
-                    break;
-
-                case 1:
-                    roomData.Mode = HeatingV2.MODE.HeatingON;
-                    roomData.SetTemp = 16.0;
-                    roomData.NowTemp = 16.5;
-                    ON = true;
-                    break;
-
-                case 2:
-                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) roomData.Mode = HeatingV2.MODE.Pause;
-                    else roomData.Mode = HeatingV2.MODE.Outing;
-
-                    roomData.SetTemp = 16.5;
-                    roomData.NowTemp = 15.0;
-
-                    break;
-
-                case 3:
-                    roomData.Mode = HeatingV2.MODE.HeatingOFF;
-                    roomData.SetTemp = 22.0;
-                    roomData.NowTemp = 20.5;
-                    break;
-
-                case 4:
-                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) roomData.Mode = HeatingV2.MODE.Sleep;
-                    else roomData.Mode = HeatingV2.MODE.HeatingON;
-
-                    roomData.SetTemp = 20.0;
-                    roomData.NowTemp = 14.5;
-                    ON = true;
-                    break;
-
-                case 5:
-                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
-                        roomData.Mode = HeatingV2.MODE.Reservation;
-                        ON = true;
-                    }
-                    else {
-                        roomData.Mode = HeatingV2.MODE.HeatingOFF;
-                    }
-
-                    roomData.SetTemp = 18.0;
-                    roomData.NowTemp = 17.0;
-                    break;
-
-                case 6:
-                    roomData.Mode = HeatingV2.MODE.HeatingON;
-                    roomData.SetTemp = 16.0;
-                    roomData.NowTemp = 16.5;
-                    ON = true;
-                    break;
-            }
-
-            if (ON) {
-                if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
-                else roomData.bValveStatus = false;
-            }
-            else roomData.bValveStatus = false;
-        }
-    }
-
-    /**
-     * (영업샘플모드) 가상으로 난방 전원을 ON/OFF 한다.
-     */
-    private void Sample_ControlMode(byte RoomIdx, byte DeiveMode) {
-        if (mData == null) return;
-        if (mData.heatingV2.Device.Room == null) return;
-
-
-        HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[RoomIdx];
-        roomData.Mode = DeiveMode;
-
-        if (Data_DriveModeConverterOnOff(RoomIdx)) {
-            if (roomData.SetTemp > roomData.NowTemp) roomData.bValveStatus = true;
-            else roomData.bValveStatus = false;
-        }
-        else roomData.bValveStatus = false;
-
-        drawUpdate(RoomIdx);
-    }
-
-    /**
-     * (영업샘플모드) 전체방 외출 or 일시정지시 이전 운전모드 저장용 변수
-     */
-    private byte [] sample_OldMode = new byte [] {  HeatingV2.MODE.HeatingON,
-            HeatingV2.MODE.HeatingON,
-            HeatingV2.MODE.HeatingON,
-            HeatingV2.MODE.HeatingON,
-            HeatingV2.MODE.HeatingON,
-            HeatingV2.MODE.HeatingON, };
-
-    /**
-     * (영업샘플모드) 가상으로 난방 일시정지를 실행/해제 한다.
-     */
-    private void Sample_AllPauseOnOff(boolean OnOff) {
-        if (mData == null) return;
-        if (mData.heatingV2.Device.Room == null) return;
-
-        if (OnOff) {
-            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-                if (roomData.Mode != HeatingV2.MODE.Pause) {
-                    sample_OldMode[i] = roomData.Mode;
-                    roomData.Mode = HeatingV2.MODE.Pause;
-                    roomData.bValveStatus = false;
-                }
-            }
-        }
-        else {
-            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-                if (roomData.Mode == HeatingV2.MODE.Pause) {
-                    roomData.Mode = sample_OldMode[i];
-                    if ((roomData.Mode == HeatingV2.MODE.HeatingON) || (roomData.Mode == HeatingV2.MODE.Sleep) || (roomData.Mode == HeatingV2.MODE.Reservation)) {
-                        if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
-                        else roomData.bValveStatus = false;
-                    }
-                    else roomData.bValveStatus = false;
-                }
-            }
-        }
-
-        drawUpdate(Common.INDEX_ALL);
-    }
-
-    /**
-     * (영업샘플모드) 가상으로 난방 외출모드를 실행/해제 한다.
-     */
-    private void Sample_AllOutingOnOff(boolean OnOff) {
-        if (mData == null) return;
-        if (mData.heatingV2.Device.Room == null) return;
-
-        if (OnOff) {
-            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-                if (roomData.Mode != HeatingV2.MODE.Outing) {
-                    sample_OldMode[i] = roomData.Mode;
-                    roomData.Mode = HeatingV2.MODE.Outing;
-                    roomData.bValveStatus = false;
-                }
-            }
-        }
-        else {
-            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
-                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
-                if (roomData.Mode == HeatingV2.MODE.Outing) {
-                    roomData.Mode = sample_OldMode[i];
-                    if (roomData.Mode == HeatingV2.MODE.HeatingON) {
-                        if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
-                        else roomData.bValveStatus = false;
-                    }
-                    else roomData.bValveStatus = false;
-                }
-            }
-        }
-
-        drawUpdate(Common.INDEX_ALL);
-    }
-
-
-    // =================================================================================================
-    // [[ Data ]] region
-    // =================================================================================================
-
-    /**
-     * 운전모드에 따른 ON/OFF 스위치 상태를 반환한다.
-     *
-     * @return (boolean) true : 스위치ON , false : 스위치OFF
-     */
-    private boolean Data_DriveModeConverterOnOff(byte index) {
-        byte mode = Data_getDriveMode(index);
-
-        if (mode == HeatingV2.MODE.HeatingON) return true;
-        else if (mode == HeatingV2.MODE.HeatingOFF) return false;
-        else if (mode == HeatingV2.MODE.Outing) return false;
-        else if (mode == HeatingV2.MODE.Sleep) return true;
-        else if (mode == HeatingV2.MODE.Reservation) return true;
-        else if (mode == HeatingV2.MODE.Pause) return false;
-
-        return false;
-    }
-
-    /**
-     * {@link #mData} DriveMode 를 반환한다.
-     *
-     * @param index - (byte) 방 인덱스
-     *
-     * @return (byte) 운전모드
-     */
-    private byte Data_getDriveMode(byte index) {
-        if (mData == null) return (byte)0x00;
-        if (mData.heatingV2.Device.Room == null) return (byte)0x00;
-        if (mData.heatingV2.Device.Room.length <= index) return (byte)0x00;
-
-        return mData.heatingV2.Device.Room[index].Mode;
-    }
-
-
-    // =================================================================================================
-    // [[ DB ]] region
-    // =================================================================================================
-    private int DB_GetSampleRoomNumber() {
-        try {
-            WallpadSalesSampleData wssd = new WallpadSalesSampleData(getContext());
-            int count = wssd.GetSampleRoomNumber();
-            wssd.closeDB();
-            DebugLogOutput("SALES_SAMPLE_MODE_ROOM_NUMBER " + count);
-            return count;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -10;
-        } catch (Exception e) {
-            Log.e(TAG, "[Exception Error] DB_GetSampleRoomNumber");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -10;
-        }
-    }
-
-    // =================================================================================================
-    // =================================================================================================
-}
+/*
+ * Copyright (C) 2018 Android WallPad Project
+ *
+ * FileName  : HeatingV2MainScreen.java
+ * Project   : Android WallPad Project
+ * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
+ * Author    : Choi In Bo  , inbo207@icontrols.co.kr
+ */
+
+package kr.co.icontrols.wallpadhomectrl.screen.screen_heating;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
+import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
+import com.artncore.commons.DataClasses.HeatingV2;
+import com.artncore.wallpadapi.HeatingV2API;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
+
+import kr.co.icontrols.wallpadhomectrl.MainActivity;
+import kr.co.icontrols.wallpadhomectrl.R;
+import kr.co.icontrols.wallpadhomectrl.declare.Common;
+import kr.co.icontrols.wallpadhomectrl.declare.ID;
+import kr.co.icontrols.wallpadhomectrl.declare.TransactionDisplay;
+import kr.co.icontrols.wallpadsupport.Version;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadScreen;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import kr.co.icontrols.wallpadsupport.WpadTextView;
+
+
+/**
+ * @description
+ * 월패드 [우리집제어->난방] 화면 이다.<br>
+ * 프로토콜V2을 본 화면에서 연동 처리한다.<br>
+ * 각방 난방ON/OFF, 각방 세부화면 팝업링크, 전체방 일시정지 or 외출 실행 해제<br>
+ * 을(를) 여기서 처리한다.
+ */
+@SuppressLint({ "ViewConstructor", "DefaultLocale" })
+public class HeatingV2MainScreen extends WpadScreen {
+    private final String TAG = "HeatingV2MainScreen";
+
+    private final boolean DEBUG_LOG_ON = true;
+    private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
+
+    // =================================================================================================
+    // [[ Declaration ]] region
+    // =================================================================================================
+    // [Image]
+    private WpadImageView BACKGROUND;
+
+    // [Button]
+    private WpadImageView BTN_ENTIRE_ON;      // 전체방 On
+    private WpadImageView BTN_ENTIRE_OFF;        // 전체방 Off
+
+    private WpadImageView BTN_ENTIRE_SET_PAUSEOUT;      // 전체방 일시정지 or 외출 [실행]
+    private WpadImageView BTN_ENTIRE_UNSET_PAUSEOUT;        // 전체방 일시정지 or 외출 [해제]
+
+    private WpadImageView BTN_PAGE_UP;
+    private WpadImageView BTN_PAGE_DOWN;
+
+    // [Text]
+    private WpadTextView TXT_PAGE_NO;
+
+    private int UX_MODE = -1; // UX 모드 (0: 일반 / 1: 간편모드)
+
+    private int ROOM_CNT = ROOM_CNT_NORMAL;   // 한 화면에 표시하는 방개수
+    private final static int ROOM_CNT_EASYMODE = 4;
+    private final static int ROOM_CNT_NORMAL = 6;
+
+    int nDistributionPanelType = Version.DISTRIBUTION_MODEL.OTHER;
+
+    private String[] mKNXDefaultRoomNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
+            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방"};
+
+    // [Package]
+    /**
+     * 개별방의 View 구조를 정의한다.
+     */
+    private class RoomView {
+        public WpadImageView BACKGROUND;        // 배경
+        public WpadImageView IMG_FIRE;          // 불꽃표시
+
+        public WpadImageView BTN_TITLE;          // 방표시 버튼
+        public WpadImageView BTN_ONOFF;          // 운전모드 ON/OFF 버튼
+
+        public WpadTextView TXT_TITLE;          // 방이름
+        public WpadTextView TXT_MODE;           // 운전모드 표시
+        public WpadTextView TXT_TEMPER_CURRENT;        // 현재온도
+        public WpadTextView TXT_TEMPER_SET;        // 설정온도
+
+        /**
+         * 생성자
+         * @param left  - (int) 좌측마진
+         * @param top   - (int) 상측마진
+         * @param index - (int) 인덱스
+         */
+        private RoomView(int left, int top, int index) {
+            if (UX_MODE == Common.UX_EASY_MODE) {
+                BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 390, 271,  R.drawable.bg_room_easymode, R.drawable.bg_room_easymode, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+
+                int[] mOffImg_easymode = {R.drawable.btn_heat_onoff_off_easymode, R.drawable.btn_heat_onoff_off_easymode};
+                int[] mOnImg_easymode = {R.drawable.btn_heat_onoff_on_easymode, R.drawable.btn_heat_onoff_on_easymode};
+                BTN_ONOFF = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 120, mOffImg_easymode, mOnImg_easymode, ID.heatingV2main.button.ROOM_ONOFF_1 + index);
+                //ViewRegistration(getLayout(), OnOffBtn, left+119, top+67);
+                ViewRegistration(getLayout(), BTN_ONOFF, Common.ImgPosion.GetX(left+37), Common.ImgPosion.GetY(top+111));
+                BTN_ONOFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            }
+            else {
+                // 룸뷰 배경 그리기
+                if (nRoomCnt == 1) {
+                    BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                    ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                }
+                else if (nRoomCnt == 2) {
+                    if (index == 1) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 3) {
+                    if (index == 2) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 4) {
+                    if (index == 1 || index == 3) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 5) {
+                    if (index == 2 || index == 4) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 6) {
+                    if (index == 2 || index == 5) {
+                        // 3번째 와 6번째 혹은 2번째이거나 5번쨰(행의 마지막 순번)
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 7) {
+                    if (index == 2 || index == 5) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+                else if (nRoomCnt == 8) {
+                    if (index == 2 || index == 5 || index == 7) {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                    else {
+                        BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 289, 250, R.drawable.bg_heat_box_room_1n2, R.drawable.bg_heat_box_room_1n2, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
+                        ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                    }
+                }
+
+                int[] mOffImg = {R.drawable.btn_heat_onoff_off, R.drawable.btn_heat_onoff_off};
+                int[] mOnImg = {R.drawable.btn_heat_onoff_on, R.drawable.btn_heat_onoff_on};
+                BTN_ONOFF = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 140, 100, mOffImg, mOnImg, ID.heatingV2main.button.ROOM_ONOFF_1 + index);
+                //ViewRegistration(getLayout(), OnOffBtn, left+119, top+67);
+                ViewRegistration(getLayout(), BTN_ONOFF, Common.ImgPosion.GetX(left+134), Common.ImgPosion.GetY(top+71));
+                BTN_ONOFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            }
+
+            int[][] mFirePos = {{100, 105}, {305, 116}};
+            IMG_FIRE = new WpadImageView(getContext(), TOUCH_KIND.NONE, 26, 32, R.drawable.heating_fire, 0, ID.heatingV2main.image.ROOM_FIRE_1 + index);
+            //ViewRegistration(getLayout(), FireMark, left+100, top+115);
+            ViewRegistration(getLayout(), IMG_FIRE, Common.ImgPosion.GetX(left+mFirePos[UX_MODE][0]), Common.ImgPosion.GetY(top+mFirePos[UX_MODE][1]));
+
+            int[][] mTitleImg = {{R.drawable.btn_heat_room_name_normal, R.drawable.btn_heat_room_name_normal_easymode}, {R.drawable.btn_heat_room_name_pressed, R.drawable.btn_heat_room_name_pressed_easymode}};
+            int[][] mTitleSize = {{271, 56}, {370, 60}};
+            BTN_TITLE = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, mTitleSize[UX_MODE][0], mTitleSize[UX_MODE][1], mTitleImg[0][UX_MODE], mTitleImg[1][UX_MODE], ID.heatingV2main.button.ROOM_TITLE_1 + index);
+            //ViewRegistration(getLayout(), TitleBtn, left+10, top+10);
+            ViewRegistration(getLayout(), BTN_TITLE, Common.ImgPosion.GetX(left+10), Common.ImgPosion.GetY(top+10));
+            BTN_TITLE.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+
+            int[] mTitleFontSize = {Common.fontsize._35, Common.fontsize._44};
+            TXT_TITLE = new WpadTextView(getContext(), false, mTitleSize[UX_MODE][0], mTitleSize[UX_MODE][1], Gravity.CENTER, Color.BLACK, mTitleFontSize[UX_MODE], true, ID.heatingV2main.text.ROOM_TITLE_1 + index);
+            //ViewRegistration(getLayout(), TitleText, left+10, top+10);
+            ViewRegistration(getLayout(), TXT_TITLE, Common.ImgPosion.GetX(left+10), Common.ImgPosion.GetY(top+10) - UX_MODE*2);
+
+            int[] mModeFontSize = {Common.fontsize._32_POPUP_TITLE, Common.fontsize._40};
+            int[][] mModeSize = {{128, 51}, {155, 50}};
+            int[][] mModePos = {{13, 105}, {196, 107}};
+            boolean bTextBold = (UX_MODE == Common.UX_EASY_MODE) ? false : true;
+            TXT_MODE = new WpadTextView(getContext(), false, mModeSize[UX_MODE][0], mModeSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mModeFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_MODE_1 + index);
+            ViewRegistration(getLayout(), TXT_MODE, Common.ImgPosion.GetX(left+mModePos[UX_MODE][0]), Common.ImgPosion.GetY(top+mModePos[UX_MODE][1]));
+
+            int[][] mTempSize = {{102, 63}, {90, 48}};
+            int[][] mNowTempPos = {{40, 185}, {163, 192}};
+            int[] mTempFontSize = {Common.fontsize._30, Common.fontsize._40};
+            TXT_TEMPER_CURRENT = new WpadTextView(getContext(), false, mTempSize[UX_MODE][0], mTempSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mTempFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_NOWTEMP_1 + index);
+            ViewRegistration(getLayout(), TXT_TEMPER_CURRENT, Common.ImgPosion.GetX(left+mNowTempPos[UX_MODE][0]), Common.ImgPosion.GetY(top+mNowTempPos[UX_MODE][1]));
+
+            int[][] mSetTempPos = {{187, 185}, {281, 192}};
+            TXT_TEMPER_SET = new WpadTextView(getContext(), false, mTempSize[UX_MODE][0], mTempSize[UX_MODE][1], Gravity.CENTER, Color.WHITE, mTempFontSize[UX_MODE], bTextBold, ID.heatingV2main.text.ROOM_SETTEMP_1 + index);
+            ViewRegistration(getLayout(), TXT_TEMPER_SET, Common.ImgPosion.GetX(left+mSetTempPos[UX_MODE][0]), Common.ImgPosion.GetY(top+mSetTempPos[UX_MODE][1]));
+        }
+
+
+        public void setVisibility(boolean set) {
+//            Log.i(TAG, "[setVisibility] set [" + set + "]");
+            if (set) {
+                BACKGROUND.setVisibility(View.VISIBLE);
+                IMG_FIRE.setVisibility(View.VISIBLE);
+                BTN_TITLE.setVisibility(View.VISIBLE);
+                BTN_ONOFF.setVisibility(View.VISIBLE);
+                TXT_TITLE.setVisibility(View.VISIBLE);
+                TXT_MODE.setVisibility(View.VISIBLE);
+                TXT_TEMPER_CURRENT.setVisibility(View.VISIBLE);
+                TXT_TEMPER_SET.setVisibility(View.VISIBLE);
+            }
+            else {
+                BACKGROUND.setVisibility(View.INVISIBLE);
+                IMG_FIRE.setVisibility(View.INVISIBLE);
+                BTN_TITLE.setVisibility(View.INVISIBLE);
+                BTN_ONOFF.setVisibility(View.INVISIBLE);
+                TXT_TITLE.setVisibility(View.INVISIBLE);
+                TXT_MODE.setVisibility(View.INVISIBLE);
+                TXT_TEMPER_CURRENT.setVisibility(View.INVISIBLE);
+                TXT_TEMPER_SET.setVisibility(View.INVISIBLE);
+            }
+        }
+    }
+
+    /**
+     * 전체방의 구조를 정의한다.
+     */
+    private RoomView [] roomView = null;
+
+    private class Data {
+        HeatingV2API.Data heatingV2;
+        public Data() {
+            heatingV2 = new HeatingV2API.Data();
+        }
+    }
+
+    // [Variables]
+    private int OPERATION_MODE = -1;                    // 동작모드
+    private Data mData = null;                          // 데이터
+    private String [] astrRoomTitle = null;             // 각방 명칭
+    private int nRoomCnt = 0;
+    public static int nCurrentPageNo = 1;
+    public static int nTotalPageNo = 1;
+
+    /**
+     * 방 개수에 따른 좌표를 정의한다.
+     */
+    private  int [][][] mRoomPos = new int [][][]
+            {
+                    { {345, 328}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                         // 1개(가이드 좌표 X - 임의 설정)
+                    { {200, 328}, {489, 328}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                     // 2개(가이드 좌표 X - 임의 설정)
+                    { {50, 328}, {339, 328}, {628, 328}, {0, 0}, {0, 0}, {0, 0} },                 // 3개(가이드 좌표 O)
+                    { {200, 168}, {489, 168}, {200, 462}, {489, 462}, {0, 0}, {0, 0} },             // 4개(가이드 좌표 O)
+                    { {70, 168}, {359, 168}, {648, 168}, {200, 462}, {489, 462}, {0, 0}},            // 5개(가이드 좌표 O)
+                    { {70, 168}, {359, 168}, {648, 168}, {70, 462}, {359, 462}, {648, 462} },       // 6개(가이드 좌표 O)
+                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {345, 328} },                  // 7개
+                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {200, 328}, {489, 328}},       // 8개
+                    { {70, 110}, {359, 110}, {648, 110}, {70, 404}, {359, 404}, {648, 404}, {50, 328}, {339, 328}, {628, 328}} // 9개
+            };
+
+    private  int [][][] mRoomPos_easymode = new int [][][]
+            {
+                    { {294, 245}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                         // 1개(가이드 좌표 X - 임의 설정)
+                    { {114, 245}, {504,245}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },                     // 2개(가이드 좌표 X - 임의 설정)
+                    { {114, 110}, {504, 110}, {294, 381}, {0, 0}, {0, 0}, {0, 0} },                 // 3개(가이드 좌표 O)
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {0, 0}, {0, 0} },             // 4개(가이드 좌표 O)
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {294, 245}, {0, 0}},            // 5개(가이드 좌표 O)
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 245}, {504,245} },       // 6개(가이드 좌표 O)
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {294, 381} },                  // 7개
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {114, 381}, {504, 381}},       // 8개
+                    { {114, 110}, {504, 110}, {114, 381}, {504, 381}, {114, 110}, {504, 110}, {114, 381}, {504, 381}, {294, 245}} // 9개
+            };
+
+    private String [] mDriveModeString = new String [] { "" , "난방" , "꺼짐" , "외출", "", "취침", "예약", "일시정지", "" };
+
+    // [API]
+    private HeatingV2API heatingV2API;       // 난방 API
+    private TransactionDisplay transactionDisplay = null;
+
+    public String Heating_Manual_Str = "";
+
+    // =================================================================================================
+    // [[ Create & Close ]] region
+    // =================================================================================================
+    /**
+     * HeatingV1MainScreen 클래스 생성자
+     *
+     * @param context - 부모 context
+     * @param layout  - 사용할 main layout
+     * @param wpapi   - 상속받은 WallPadAPI
+     * @param operationMode - 동작모드
+     */
+    public HeatingV2MainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode, String [] roomNameList) {
+        super(context, layout);
+        Log.i(TAG, "[START - Screen] --------------------------------------------");
+
+        // 1. Data Create
+        DebugLogOutput("[HeatingV2MainScreen] - Step1 : Data Create");
+        OPERATION_MODE = operationMode;
+        WallpadDeviceSet wds = new WallpadDeviceSet(getContext());
+        nDistributionPanelType = wds.Get_DistributionPannelType_Info();
+        wds.closeDB();
+
+        if (nDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) astrRoomTitle = mKNXDefaultRoomNameList;
+        else astrRoomTitle = roomNameList;
+
+        mData = new Data();
+
+        UX_MODE = ((MainActivity) context).GetEasyModeUXUse() ? Common.UX_EASY_MODE : Common.UX_NORMAL_MODE;
+        Log.d(TAG, "[HeatingV2MainScreen] UX_MODE [" + UX_MODE + "]");
+        if (UX_MODE == Common.UX_NORMAL_MODE) {
+            ROOM_CNT = ROOM_CNT_NORMAL;
+        }
+        else if (UX_MODE == Common.UX_EASY_MODE) {
+            ROOM_CNT = ROOM_CNT_EASYMODE;
+        }
+        else {
+            Log.e(TAG, "UX_MODE : " + UX_MODE + " Out of range !!!");
+        }
+
+        // 2. Device API Load & Update
+        DebugLogOutput("[HeatingV2MainScreen] - Step2 : Device API Load & Update");
+        if (OPERATION_MODE == Common.MODE_NOMAL) {
+            DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
+            if (loadDeviceAPI(wpapi) >= 0) updateDevice(Common.INDEX_ALL, false);
+        }
+        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+            DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
+            Sample_DataDefaultSetting();
+        }
+        else {
+            Log.e(TAG, "OPERATION_MODE : " + OPERATION_MODE + " Out of range !!!");
+        }
+
+        // 임시로 샘플 데이터를 통해 화면에 출력하도록 한다.
+        //Sample_DataDefaultSetting();
+
+        // 3. Image Create
+        DebugLogOutput("[HeatingV2MainScreen] - Step3 : Image Create");
+
+        HeatingV2.Info info = mData.heatingV2.Device.info;
+        nTotalPageNo = (info.RoomCount / ROOM_CNT) + (((info.RoomCount % ROOM_CNT) > 0) ? 1: 0);
+        Log.d(TAG, "[HeatingV2MainScreen] CurrentPageNum [" + nCurrentPageNo + "], TotalPageNum [" + nTotalPageNo + "]");
+
+        BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.heatingV2main.image.BACKGROUND);
+        ViewRegistration(layout, BACKGROUND, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
+
+        // 4. Button Create
+        DebugLogOutput("[HeatingV2MainScreen] - Step4 : Button Create");
+
+        int nImgID_EntireOn_Normal = 0;
+        int nImgID_EntireOn_Pressed = 0;
+        int nImgID_EntireOff_Normal = 0;
+        int nImgID_EntireOff_Pressed = 0;
+
+        int nImgID_Set_PuaseOut_Normal = 0;
+        int nImgID_Set_PuaseOut_Pressed = 0;
+        int nImgID_Unset_PuaseOut_Normal = 0;
+        int nImgID_Unset_PuaseOut_Pressed = 0;
+
+        boolean bImageIDSet = false;
+        if (info.Support.Pause) {
+            // 전체방 일시정지
+            if (UX_MODE == Common.UX_EASY_MODE) {
+                nImgID_Set_PuaseOut_Normal = R.drawable.btn_run_pause_normal_easymode;          // 전체방 일시정지 [실행]
+                nImgID_Set_PuaseOut_Pressed = R.drawable.btn_run_pause_pressed_easymode;
+                nImgID_Unset_PuaseOut_Normal = R.drawable.btn_run_release_normal_easymode;          // 전체방 일시정지 [해제]
+                nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_run_release_pressed_easymode;
+            }
+            else {
+                nImgID_Set_PuaseOut_Normal = R.drawable.control_heat_btn_all_pause_ok_normal;          // 전체방 일시정지 [실행]
+                nImgID_Set_PuaseOut_Pressed = R.drawable.control_heat_btn_all_pause_ok_pressed;
+                nImgID_Unset_PuaseOut_Normal = R.drawable.control_heat_btn_all_pause_cancel_normal;        // 전체방 일시정지 [해제]
+                nImgID_Unset_PuaseOut_Pressed = R.drawable.control_heat_btn_all_pause_cancel_pressed;
+            }
+            bImageIDSet = true;
+            Heating_Manual_Str += "Batch:Pause/";
+        }
+        else if (info.Support.Outing) {
+            if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
+                nImgID_EntireOn_Normal = R.drawable.btn_ctrl_heating_all_on_normal;          // 전체방 ON [실행]
+                nImgID_EntireOn_Pressed = R.drawable.btn_ctrl_heating_all_on_pressed;
+                nImgID_EntireOff_Normal = R.drawable.btn_ctrl_heating_all_off_normal;        // 전체방 OFF [해제]
+                nImgID_EntireOff_Pressed = R.drawable.btn_ctrl_heating_all_off_pressed;
+
+                nImgID_Set_PuaseOut_Normal = R.drawable.btn_ctrl_heating_all_goout_on_normal;          // 전체방 외출 [실행]
+                nImgID_Set_PuaseOut_Pressed = R.drawable.btn_ctrl_heating_all_goout_on_pressed;
+                nImgID_Unset_PuaseOut_Normal = R.drawable.btn_ctrl_heating_all_goout_off_normal;        // 전체방 외출 [해제]
+                nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_ctrl_heating_all_goout_off_pressed;
+                bImageIDSet = true;
+                Heating_Manual_Str += "Batch:Outing/";
+            }
+            else {
+                // 전체방 외출
+                if (UX_MODE == Common.UX_EASY_MODE) {
+                    nImgID_Set_PuaseOut_Normal = R.drawable.btn_run_goout_normal_easymode;          // 전체방 외출 [실행]
+                    nImgID_Set_PuaseOut_Pressed = R.drawable.btn_run_goout_pressed_easymode;
+                    nImgID_Unset_PuaseOut_Normal = R.drawable.btn_release_goout_normal_easymode;        // 전체방 외출 [해제]
+                    nImgID_Unset_PuaseOut_Pressed = R.drawable.btn_release_goout_pressed_easymode;
+                }
+                else {
+                    nImgID_Set_PuaseOut_Normal = R.drawable.control_heat_btn_all_goout_ok_normal;          // 전체방 외출 [실행]
+                    nImgID_Set_PuaseOut_Pressed = R.drawable.control_heat_btn_all_goout_ok_pressed;
+                    nImgID_Unset_PuaseOut_Normal = R.drawable.control_heat_btn_all_goout_cancel_normal;        // 전체방 외출 [해제]
+                    nImgID_Unset_PuaseOut_Pressed = R.drawable.control_heat_btn_all_goout_cancel_pressed;
+                }
+                bImageIDSet = true;
+                Heating_Manual_Str += "Batch:Outing/";
+            }
+        }
+        else {
+            Log.e(TAG, "[HeatingV2MainScreen] mData.Pause & Outing Not Supported !!!");
+        }
+
+        if (bImageIDSet) {
+            if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
+                int[][] mAllOnPos = {{980, 168}, {980, 168}};
+                BTN_ENTIRE_ON = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_EntireOn_Normal, nImgID_EntireOn_Pressed, ID.heatingV2main.button.ALL_ON);
+                ViewRegistration(layout, BTN_ENTIRE_ON, Common.ImgPosion.GetX(mAllOnPos[UX_MODE][0]), Common.ImgPosion.GetY(mAllOnPos[UX_MODE][1]));
+                BTN_ENTIRE_ON.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+                int[][] mAllOffPos = {{980, 304}, {980, 384}};
+                BTN_ENTIRE_OFF = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_EntireOff_Normal, nImgID_EntireOff_Pressed, ID.heatingV2main.button.ALL_OFF);
+                ViewRegistration(layout, BTN_ENTIRE_OFF, Common.ImgPosion.GetX(mAllOffPos[UX_MODE][0]), Common.ImgPosion.GetY(mAllOffPos[UX_MODE][1]));
+                BTN_ENTIRE_OFF.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+                int[][] mExecutePos = {{980, 440}, {980, 440}};
+                BTN_ENTIRE_SET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_Set_PuaseOut_Normal, nImgID_Set_PuaseOut_Pressed, ID.heatingV2main.button.ALL_EXECUTION);
+                ViewRegistration(layout, BTN_ENTIRE_SET_PAUSEOUT, Common.ImgPosion.GetX(mExecutePos[UX_MODE][0]), Common.ImgPosion.GetY(mExecutePos[UX_MODE][1]));
+                BTN_ENTIRE_SET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+                int[][] mReleasePos = {{980, 576}, {980, 576}};
+                BTN_ENTIRE_UNSET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 136, nImgID_Unset_PuaseOut_Normal, nImgID_Unset_PuaseOut_Pressed, ID.heatingV2main.button.ALL_RELEASE);
+                ViewRegistration(layout, BTN_ENTIRE_UNSET_PAUSEOUT, Common.ImgPosion.GetX(mReleasePos[UX_MODE][0]), Common.ImgPosion.GetY(mReleasePos[UX_MODE][1]));
+                BTN_ENTIRE_UNSET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            }
+            else {
+                int[][] mExecutePos = {{980, 168}, {936, 110}};
+                BTN_ENTIRE_SET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 272, nImgID_Set_PuaseOut_Normal, nImgID_Set_PuaseOut_Pressed, ID.heatingV2main.button.ALL_EXECUTION);
+                ViewRegistration(layout, BTN_ENTIRE_SET_PAUSEOUT, Common.ImgPosion.GetX(mExecutePos[UX_MODE][0]), Common.ImgPosion.GetY(mExecutePos[UX_MODE][1]));
+                BTN_ENTIRE_SET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+                int[][] mReleasePos = {{980, 440}, {936, 382}};
+                BTN_ENTIRE_UNSET_PAUSEOUT = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 272, nImgID_Unset_PuaseOut_Normal, nImgID_Unset_PuaseOut_Pressed, ID.heatingV2main.button.ALL_RELEASE);
+                ViewRegistration(layout, BTN_ENTIRE_UNSET_PAUSEOUT, Common.ImgPosion.GetX(mReleasePos[UX_MODE][0]), Common.ImgPosion.GetY(mReleasePos[UX_MODE][1]));
+                BTN_ENTIRE_UNSET_PAUSEOUT.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            }
+        }
+
+        nRoomCnt = info.RoomCount;
+        Log.i(TAG, "nRoomCnt = " + nRoomCnt);
+        Heating_Manual_Str += "Room:" + nRoomCnt + "/";
+        Log.d(TAG, "[HeatingV2MainScreen] nRoomCnt [" + nRoomCnt + "]");
+
+        /**
+         * 방명칭 수정코드 (JEFF, 2020.07.20)
+         * 사용자 설정화면에서 방명칭이 수정되어 실제 방개수보다 방명칭 개수가 적은 경우
+         * 부족한 방명칭을 보충하는 기능
+         * 사유: 방명칭 설정시 방명칭의 최대 개수는 6이 되어, 방 개수가 그 이상인 경우에는 오류 발생
+         * 추후, 방명칭 설정 기능도 수정해야 함
+         */
+        if (astrRoomTitle.length < nRoomCnt) {
+            String[] tempRoomName = new String[nRoomCnt];
+            for (int i = 0; i < nRoomCnt; i++) {
+                if (astrRoomTitle.length > i) tempRoomName[i] = astrRoomTitle[i];
+                else tempRoomName[i] = "방" + i;
+            }
+            astrRoomTitle = tempRoomName;
+            for (int i = 0; i < astrRoomTitle.length; i++) {
+                Log.i(TAG, "[HeatingV2MainScreen] mRoomNameList[" + i + "]: " + astrRoomTitle[i]);
+            }
+        }
+
+        // 5. RoomClass Create
+        DebugLogOutput("[HeatingV2MainScreen] - Step5 : RoomClass Create");
+        BTN_PAGE_UP =  new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 110, R.drawable.btn_left_normal, R.drawable.btn_left_pressed, ID.heatingV2main.button.LEFT_MOVE_BTN );
+        ViewRegistration(getLayout(), BTN_PAGE_UP, Common.ImgPosion.GetX(262), Common.ImgPosion.GetY(670));
+
+        BTN_PAGE_DOWN =  new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 110, 110, R.drawable.btn_right_normal, R.drawable.btn_right_pressed, ID.heatingV2main.button.RIGHT_MOVE_BTN );
+        ViewRegistration(getLayout(), BTN_PAGE_DOWN, Common.ImgPosion.GetX(636), Common.ImgPosion.GetY(670));
+
+        int[] mPageFontSize = {Common.fontsize._36, Common.fontsize._44};
+        TXT_PAGE_NO = new WpadTextView(getContext(), false, 264, 110, Gravity.CENTER, Color.WHITE, mPageFontSize[UX_MODE], false, ID.heatingV2main.text.PAGE_TEXT);
+        ViewRegistration(getLayout(), TXT_PAGE_NO, Common.ImgPosion.GetX(372), Common.ImgPosion.GetY(670));
+        TXT_PAGE_NO.setText(nCurrentPageNo + "/" + nTotalPageNo);
+
+        roomView = new RoomView[info.RoomCount];
+
+        nCurrentPageNo = 1;
+        drawCurrentPage(info, (nCurrentPageNo - 1) * ROOM_CNT);
+
+        // 6. Draw_Update
+//        DebugLogOutput("[HeatingV2MainScreen] - Step6 : Draw_Update");
+
+        //     6.1. Room Name 표시
+//        Draw_TitleUpdate((CurrentPageNum - 1) * ROOM_CNT);
+//        DebugLogOutput("Draw_TitleUpdate ---");
+
+        //     6.2. 보일러 지원 여부에 따라 아이콘 보이기
+        Log.d(TAG, "[HeatingV2MainScreen] - Boiler : " + info.Support.Boiler);
+        if (info.Support.Boiler) {
+            ((MainActivity)(getContext())).setTopBoilerBtnVisible(true);
+            Heating_Manual_Str += "Boiler:" + 1 + "/";
+        }
+        else {
+            Heating_Manual_Str += "Boiler:" + 0 + "/";
+        }
+
+        //     6.3. update
+        try {
+            drawUpdate(Common.INDEX_ALL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+
+        DebugLogOutput("[HeatingV2MainScreen] Draw_Update ---");
+
+        if (heatingV2API != null) {
+            registerDeviceBR(true);
+            if (MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) heatingV2API, (WpadScreen) this);
+        }
+    }
+
+    /**
+     * 본 스크린 종료시 호출됨
+     */
+    @Override
+    protected void onClose() {
+        super.onClose();
+
+        // 등록된 BR 을 해제 한다.
+        if (heatingV2API != null) {
+            registerDeviceBR(false);
+            if (MainActivity.getHideMenuOn()) { if (transactionDisplay != null) transactionDisplay.Close(); }
+        }
+
+        // 보일러 지원 여부에 따라 아이콘 안보이기
+        if (mData.heatingV2.Device.info.Support.Boiler) ((MainActivity)(getContext())).setTopBoilerBtnVisible(false);
+
+        Log.i(TAG, "[END   - Screen] ********************************************");
+    }
+
+    /**
+     * 팝업종료시 데이터가 있을시 호출됨
+     */
+    @Override
+    protected void onPopupResult(Intent intent) {
+        if (intent != null) {
+            int Screen = intent.getIntExtra("SCREEN", -1);
+            if (Screen == ID.screen.HeatingV2PopupScreen) {
+                if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    double[] CurTempArray = intent.getDoubleArrayExtra("CURTEMP_ARRAY");
+                    double[] SetTempArray = intent.getDoubleArrayExtra("SETTEMP_ARRAY");
+                    byte[] ModeArray    = intent.getByteArrayExtra  ("MODE_ARRAY");
+
+                    if ((CurTempArray != null) && (SetTempArray != null) && (ModeArray != null)) {
+                        for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                            HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+                            roomData.NowTemp = CurTempArray[i];
+                            roomData.SetTemp = SetTempArray[i];
+                            roomData.Mode    = ModeArray[i];
+
+                            if (Data_DriveModeConverterOnOff((byte)i)) {
+                                if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
+                                else roomData.bValveStatus = false;
+                            }
+                            else {
+                                roomData.bValveStatus = false;
+                            }
+                        }
+                        drawUpdate(Common.INDEX_ALL);
+                    }
+                }
+            }
+        }
+    }
+
+
+    // =================================================================================================
+    // [[ BroadcastReceiver ]] region
+    // =================================================================================================
+    /**
+     * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
+     */
+    @Override
+    protected void onBrReceive(Intent intent) {
+        super.onBrReceive(intent);
+
+        String ActionName = intent.getAction();
+
+        DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
+        if (ActionName.equals(ID.heatingV2main.BR_HEATING)) {
+            DebugLogOutput("onBrReceive - BR_HEATING");
+
+            byte RoomIdx = intent.getByteExtra("STATUS", (byte)0xF0);
+            DebugLogOutput("RoomIdx : " + String.format("%02x", RoomIdx) );
+            if (RoomIdx != (byte)0xF0) {
+                if (updateDevice(RoomIdx, false) >= 0) drawUpdate(RoomIdx);
+            }
+        }
+    }
+
+
+    // =================================================================================================
+    // [[ Touch & Key Event ]] region
+    // =================================================================================================
+    /**
+     * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
+     */
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+        super.onTouchEvent(v, event);
+
+        int TargetId = v.getId();
+        int MoveEvent = event.getAction();
+
+        if (MoveEvent == MotionEvent.ACTION_UP) {
+//            Log.e(TAG, "[onTouchEvent] TargetId -> " + TargetId);
+            if (TargetId == ID.heatingV2main.button.ALL_EXECUTION) {
+                // 전체방 실행 (일시정지 or 외출)
+                DebugLogOutput("onTouchEvent [ALL_EXECUTION] BUTTON !!!");
+
+                if (mData.heatingV2.Device.info.Support.Pause) {
+                    // 일시정지
+                    if (OPERATION_MODE == Common.MODE_NOMAL) {
+                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.Pause);
+                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                    }
+                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        Sample_AllPauseOnOff(true);
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                    }
+                }
+                else if (mData.heatingV2.Device.info.Support.Outing) {
+                    // 외출모드
+                    if (OPERATION_MODE == Common.MODE_NOMAL) {
+                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.Outing);
+                        if(ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                    }
+                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        Sample_AllOutingOnOff(true);
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                    }
+                }
+            }
+            else if (TargetId == ID.heatingV2main.button.ALL_RELEASE) {
+                // 전체방 해제 (일시정지 or 외출)
+                DebugLogOutput("onTouchEvent [ALL_RELEASE] BUTTON !!!");
+
+                if (mData.heatingV2.Device.info.Support.Pause) {
+                    // 일시정지
+                    if (OPERATION_MODE == Common.MODE_NOMAL) {
+                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.PauseRelease);
+                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                    }
+                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        Sample_AllPauseOnOff(false);
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                    }
+                }
+                else if (mData.heatingV2.Device.info.Support.Outing) {
+                    // 외출
+                    if (OPERATION_MODE == Common.MODE_NOMAL) {
+                        int ret = ctrlDeviceEntireMode(HeatingV2.MODE.OutingRelease);
+                        if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                        else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                    }
+                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        Sample_AllOutingOnOff(false);
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                    }
+                }
+            }
+            else if (TargetId == ID.heatingV2main.button.ALL_ON) {
+                // 전체방 해제 (일시정지 or 외출)
+                DebugLogOutput("onTouchEvent [ALL_ON] BUTTON !!!");
+
+                if (OPERATION_MODE == Common.MODE_NOMAL) {
+                    int ret = ctrlDeviceEntireMode(HeatingV2.MODE.HeatingON);
+                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                }
+                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    Sample_AllOutingOnOff(false);
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+            }
+            else if (TargetId == ID.heatingV2main.button.ALL_OFF) {
+                // 전체방 해제 (일시정지 or 외출)
+                DebugLogOutput("onTouchEvent [ALL_OFF] BUTTON !!!");
+
+                if (OPERATION_MODE == Common.MODE_NOMAL) {
+                    int ret = ctrlDeviceEntireMode(HeatingV2.MODE.HeatingOFF);
+                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                }
+                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    Sample_AllOutingOnOff(false);
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+            }
+            else if ((TargetId >= ID.heatingV2main.button.ROOM_TITLE_1) && (TargetId <= ID.heatingV2main.button.ROOM_TITLE_8)) {
+                // 각방 타이틀 클릭
+                int index = TargetId - ID.heatingV2main.button.ROOM_TITLE_1;
+                DebugLogOutput("onTouchEvent [ROOM_TITLE_" + (index+1) + "] BUTTON !!!");
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+
+                Intent data = new Intent();
+
+                // 타겟 룸인덱스
+                data.putExtra("ROOM_INDEX", index);
+
+                // 룸명칭 리스트
+                data.putExtra("ROOM_NAME_ARRAY", astrRoomTitle);
+
+                if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    data.putExtra("ROOM_COUNT", mData.heatingV2.Device.info.RoomCount);
+
+                    double [] CurTempArray = new double [] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+                    double [] SetTempArray = new double [] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+                    byte   [] ModeArray    = new byte   [] { 0, 0, 0, 0, 0, 0 };
+
+                    for (int i=0 ; i<mData.heatingV2.Device.info.RoomCount ; i++) {
+                        CurTempArray[i] = mData.heatingV2.Device.Room[i].NowTemp;
+                        SetTempArray[i] = mData.heatingV2.Device.Room[i].SetTemp;
+                        ModeArray[i]    = mData.heatingV2.Device.Room[i].Mode;
+                    }
+
+                    data.putExtra("CURTEMP_ARRAY", CurTempArray);
+                    data.putExtra("SETTEMP_ARRAY", SetTempArray);
+                    data.putExtra("MODE_ARRAY"   , ModeArray);
+                }
+
+                ((MainActivity)(getContext())).StartPopup(ID.screen.HeatingV2PopupScreen, data);
+            }
+            else if ((TargetId >= ID.heatingV2main.button.ROOM_ONOFF_1) && (TargetId <= ID.heatingV2main.button.ROOM_ONOFF_8)) {
+                // 각방 ON/OFF 클릭
+                int index = TargetId - ID.heatingV2main.button.ROOM_ONOFF_1;
+                DebugLogOutput("onTouchEvent [ROOM_ONOFF_" + (index+1) + "] BUTTON !!!");
+
+                if (OPERATION_MODE == Common.MODE_NOMAL) {
+                    byte DeiveMode = HeatingV2.MODE.HeatingON;
+                    if (Data_DriveModeConverterOnOff((byte)index)) DeiveMode = HeatingV2.MODE.HeatingOFF;
+                    int ret =  ctrlDeviceMode((byte)index, DeiveMode);
+                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                }
+                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    byte DeiveMode = HeatingV2.MODE.HeatingON;
+                    if (Data_DriveModeConverterOnOff((byte)index)) DeiveMode = HeatingV2.MODE.HeatingOFF;
+                    Sample_ControlMode((byte)index, DeiveMode);
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+            }
+            else if (TargetId == ID.heatingV2main.button.LEFT_MOVE_BTN) {
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                movePage(false);
+            }
+            else if (TargetId == ID.heatingV2main.button.RIGHT_MOVE_BTN) {
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                movePage(true);
+            }
+
+
+        }
+    }
+
+
+    // =================================================================================================
+    // [[ Draw ]] region
+    // =================================================================================================
+    /**
+     * 변경되는 이미지를 다시 그린다.
+     *
+     * @param index - (byte) 변경할 방 인덱스 , Common.INDEX_ALL 일 경우 전체
+     */
+    private void drawUpdate(byte index) {
+        try {
+//            Log.e(TAG, "[drawUpdate] index: " + String.format("%02X", index));
+            int startIdx = (nCurrentPageNo - 1) * ROOM_CNT;
+            HeatingV2.Info info = mData.heatingV2.Device.info;
+            if (index == Common.INDEX_ALL) {
+                for (int i=startIdx ; i<startIdx+ROOM_CNT ; i++) {
+                    if (i < nRoomCnt) {
+                        HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+
+                        // 운전모드 표시
+                        drawModeChange(i, roomData.bValveStatus, roomData.Mode);
+
+                        // 현재온도 표시
+                        drawCurrentTemper(i, roomData.NowTemp);
+
+                        // 설정온도 표시
+                        if (Data_DriveModeConverterOnOff((byte) i)) drawSetTemper(i, roomData.SetTemp);
+                        else roomView[i].TXT_TEMPER_SET.setText("");
+                    }
+                }
+            }
+            else {
+                if (!checkRoomIndex(index)) return;
+
+                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[index];
+
+                // 운전모드 표시
+                drawModeChange(index, roomData.bValveStatus, roomData.Mode);
+
+                // 현재온도 표시
+                drawCurrentTemper(index, roomData.NowTemp);
+
+                // 설정온도 표시
+                if (Data_DriveModeConverterOnOff(index)) drawSetTemper(index, roomData.SetTemp);
+                else roomView[index].TXT_TEMPER_SET.setText("");
+            }
+
+            // 하단 전체방 외출 or 일시정지 버튼 활성화 비활성화
+            if (info.Support.Pause) {
+                byte Mode = 0;
+                byte PauseCount = 0;
+                for (byte i=0 ; i<info.RoomCount ; i++) {
+                    Mode = mData.heatingV2.Device.Room[i].Mode;
+                    if(Mode == HeatingV2.MODE.Pause) PauseCount++;
+                }
+
+                // 전체방이 일시정지일 경우
+                if (info.RoomCount == PauseCount) {
+                    if (UX_MODE == Common.UX_EASY_MODE) BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(R.drawable.btn_run_pause_disabled_easymode);
+                    else BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(R.drawable.control_heat_btn_all_pause_ok_disabled);
+                }
+                else BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();
+
+                // 전체방이 일시정지가 없을 경우
+                if (PauseCount == 0) {
+                    if (UX_MODE == Common.UX_EASY_MODE) BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(R.drawable.btn_run_release_disabled_easymode);
+                    else BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(R.drawable.control_heat_btn_all_pause_cancel_disabled);
+                }
+                else BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();
+            }
+            else if (info.Support.Outing) {
+                byte Mode = 0;
+                byte OutingCount = 0;
+                byte OffCount = 0;
+                byte OnCount = 0;
+                for (byte i = 0; i < info.RoomCount; i++) {
+                    Mode = mData.heatingV2.Device.Room[i].Mode;
+                    if (Mode == HeatingV2.MODE.Outing) OutingCount++;
+                    else if (Mode == HeatingV2.MODE.HeatingOFF) OffCount++;
+                    else if (Mode == HeatingV2.MODE.HeatingON) OnCount++;
+                }
+
+                int AllOn_DisableImageID = 0;
+                int AllOff_DisableImageID = 0;
+                int AllExecutionDisableImageID = 0;
+                int AllReleaseDisableImageID = 0;
+
+                if (MainActivity.nConstructionFunction == WallpadDeviceSet.CONSTRUCTION_SPECIAL_FUNCTION_SK) {
+                    AllOn_DisableImageID = R.drawable.btn_ctrl_heating_all_on_disabled;
+                    AllOff_DisableImageID = R.drawable.btn_ctrl_heating_all_off_disabled;
+                    AllExecutionDisableImageID = R.drawable.btn_ctrl_heating_all_goout_on_disabled;
+                    AllReleaseDisableImageID = R.drawable.btn_ctrl_heating_all_goout_off_disabled;
+                }
+                else {
+                    if (UX_MODE == Common.UX_EASY_MODE) {
+                        AllExecutionDisableImageID = R.drawable.btn_run_goout_disabled_easymode;
+                        AllReleaseDisableImageID = R.drawable.btn_release_goout_disabeld_easymode;
+                    }
+                    else {
+                        AllExecutionDisableImageID = R.drawable.control_heat_btn_all_goout_ok_disabled;
+                        AllReleaseDisableImageID = R.drawable.control_heat_btn_all_goout_cancel_disabled;
+                    }
+                }
+
+                if (info.RoomCount == OnCount) {
+//                    Log.e(TAG, "[drawUpdate] ========== case 1 ==========");
+                    // 전체 난방이 켜진 경우 - 전체 On(비활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(비활성화)
+                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffEnable(AllOn_DisableImageID);   // 전체방 켜기 - Disable
+                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
+
+                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
+                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
+                }
+                else if (info.RoomCount == OffCount) {
+//                    Log.e(TAG, "[drawUpdate] ========== case 2 ==========");
+                    // 전체 난방이 꺼진 경우 - 전체 On(활성화), 전체 Off(비활성화), 전체 외출(비활성화), 전체 외출해제(비활성화)
+                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 Enable
+                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffEnable(AllOff_DisableImageID);   // 전체방 끄기 - Disable
+
+                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(AllExecutionDisableImageID);   // 전체방 외출설정 - Disable
+                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
+                }
+                else if (info.RoomCount == OutingCount) {
+//                    Log.e(TAG, "[drawUpdate] ========== case 3 ==========");
+                    // 전체 난방이 외출인 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(비활성화), 전체 외출해제(활성화)
+                    if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
+                    if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
+
+                    BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffEnable(AllExecutionDisableImageID);   // 전체방 외출설정 - Disable
+                    BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
+                }
+                else {
+                    if (0 < OnCount && OnCount <info.RoomCount) {
+                        // 일부 난방이 켜진 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(모름), 전체 외출해제(모름)
+                        if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
+                        if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
+
+                        BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
+                        if (0 < OutingCount) {
+//                            Log.e(TAG, "[drawUpdate] ========== case 4 ==========");
+                            // 일부 난방이 켜지고, 외출설정된 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(활성화)
+                            BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
+                        }
+                        else {
+//                            Log.e(TAG, "[drawUpdate] ========== case 5 ==========");
+                            // 일부 난방이 켜지고, 외출해제된 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(비활성화)
+                            BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffEnable(AllReleaseDisableImageID);   // 전체방 외출해제 - Disable
+                        }
+                    }
+                    else {
+//                        Log.e(TAG, "[drawUpdate] ========== case 6 ==========");
+                        // 전체 난방이 꺼지거나 외출설정인 경우 - 전체 On(활성화), 전체 Off(활성화), 전체 외출(활성화), 전체 외출해제(활성화)
+                        if (BTN_ENTIRE_ON != null) BTN_ENTIRE_ON.setButtonEventOffDisable();   // 전체방 켜기 - Enable
+                        if (BTN_ENTIRE_OFF != null) BTN_ENTIRE_OFF.setButtonEventOffDisable();   // 전체방 끄기 - Enable
+
+                        BTN_ENTIRE_SET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출설정 - Enable
+                        BTN_ENTIRE_UNSET_PAUSEOUT.setButtonEventOffDisable();   // 전체방 외출해제 - Enable
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] drawUpdate(byte index)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private void drawCurrentPage(HeatingV2.Info info, int startIdx) {
+        try {
+            Log.d(TAG, "[drawCurrentPage] startIdx [" + startIdx + "], CurrentPageNum [" + nCurrentPageNo + "], ROOM_CNT [" + ROOM_CNT + "], roomView.length [" + roomView.length + "]");
+            if (info.RoomCount <= ROOM_CNT) {
+                BTN_PAGE_UP.setVisibility(View.INVISIBLE);
+                BTN_PAGE_DOWN.setVisibility(View.INVISIBLE);
+                TXT_PAGE_NO.setVisibility(View.INVISIBLE);
+            }
+
+            if (startIdx >= 0 && startIdx % ROOM_CNT == 0) {
+                for (int j = 0; j < roomView.length; j++) {
+                    if (roomView[j] != null) roomView[j].setVisibility(false);
+                }
+            }
+
+            int left, top;
+            for (int i = startIdx; i < info.RoomCount && i < startIdx + ROOM_CNT; i++) {
+                if (UX_MODE == Common.UX_EASY_MODE) {
+                    left = Common.ImgPosion.GetX(mRoomPos_easymode[info.RoomCount - 1][i][0]);
+                    top = Common.ImgPosion.GetX(mRoomPos_easymode[info.RoomCount - 1][i][1]);
+                }
+                else {
+                    left = Common.ImgPosion.GetX(mRoomPos[info.RoomCount - 1][i][0]);
+                    top = Common.ImgPosion.GetX(mRoomPos[info.RoomCount - 1][i][1]); // 왜 X로 했는데 좌표가 잘 맞지???
+                }
+
+//                Log.d(TAG, "[drawCurrentPage] i = " + i + " / left = " + left + " / top = " + top);
+                roomView[i] = new RoomView(left, top, i);
+                drawEntireRoomTitle(i);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] drawCurrentPage(HeatingV2.Info info, int startIdx)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    /**
+     * {@link #roomView} 에 대한 기본적인 범위체크를 한다.
+     *
+     * @param index - (int) 체크할 인덱스
+     * @return (boolean) true : 정상, false : 범위이탈
+     */
+    private boolean checkRoomIndex(int index) {
+        if (index < 0) return false;
+        if (roomView == null) return false;
+        if (roomView.length <= index) return false;
+        if (index < ((nCurrentPageNo * 6) - 6) || ((nCurrentPageNo * 6) - 1) < index) return false;
+        return true;
+    }
+
+    /**
+     * 방명칭을 개별적으로 화면에 반영한다.
+     *
+     * @param index - (int) 변경할 룸의 인덱스
+     * param TitleStr - (String) 변경할 명칭
+     */
+    private void drawRoomTitle(int index, String value) {
+        if(!checkRoomIndex(index)) return;
+        roomView[index].TXT_TITLE.setText(value);
+    }
+
+    /**
+     * 방명칭 전체를 화면에 업데이트한다.
+     */
+    private void drawEntireRoomTitle(int idx) {
+        if (mData == null) return;
+        drawRoomTitle(idx, astrRoomTitle[idx]);
+    }
+
+    /**
+     * 현재온도를 화면에 반영한다.
+     * @param index - (int) 변경할 룸의 인덱스
+     * @param temp - (double) 변경할 온도
+     */
+    private void drawCurrentTemper(int index, double temp) {
+        if(!checkRoomIndex(index)) return;
+        String str = String.format("%.1f", temp);
+        roomView[index].TXT_TEMPER_CURRENT.setText(str);
+    }
+
+    /**
+     * 설정온도를 화면에 반영한다.
+     * @param index - (int) 변경할 룸의 인덱스
+     * @param temp - (double) 변경할 온도
+     */
+    private void drawSetTemper(int index, double temp) {
+        if (!checkRoomIndex(index)) return;
+        String str = String.format("%.1f", temp);
+        roomView[index].TXT_TEMPER_SET.setText(str);
+    }
+
+    /**
+     * 모드상태와 밸브상태를 화면에 반영한다.
+     *
+     * @param index - (int) 변경할 룸의 인덱스
+     * @param valve - (boolean) 변경할 밸브상태
+     * @param mode  - (byte) 변경할 운전모드 ( 0 : OFF, 1 : ON, 2 : 일시정지 )
+     */
+    private void drawModeChange(int index, boolean valve, byte mode) {
+        try {
+//            Log.w(TAG, "[drawModeChange] index [" + index + "], valve [" + valve + "], mode [" + mode + "], roomView.length [" + roomView.length + "]");
+            if (!checkRoomIndex(index)) return;
+
+            String str = new String();
+            if (valve) {
+                roomView[index].BACKGROUND.setButtonPressedImageID();
+                roomView[index].IMG_FIRE.setVisibility(View.VISIBLE);
+                roomView[index].TXT_MODE.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
+                str = "  ";
+            }
+            else {
+                roomView[index].BACKGROUND.setButtonDefaultImageID();
+                roomView[index].IMG_FIRE.setVisibility(View.INVISIBLE);
+                roomView[index].TXT_MODE.setGravity(Gravity.CENTER | Gravity.CENTER_VERTICAL);
+            }
+
+            float textsize = Common.fontsize._26_DEFAULT;
+
+            if (Data_DriveModeConverterOnOff((byte)index)) {
+                roomView[index].BTN_ONOFF.setButtonRearImage();
+            }
+            else {
+                if (mode == HeatingV2.MODE.Pause) textsize = Common.fontsize._20;
+                roomView[index].BTN_ONOFF.setButtonFrontImage();
+            }
+
+            if (UX_MODE == Common.UX_NORMAL_MODE) {
+                if (roomView[index].TXT_MODE.getTextSize() != textsize) roomView[index].TXT_MODE.setTextSize(TypedValue.COMPLEX_UNIT_PX, textsize);
+            }
+
+            if (mDriveModeString.length <= mode) {
+                Log.e(TAG, "[drawModeChange] - mode Out of range !!! (mode:" + mode + ")");
+            }
+            else {
+                str += mDriveModeString[mode];
+                roomView[index].TXT_MODE.setText(str);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] drawModeChange(int index, boolean valve, byte mode)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private void movePage(boolean bNext) {
+        try {
+            if (bNext) {
+                nCurrentPageNo++;
+                if (nCurrentPageNo > nTotalPageNo) nCurrentPageNo = 1;
+            }
+            else {
+                nCurrentPageNo--;
+                if (nCurrentPageNo < 1) nCurrentPageNo = nTotalPageNo;
+            }
+            TXT_PAGE_NO.setText(nCurrentPageNo + "/" + nTotalPageNo);
+
+            drawCurrentPage(mData.heatingV2.Device.info, (nCurrentPageNo - 1) * ROOM_CNT);
+            drawUpdate(Common.INDEX_ALL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] movePage(boolean bNext)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    // =================================================================================================
+    // [[ Device ]] region
+    // =================================================================================================
+    /**
+     * 디바이스 API 를 Load 한다.
+     *
+     * @param wpapi - 생성시 전달받은 WallPadAPI
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int loadDeviceAPI(WallPadAPI wpapi) {
+        // 1. Mode Check
+        if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
+
+        DebugLogOutput("[loadDeviceAPI] - Start");
+
+        // 2. wpapi Check
+        if (wpapi == null) {
+            Log.e(TAG, "[loadDeviceAPI] - wpapi is null");
+            return -2;
+        }
+
+        // 3. Load API
+        DebugLogOutput("[loadDeviceAPI] - Step1 : heatingAPI API Load...");
+        try {
+            heatingV2API = wpapi.Get_HeatingV2Controller();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        } catch (Exception e) {
+            Log.e(TAG, "[loadDeviceAPI] - [Exception Error] wpapi.Get_HeatingV2Controller");
+            Log.e(TAG, "[loadDeviceAPI] - " + e.toString());
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+
+        if (heatingV2API == null) {
+            Log.e(TAG, "[loadDeviceAPI] - heatingV2API is null");
+            return -4;
+        }
+
+        DebugLogOutput("[loadDeviceAPI] - OK");
+
+        return 0;
+    }
+
+    /**
+     * 디바이스에 알림 BR 을 등록한다.
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int registerDeviceBR(boolean OnOff) {
+        DebugLogOutput("[registerDeviceBR] - Start (OnOff:" + OnOff + ")");
+
+        String BR_NAME = ID.heatingV2main.BR_HEATING;
+
+        // 1. Api Load Check
+        if (heatingV2API == null) {
+            Log.e(TAG, "[registerDeviceBR] - heatingV2API unload !!!");
+            return -1;
+        }
+
+        if (OnOff) {
+            try {
+                //DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
+                heatingV2API.regChangedBR(BR_NAME);
+                //DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -101;
+            } catch (Exception e) {
+                Log.e(TAG, "[registerDeviceBR] - [Exception Error] heatingV2API.regChangedBR");
+                Log.e(TAG, "[registerDeviceBR] - " + e.toString());
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                return -101;
+            }
+            super.addBrActionFilter(BR_NAME);
+        }
+        else {
+            try {
+                //DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
+                heatingV2API.unregChangedBR(BR_NAME);
+                //DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -102;
+            } catch (Exception e) {
+                Log.e(TAG, "[registerDeviceBR] - [Exception Error] heatingV2API.unregChangedBR");
+                Log.e(TAG, "[registerDeviceBR] - " + e.toString());
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                return -102;
+            }
+            super.removeBrActionFilter(BR_NAME);
+        }
+
+        return 0;
+    }
+
+    /**
+     * 제어기 상태를 가져온다.
+     *
+     * @param Index - (byte) {link REFRESH_IDX} 값 <br>
+     *                       REFRESH_IDX.ROOM1 ~ REFRESH_IDX.ROOM8 : 방개별 갱신 <br>
+     *                       REFRESH_IDX.ALL : 방전체 갱신 <br>
+     *                       REFRESH_IDX.INFO : 기기정보 갱신<br>
+     *                       REFRESH_IDX.BOILER : 보일러정보 갱신<br>
+     *                       REFRESH_IDX.SPECIALFUNC : 특화기능 정보 갱신<br>
+     *
+     * @param real  - (boolean) true : 실시간, false : 가장최근 (Index 가 REFRESH_IDX.INFO 일경우 가장최근만 적용됨)
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int updateDevice(byte Index, boolean real) {
+        try {
+            DebugLogOutput("[updateDevice] - Start   (Index:" + String.format("0x%02X", Index) + ", real:" + real + ")");
+
+            // 1. Api Load Check
+            if (heatingV2API == null) {
+                Log.e(TAG, "[updateDevice] - heatingV2API unload !!!");
+                return -1;
+            }
+
+            if (!(((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) || (Index == HeatingV2API.REFRESH_IDX.ALL) || (Index == HeatingV2API.REFRESH_IDX.BOILER) || (Index == HeatingV2API.REFRESH_IDX.SPECIALFUNC))) {
+                Log.e(TAG, "[updateDevice] - param [Index:" + Index + "] Out of range !!!");
+                return -2;
+            }
+
+            if (!(((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) || (Index == HeatingV2API.REFRESH_IDX.ALL))) {
+                // 본화면에는 없는 기능인 보일러 , 특화기능 알림은 업데이트 하지않는다.
+                DebugLogOutput("[updateDevice] - this Screen No Display (Index:" + Index + ")");
+                return -3;
+            }
+
+            // 2. Reflash
+            try {
+                int ret = (byte) heatingV2API.Refresh(Index, real);
+                if (ret < 0) {
+                    Log.e(TAG, "[updateDevice] Refresh - ret (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
+                    return -2;
+                }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -100;
+            }
+            catch (Exception e) {
+                Log.e(TAG, "[updateDevice] - [Exception Error] heatingV2API.Refresh()");
+                Log.e(TAG, "[updateDevice] - " + e.toString());
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                return -100;
+            }
+
+            // 4. Data Copy
+            mData.heatingV2 = heatingV2API.data;
+
+            // 5. Debug msg
+            if (DEBUG_LOG_ON) {
+                DebugLogOutput("---------------------------------------");
+                DebugLogOutput("[updateDevice]");
+                DebugLogOutput("---------------------------------------");
+
+                if ((Index >= HeatingV2API.REFRESH_IDX.ROOM1) && (Index <= HeatingV2API.REFRESH_IDX.ROOM8)) {
+                    DebugLogOutput(mData.heatingV2.Device.Room[Index].ToDebugString(Index));
+                }
+                else if (Index == HeatingV2API.REFRESH_IDX.ALL) {
+                    for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                        DebugLogOutput(mData.heatingV2.Device.Room[i].ToDebugString(i));
+                    }
+                }
+                else if (Index == HeatingV2API.REFRESH_IDX.INFO) {
+                    DebugLogOutput(mData.heatingV2.Device.info.ToDebugString());
+                }
+                else if (Index == HeatingV2API.REFRESH_IDX.BOILER) {
+                    DebugLogOutput(mData.heatingV2.Boiler.ToDebugString());
+                }
+                else if (Index == HeatingV2API.REFRESH_IDX.SPECIALFUNC) {
+                    DebugLogOutput(mData.heatingV2.SpecialFunc.ToDebugString());
+                }
+                DebugLogOutput("---------------------------------------");
+            }
+            DebugLogOutput("[updateDevice] - OK");
+            return 0;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] updateDevice(byte Index, boolean real)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -99;
+        }
+    }
+
+    /**
+     * 난방제어기 V2의 운전모드를 제어한다.
+     *
+     * @param RoomIdx    - (byte) 제어할 방 인덱스 (0~5)
+     * @param DeiveMode  - (byte) 변경할 운전모드 (지원 타입별로 범위 상이함) HeatingAPI.V2DRIVEMODE_NONE 은 변경하지않음
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int ctrlDeviceMode(byte RoomIdx, byte DeiveMode) {
+        DebugLogOutput("[ctrlDeviceMode] - (RoomIdx:" + RoomIdx + ", DeiveMode:" + String.format("%02x", DeiveMode) + ")");
+        return ctrlDeviceUnitStatus(RoomIdx, DeiveMode, 0);
+    }
+
+    /**
+     * 각방 제어 (운전모드 및 설정온도 변경)
+     *
+     * @param RoomIndex     - (byte) 제어할 방 인덱스 (0~5)
+     * @param SetMode   - (byte) 변경할 운전모드  {link MODE} 에 따름 ( 미설정시 MODE.Idle )
+     * @param SetTemp   - (double) 변경할 설정온도 (미설정시 '0')
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int ctrlDeviceUnitStatus(byte RoomIndex, byte SetMode, double SetTemp) {
+        DebugLogOutput("[ctrlDeviceUnitStatus] - (RoomIndex:" + RoomIndex + ", SetMode:" + String.format("%02x", SetMode) + ", SetTemp:" + SetTemp + ")");
+
+        // 1. API Load Check
+        if (heatingV2API == null) {
+            Log.e(TAG, "[ctrlDeviceUnitStatus] - heatingV2API unload !!!");
+            return -1;
+        }
+
+        // 2. Control Device
+        try {
+            int ret = heatingV2API.SetEachRoomStatus(RoomIndex, SetMode, SetTemp);
+            if (ret < 0) {
+                Log.e(TAG, "[ctrlDeviceUnitStatus] - heatingV2API.SetEachRoomStatus (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
+                return -2;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        } catch (Exception e) {
+            Log.e(TAG, "[ctrlDeviceUnitStatus] - [Exception Error] heatingV2API.SetEachRoomStatus()");
+            Log.e(TAG, "[ctrlDeviceUnitStatus] - " + e.toString());
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+
+        DebugLogOutput("[ctrlDeviceUnitStatus] - OK");
+
+        return 0;
+    }
+
+    /**
+     * 난방제어기 V2을 전체방 운전모드를 제어한다.
+     *
+     * @param DeriveMode    - (byte) 변경할 운전모드 (지원 타입별로 범위 상이함) HeatingAPI.V2DRIVEMODE_NONE 은 변경하지않음
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int ctrlDeviceEntireMode(byte DeriveMode) {
+        DebugLogOutput("[ctrlDeviceEntireMode] - (DeriveMode:" + String.format("%02x", DeriveMode) + ")");
+
+        // 1. API Load Check
+        if (heatingV2API == null) {
+            Log.e(TAG, "[ctrlDeviceEntireMode] - heatingV2API unload !!!");
+            return -1;
+        }
+
+        // 2. Param Range Check
+
+        // 3. Control Device
+        try {
+            int ret = heatingV2API.SetAllRoomStatus(DeriveMode);
+            if (ret < 0) {
+                Log.e(TAG, "[ctrlDeviceEntireMode] - heatingV2API.SetAllRoomStatus (" + ret + ")   ErrorCode = " + heatingV2API.ErrorCode.ErrStr());
+                return -2;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        } catch (Exception e) {
+            Log.e(TAG, "[ctrlDeviceEntireMode] - [Exception Error] heatingV2API.SetAllRoomStatus()");
+            Log.e(TAG, "[ctrlDeviceEntireMode] - " + e.toString());
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+
+        DebugLogOutput("[ctrlDeviceEntireMode] - OK");
+
+        return 0;
+    }
+
+    // =================================================================================================
+    // [[ Sample ]] region
+    // =================================================================================================
+    /**
+     * (영업샘플모드) 초기 값을 정의한다.
+     */
+    private void Sample_DataDefaultSetting() {
+        mData.heatingV2 = new HeatingV2API.Data();
+        byte RoomCount = (byte) ROOM_CNT;
+        int GetRoomCount = DB_GetSampleRoomNumber();
+        if(GetRoomCount > 0) RoomCount = (byte) GetRoomCount;
+//        RoomCount = 6; // 테스트 @@@@@@@@@@
+        mData.heatingV2.Device.SetRoomCount(RoomCount);
+
+        HeatingV2.Info info = mData.heatingV2.Device.info;
+        if (Version.getGatewayUsage()) {
+            // 현산향 (게이트웨이 사용)
+            info.Support.SetTempPoint05 = true;           // 설정온도단위 (true:0.5도 , false:1도)
+            info.Support.Outing         = false;          // 외출 : 난방모드 외출 기능 지원여부 (true:지원, false:미지원)
+            info.Support.Sleep          = true;           // 취침 : 취침 관련 프로토콜 지원여부 (true:지원, false:미지원)
+            info.Support.Reservation    = true;           // 예약 : 24시간예약 관련 프로토콜 지원여부
+            info.Support.Pause          = true;           // 일시정지 : 난방모드 일시정지 기능 지원여부
+
+            info.Support.AI             = true;           // 인공지능 : 난방운전방식중 인공지능 설정 기능 지원여부
+            info.Support.OutsideTempUse = true;           // 외기온도 : 외기온도 사용여부
+            info.Support.Boiler         = true;           // 보일러지원 : 보일러 지원여부
+
+            info.Support.MinSetTemp     = 5;              // 지원하는 최저설정온도
+            info.Support.MaxSetTemp     = 40;             // 지원하는 최대설정온도
+        }
+        else {
+            // 대외향 (게이트웨이 미사용)
+            info.Support.SetTempPoint05 = true;           // 설정온도단위 (true:0.5도 , false:1도)
+            info.Support.Outing         = true;           // 외출 : 난방모드 외출 기능 지원여부 (true:지원, false:미지원)
+            info.Support.Sleep          = false;          // 취침 : 취침 관련 프로토콜 지원여부 (true:지원, false:미지원)
+            info.Support.Reservation    = false;          // 예약 : 24시간예약 관련 프로토콜 지원여부
+            info.Support.Pause          = false;          // 일시정지 : 난방모드 일시정지 기능 지원여부
+
+            info.Support.AI             = false;          // 인공지능 : 난방운전방식중 인공지능 설정 기능 지원여부
+            info.Support.OutsideTempUse = false;          // 외기온도 : 외기온도 사용여부
+            info.Support.Boiler         = false;          // 보일러지원 : 보일러 지원여부
+
+            info.Support.MinSetTemp     = 5;              // 지원하는 최저설정온도
+            info.Support.MaxSetTemp     = 40;             // 지원하는 최대설정온도
+        }
+
+        for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+            boolean ON = false;
+            HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+            switch (i) {
+                case 0:
+                    roomData.Mode = HeatingV2.MODE.HeatingON;
+                    roomData.SetTemp = 19.5;
+                    roomData.NowTemp = 18.0;
+                    ON = true;
+                    break;
+
+                case 1:
+                    roomData.Mode = HeatingV2.MODE.HeatingON;
+                    roomData.SetTemp = 16.0;
+                    roomData.NowTemp = 16.5;
+                    ON = true;
+                    break;
+
+                case 2:
+                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) roomData.Mode = HeatingV2.MODE.Pause;
+                    else roomData.Mode = HeatingV2.MODE.Outing;
+
+                    roomData.SetTemp = 16.5;
+                    roomData.NowTemp = 15.0;
+
+                    break;
+
+                case 3:
+                    roomData.Mode = HeatingV2.MODE.HeatingOFF;
+                    roomData.SetTemp = 22.0;
+                    roomData.NowTemp = 20.5;
+                    break;
+
+                case 4:
+                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) roomData.Mode = HeatingV2.MODE.Sleep;
+                    else roomData.Mode = HeatingV2.MODE.HeatingON;
+
+                    roomData.SetTemp = 20.0;
+                    roomData.NowTemp = 14.5;
+                    ON = true;
+                    break;
+
+                case 5:
+                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
+                        roomData.Mode = HeatingV2.MODE.Reservation;
+                        ON = true;
+                    }
+                    else {
+                        roomData.Mode = HeatingV2.MODE.HeatingOFF;
+                    }
+
+                    roomData.SetTemp = 18.0;
+                    roomData.NowTemp = 17.0;
+                    break;
+
+                case 6:
+                    roomData.Mode = HeatingV2.MODE.HeatingON;
+                    roomData.SetTemp = 16.0;
+                    roomData.NowTemp = 16.5;
+                    ON = true;
+                    break;
+            }
+
+            if (ON) {
+                if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
+                else roomData.bValveStatus = false;
+            }
+            else roomData.bValveStatus = false;
+        }
+    }
+
+    /**
+     * (영업샘플모드) 가상으로 난방 전원을 ON/OFF 한다.
+     */
+    private void Sample_ControlMode(byte RoomIdx, byte DeiveMode) {
+        if (mData == null) return;
+        if (mData.heatingV2.Device.Room == null) return;
+
+
+        HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[RoomIdx];
+        roomData.Mode = DeiveMode;
+
+        if (Data_DriveModeConverterOnOff(RoomIdx)) {
+            if (roomData.SetTemp > roomData.NowTemp) roomData.bValveStatus = true;
+            else roomData.bValveStatus = false;
+        }
+        else roomData.bValveStatus = false;
+
+        drawUpdate(RoomIdx);
+    }
+
+    /**
+     * (영업샘플모드) 전체방 외출 or 일시정지시 이전 운전모드 저장용 변수
+     */
+    private byte [] sample_OldMode = new byte [] {  HeatingV2.MODE.HeatingON,
+            HeatingV2.MODE.HeatingON,
+            HeatingV2.MODE.HeatingON,
+            HeatingV2.MODE.HeatingON,
+            HeatingV2.MODE.HeatingON,
+            HeatingV2.MODE.HeatingON, };
+
+    /**
+     * (영업샘플모드) 가상으로 난방 일시정지를 실행/해제 한다.
+     */
+    private void Sample_AllPauseOnOff(boolean OnOff) {
+        if (mData == null) return;
+        if (mData.heatingV2.Device.Room == null) return;
+
+        if (OnOff) {
+            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+                if (roomData.Mode != HeatingV2.MODE.Pause) {
+                    sample_OldMode[i] = roomData.Mode;
+                    roomData.Mode = HeatingV2.MODE.Pause;
+                    roomData.bValveStatus = false;
+                }
+            }
+        }
+        else {
+            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+                if (roomData.Mode == HeatingV2.MODE.Pause) {
+                    roomData.Mode = sample_OldMode[i];
+                    if ((roomData.Mode == HeatingV2.MODE.HeatingON) || (roomData.Mode == HeatingV2.MODE.Sleep) || (roomData.Mode == HeatingV2.MODE.Reservation)) {
+                        if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
+                        else roomData.bValveStatus = false;
+                    }
+                    else roomData.bValveStatus = false;
+                }
+            }
+        }
+
+        drawUpdate(Common.INDEX_ALL);
+    }
+
+    /**
+     * (영업샘플모드) 가상으로 난방 외출모드를 실행/해제 한다.
+     */
+    private void Sample_AllOutingOnOff(boolean OnOff) {
+        if (mData == null) return;
+        if (mData.heatingV2.Device.Room == null) return;
+
+        if (OnOff) {
+            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+                if (roomData.Mode != HeatingV2.MODE.Outing) {
+                    sample_OldMode[i] = roomData.Mode;
+                    roomData.Mode = HeatingV2.MODE.Outing;
+                    roomData.bValveStatus = false;
+                }
+            }
+        }
+        else {
+            for (byte i = 0; i < mData.heatingV2.Device.info.RoomCount; i++) {
+                HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[i];
+                if (roomData.Mode == HeatingV2.MODE.Outing) {
+                    roomData.Mode = sample_OldMode[i];
+                    if (roomData.Mode == HeatingV2.MODE.HeatingON) {
+                        if (roomData.NowTemp < roomData.SetTemp) roomData.bValveStatus = true;
+                        else roomData.bValveStatus = false;
+                    }
+                    else roomData.bValveStatus = false;
+                }
+            }
+        }
+
+        drawUpdate(Common.INDEX_ALL);
+    }
+
+
+    // =================================================================================================
+    // [[ Data ]] region
+    // =================================================================================================
+
+    /**
+     * 운전모드에 따른 ON/OFF 스위치 상태를 반환한다.
+     *
+     * @return (boolean) true : 스위치ON , false : 스위치OFF
+     */
+    private boolean Data_DriveModeConverterOnOff(byte index) {
+        byte mode = Data_getDriveMode(index);
+
+        if (mode == HeatingV2.MODE.HeatingON) return true;
+        else if (mode == HeatingV2.MODE.HeatingOFF) return false;
+        else if (mode == HeatingV2.MODE.Outing) return false;
+        else if (mode == HeatingV2.MODE.Sleep) return true;
+        else if (mode == HeatingV2.MODE.Reservation) return true;
+        else if (mode == HeatingV2.MODE.Pause) return false;
+
+        return false;
+    }
+
+    /**
+     * {@link #mData} DriveMode 를 반환한다.
+     *
+     * @param index - (byte) 방 인덱스
+     *
+     * @return (byte) 운전모드
+     */
+    private byte Data_getDriveMode(byte index) {
+        if (mData == null) return (byte)0x00;
+        if (mData.heatingV2.Device.Room == null) return (byte)0x00;
+        if (mData.heatingV2.Device.Room.length <= index) return (byte)0x00;
+
+        return mData.heatingV2.Device.Room[index].Mode;
+    }
+
+
+    // =================================================================================================
+    // [[ DB ]] region
+    // =================================================================================================
+    private int DB_GetSampleRoomNumber() {
+        try {
+            WallpadSalesSampleData wssd = new WallpadSalesSampleData(getContext());
+            int count = wssd.GetSampleRoomNumber();
+            wssd.closeDB();
+            DebugLogOutput("SALES_SAMPLE_MODE_ROOM_NUMBER " + count);
+            return count;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -10;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception Error] DB_GetSampleRoomNumber");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -10;
+        }
+    }
+
+    // =================================================================================================
+    // =================================================================================================
+}

+ 109 - 26
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightEtcEachMainScreen.java

@@ -170,6 +170,10 @@ public class LightEtcEachMainScreen extends WpadScreen {
 	private String [] mRoomNameList = null;             // 각방 명칭
 	private MultiSwitchAPI.Data mData = null;           // 데이터
 
+	public int mLightDeviceCount = 0;						// 조명가 있는 기기 개수합
+	private int [] mLightDeviceTable = null;				// 조명 기기인덱스로 하여 실제 기기인덱스를 구할 수 잇는 테이블
+
+
 	/**
 	 * 조명개수에 따른 좌표를 정의한다.
 	 */
@@ -190,6 +194,42 @@ public class LightEtcEachMainScreen extends WpadScreen {
 	private MultiSwitchAPI multiSwitchAPI = null;     // 대외향 - 멀티스위치 조명제어기 API
 	private TransactionDisplay transactionDisplay = null;
 
+
+	private void Util_MakeLightDeviceTable()
+	{
+		int LightDeviceCount = 0;
+
+		// 1. Get Concent Device Count
+		for(int i=0 ; i<mData.DeviceCnt ; i++)
+		{
+			if(mData.Device[i].info.Support.hLightCnt > 0)
+			{
+				LightDeviceCount++;
+			}
+		}
+		mLightDeviceCount = LightDeviceCount;
+
+		// 2. Make Table
+		if(LightDeviceCount > 0)
+		{
+			mLightDeviceTable = new int [LightDeviceCount];
+			int ConIndex = 0;
+			for(int i=0 ; i<mData.DeviceCnt ; i++)
+			{
+				if(mData.Device[i].info.Support.hLightCnt > 0)
+				{
+					mLightDeviceTable[ConIndex++] = i;
+				}
+			}
+		}
+		else
+		{
+			mLightDeviceTable = null;
+		}
+
+		Log.i(TAG, "[Util_MakeLightDeviceTable] mLightDeviceCount [" + mLightDeviceCount + "]");
+	}
+
 	public LightEtcEachMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode, String[] roomNameList) {
 		super(context, layout);
 		Log.i(TAG, "[START - Screen] --------------------------------------------");
@@ -231,27 +271,32 @@ public class LightEtcEachMainScreen extends WpadScreen {
 			TotalRoomCount = mData.DeviceCnt;
 
 			if ((mData.DeviceCnt > 0) && (mData.DeviceCnt <= 8)) {
-				roomView = new RoomView[mData.DeviceCnt];
-				int left = 0;
-				int top  = 0;
-				for (int i = 0; i < mData.DeviceCnt; i++) {
-					try {
-						left = Common.ImgPosion.GetX(mPos[mData.DeviceCnt-1][i][0]);
-						top  = Common.ImgPosion.GetY(mPos[mData.DeviceCnt-1][i][1]);
-						roomView[i] = new RoomView(left, top, i);
-					} catch (RuntimeException re) {
-						LogUtil.errorLogInfo("", TAG, re);
-						roomView[i] = null;
-					} catch (Exception e) {
-						Log.e(TAG, "[Exception Error] - [Create] roomView new : " + e.toString());
-						//e.printStackTrace();
-            			LogUtil.errorLogInfo("", TAG, e);
-						roomView[i] = null;
+				// 실제 콘센트를 가진 디바이스 개수 알아오기
+				Util_MakeLightDeviceTable();
+				if(mLightDeviceCount > 0)
+				{
+					roomView = new RoomView[mLightDeviceCount];
+					int left = 0;
+					int top  = 0;
+					for (int i = 0; i < roomView.length; i++) {
+						try {
+							left = Common.ImgPosion.GetX(mPos[roomView.length-1][i][0]);
+							top  = Common.ImgPosion.GetY(mPos[roomView.length-1][i][1]);
+							roomView[i] = new RoomView(left, top, i);
+						} catch (RuntimeException re) {
+							LogUtil.errorLogInfo("", TAG, re);
+							roomView[i] = null;
+						} catch (Exception e) {
+							Log.e(TAG, "[Exception Error] - [Create] roomView new : " + e.toString());
+							//e.printStackTrace();
+							LogUtil.errorLogInfo("", TAG, e);
+							roomView[i] = null;
+						}
 					}
 				}
 			}
 			else {
-				Log.e(TAG, "DeviceCnt  Out of range!!! (" + mData.DeviceCnt + ")");
+				Log.e(TAG, "DeviceCnt  Out of range!!! (" + mLightDeviceCount + ")");
 			}
 		} catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
@@ -455,16 +500,22 @@ public class LightEtcEachMainScreen extends WpadScreen {
 				DebugLogOutput("onTouchEvent [LIGHT_" + (index + 1) + "] BUTTON !!!");
 
 				boolean OnOff;
-				if (Util_RoomLightStatusCheck((byte)index)) OnOff = false;
+				int deviceIndex = Util_GetDeviceIndex(index);
+				if(deviceIndex < 0)
+				{
+					Log.w(TAG, "[onTouchEvent] [LIGHT_" + (index + 1) + "] BUTTON - Util_GetDeviceIndex Error (ret:" + deviceIndex + ")");
+					Sound().Play(WpadSound.SND.effect.TOUCH_UNLATCHED);
+				}
+				if (Util_RoomLightStatusCheck((byte)deviceIndex)) OnOff = false;
 				else OnOff = true;
 
 				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					int ret = Device_LightOnOff((byte)index, OnOff);
+					int ret = Device_LightOnOff((byte)deviceIndex, OnOff);
 					if (ret >= 0) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
 					else Sound().Play(WpadSound.SND.effect.TOUCH_UNLATCHED);
 				}
 				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_LightOnOff( (byte)index, OnOff);
+					Sample_LightOnOff( (byte)deviceIndex, OnOff);
 					Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
 				}
 			}
@@ -476,11 +527,17 @@ public class LightEtcEachMainScreen extends WpadScreen {
 				Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
 
 				Intent data = new Intent();
+				int deviceIndex = Util_GetDeviceIndex(index);
 				// 타겟 룸인덱스
-				data.putExtra("ROOM_INDEX", index);
+				data.putExtra("ROOM_INDEX", deviceIndex);
 				// 룸명칭 리스트
 				data.putExtra("ROOM_NAME_ARRAY", mRoomNameList);
 
+				data.putExtra("LIGHTDEVICE_COUNT", mLightDeviceCount);
+				// 콘센트 기기인덱스로 하여 실제 기기인덱스를 구할 수 잇는 테이블
+				data.putExtra("LIGHTDEVICE_TABLE", mLightDeviceTable);
+
+
 				if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
 					// DeviceCnt
 					data.putExtra("DeviceCnt", mData.DeviceCnt);
@@ -805,19 +862,45 @@ public class LightEtcEachMainScreen extends WpadScreen {
 		if (mData == null) return;
 		if (mData.Device == null) return;
 
-		for (byte i = 0; i < mData.DeviceCnt; i++) {
-			if (Util_RoomLightStatusCheck(i)) Draw_LightStatusChange(i, true);
-			else Draw_LightStatusChange(i, false);
+		int devIdx = 0;
+		for (byte i = 0; i < mLightDeviceCount; i++) {
+			devIdx = Util_GetDeviceIndex(i);
+			if(devIdx < 0)
+			{
+				Log.w(TAG, "[Draw_Update] Util_GetDeviceIndex  ret Error : (ret : " + devIdx + ")");
+				continue;
+			}
+
+			if (Util_RoomLightStatusCheck((byte) devIdx)) Draw_LightStatusChange((byte) devIdx, true);
+			else Draw_LightStatusChange((byte) devIdx, false);
 		}
 	}
 
+	private int Util_GetDeviceIndex(int LightIndex)
+	{
+		// 1. 범위체크
+		if(mLightDeviceTable == null) return -100;
+		if(mLightDeviceTable.length <= LightIndex) return -101;
+
+		// 2. return
+		return mLightDeviceTable[LightIndex];
+	}
+
 	/**
 	 * 방명칭 전체를 화면에 업데이트한다.
 	 */
 	private void Draw_TitleUpdate() {
 		if (roomView == null) return;
-		for (int i = 0; i < mData.DeviceCnt; i++) {
-			roomView[i].TitleText.setText(mRoomNameList[i]);
+		int devIdx=0;
+		for (int i = 0; i < roomView.length; i++) {
+			devIdx = Util_GetDeviceIndex(i);
+			if(devIdx < 0)
+			{
+				Log.w(TAG, "[Draw_TitleUpdate] devIdx Out of Range !!! (devIdx:" + devIdx + ")");
+				continue;
+			}
+
+			roomView[i].TitleText.setText(mRoomNameList[devIdx]);
 		}
 	}
 

+ 71 - 20
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightEtcEachPopupRoomScreen.java

@@ -117,6 +117,9 @@ public class LightEtcEachPopupRoomScreen extends WpadScreen {
 					{ {230, 221}, {442, 221}, {654, 221}, {866, 221}, {230, 429}, {442, 429}, {654, 429}, {866, 429} }   // 8개
 			};
 
+	private int mLightDeviceCount = 0;					    // 조명 있는 기기 개수합
+	private int [] mLightDeviceTable = null;				// 조명 기기인덱스로 하여 실제 기기인덱스를 구할 수 잇는 테이블
+
 	// [API]
 	private MultiSwitchAPI mMultiSwitchAPI = null;     // 대외향 - 멀티스위치 조명제어기 API
 
@@ -175,6 +178,19 @@ public class LightEtcEachPopupRoomScreen extends WpadScreen {
 				for (int i = 0; i < mRoomNameList.length; i++) Log.d(TAG, "mRoomNameList[" + i + "] " + mRoomNameList[i]);
 			}
 
+			// 조명이 있는 기기 개수합 (새로 추가됨)
+			int LightDeviceCount = intent.getIntExtra("CONDEVICE_COUNT", -1);
+			if (LightDeviceCount > 0) {
+				mLightDeviceCount = LightDeviceCount;
+			}
+			Log.d(TAG, "mLightDeviceCount = " + mLightDeviceCount);
+
+			// 콘센트 기기인덱스로 하여 실제 기기인덱스를 구할 수 잇는 테이블
+			mLightDeviceTable = intent.getIntArrayExtra("CONDEVICE_TABLE");
+			if (mLightDeviceTable == null) {
+				Log.w(TAG, "[Create] mLightDeviceTable is null !!!");
+			}
+
 			if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
 				try {
 					// DeviceCnt
@@ -251,13 +267,16 @@ public class LightEtcEachPopupRoomScreen extends WpadScreen {
 		ViewRegistration(layout, BTN_MANUAL, Common.PopupAlarmMarginLEFT(169), Common.PopupAlarmMarginTOP(120));
 		setInfoBtnVisible(getPopupManualUsage());
 
-		BTN_PAGE_DOWN = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.top_but_back, R.drawable.top_but_back_p, ID.lightEtcEachPopupRoom.button.ROOMSEL_LEFT);
-		ViewRegistration(layout, BTN_PAGE_DOWN, Common.PopupNomalMarginLEFT(358), Common.PopupNomalMarginTOP(67));
-		BTN_PAGE_DOWN.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+		if (mLightDeviceCount > 1) {
+			BTN_PAGE_DOWN = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.top_but_back, R.drawable.top_but_back_p, ID.lightEtcEachPopupRoom.button.ROOMSEL_LEFT);
+			ViewRegistration(layout, BTN_PAGE_DOWN, Common.PopupNomalMarginLEFT(358), Common.PopupNomalMarginTOP(67));
+			BTN_PAGE_DOWN.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
 
-		BTN_PAGE_UP = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.top_but_next, R.drawable.top_but_next_p, ID.lightEtcEachPopupRoom.button.ROOMSEL_RIGHT);
-		ViewRegistration(layout, BTN_PAGE_UP, Common.PopupNomalMarginLEFT(787), Common.PopupNomalMarginTOP(67));
-		BTN_PAGE_UP.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			BTN_PAGE_UP = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.top_but_next, R.drawable.top_but_next_p, ID.lightEtcEachPopupRoom.button.ROOMSEL_RIGHT);
+			ViewRegistration(layout, BTN_PAGE_UP, Common.PopupNomalMarginLEFT(787), Common.PopupNomalMarginTOP(67));
+			BTN_PAGE_UP.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+		}
 
 		registerBottomBTN();
 
@@ -387,6 +406,28 @@ public class LightEtcEachPopupRoomScreen extends WpadScreen {
 		}
 	}
 
+	private boolean Util_SetRoomLeftRightMove(boolean Right) {
+		// 1. 범위체크
+		if (mLightDeviceCount <= 1) return false;
+
+		// 2. move
+		for (int i = 0; i < mData.DeviceCnt; i++) {
+			if (!Right) {
+				// Left
+				mCurrentRoomIdx--;
+				if (mCurrentRoomIdx < 0) mCurrentRoomIdx = mData.DeviceCnt-1;
+			}
+			else {
+				// Right
+				mCurrentRoomIdx++;
+				if (mCurrentRoomIdx >= mData.DeviceCnt) mCurrentRoomIdx = 0;
+			}
+			if (mData.Device[mCurrentRoomIdx].info.Support.hOutletCnt > 0) return true;
+		}
+
+		return false;
+	}
+
 
 	// =================================================================================================
 	// [[ Touch & Key Event ]] region
@@ -412,25 +453,35 @@ public class LightEtcEachPopupRoomScreen extends WpadScreen {
 			}
 			else if (TargetId == ID.lightEtcEachPopupRoom.button.ROOMSEL_LEFT) {
 				DebugLogOutput("onTouchEvent [ROOMSEL_LEFT] BUTTON !!!");
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-
-				mCurrentRoomIdx--;
-				if (mCurrentRoomIdx < 0) mCurrentRoomIdx = mData.DeviceCnt-1;
+				if (Util_SetRoomLeftRightMove(false)) {
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					mCurrentRoomIdx--;
+					if (mCurrentRoomIdx < 0) mCurrentRoomIdx = mData.DeviceCnt-1;
+					updateRoomTitle(mCurrentRoomIdx);
+					drawLightBTN();
+					updateScreen();
+				}
+				else
+				{
+					Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
 
-				updateRoomTitle(mCurrentRoomIdx);
-				drawLightBTN();
-				updateScreen();
 			}
 			else if (TargetId == ID.lightEtcEachPopupRoom.button.ROOMSEL_RIGHT) {
 				DebugLogOutput("onTouchEvent [ROOMSEL_RIGHT] BUTTON !!!");
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-
-				mCurrentRoomIdx++;
-				if (mCurrentRoomIdx >= mData.DeviceCnt) mCurrentRoomIdx = 0;
+				if (Util_SetRoomLeftRightMove(true)) {
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+					mCurrentRoomIdx++;
+					if (mCurrentRoomIdx >= mData.DeviceCnt) mCurrentRoomIdx = 0;
+					updateRoomTitle(mCurrentRoomIdx);
+					drawLightBTN();
+					updateScreen();
+				}
+				else
+				{
+					Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
 
-				updateRoomTitle(mCurrentRoomIdx);
-				drawLightBTN();
-				updateScreen();
 			}
 			else if ((TargetId >= ID.lightEtcEachPopupRoom.button.LIGHT_1) && (TargetId <= ID.lightEtcEachPopupRoom.button.LIGHT_8)) {
 				// 개별 조명 제어

+ 1296 - 1296
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightHdcLivMainScreen.java

@@ -1,1296 +1,1296 @@
-package kr.co.icontrols.wallpadhomectrl.screen.screen_light;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Color;
-import android.graphics.drawable.Drawable;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.WindowManager;
-import android.widget.ImageView;
-import android.widget.RelativeLayout;
-import android.widget.SeekBar;
-
-import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.WallPadDataMgr.WallpadStatusData;
-import com.artncore.commons.API_Menu;
-import com.artncore.commons.DataClasses;
-import com.artncore.commons.Sdb_DataClasses;
-import com.artncore.commons.Sdb_DataClasses.LEDLIGHT_USAGE_CODE;
-import com.artncore.commons.define;
-import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.artncore.wallpadapi.WallPadDevAPI;
-import com.util.LogUtil;
-
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
-import kr.co.icontrols.wallpadhomectrl.R;
-import kr.co.icontrols.wallpadhomectrl.declare.Common;
-import kr.co.icontrols.wallpadhomectrl.declare.ID;
-import kr.co.icontrols.wallpadhomectrl.declare.TransactionDisplay;
-import kr.co.icontrols.wallpadsupport.WpadImageView;
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-import kr.co.icontrols.wallpadsupport.WpadScale;
-import kr.co.icontrols.wallpadsupport.WpadScreen;
-import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-import kr.co.icontrols.wallpadsupport.WpadTextView;
-
-public class LightHdcLivMainScreen extends WpadScreen
-{
-    // [Define]
-    String TAG = this.getClass().getSimpleName();
-
-    private void DebugLogOutput(String s)
-    {
-        if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
-    }
-
-    /**
-     * 조명개수에 따른 좌표를 정의한다.
-     */
-    private int[][][] mPos = new int[][][]
-            {{{263, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                // 1개 - 거실등
-            {{144, 262}, {382, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},             // 2개 - 거실등 + (간접등 or 복도등)
-            {{48, 262}, {264, 262}, {479, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},          // 3개 - 거실등 + 간접등 + 복도등
-            {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                     // 4개 - X
-    };
-
-    private int[][][] mPos_easymode = new int[][][]
-            {{{266, 214}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                // 1개 - 거실등
-            {{113, 214}, {409, 214}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},             // 2개 - 거실등 + (간접등 or 복도등)
-            {{52, 110}, {448, 110}, {250, 419}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},          // 3개 - 거실등 + 간접등 + 복도등
-            {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                     // 4개 - X
-            };
-
-    /**
-     * 거실에너지미터 명칭정보
-     **/
-    //private String LightName[] = {"거실등", "복도등", "간접등"};
-
-    //     이미지 Array
-    private int[][] LightOnImageArray = new int[][]{{R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}, {R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}, {R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}};
-    private int[][] LightOffImageArray = new int[][]{{R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}, {R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}, {R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}};
-
-    private int[][] LightOnImageArray_easymode = new int[][]{{R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}, {R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}, {R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}};
-    private int[][] LightOffImageArray_easymode = new int[][]{{R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}, {R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}, {R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}};
-
-    // [View - ImageView(Background or Image - No touch)]
-    WpadImageView Background;
-    WpadImageView Bg_Seekbar;
-
-    // [View - ImageView(Button - touch)]
-    WpadImageView BtnDimmingLevel;
-    WpadImageView BtnColor;
-
-    // [View - TextView]
-    private WpadTextView Title;
-    private WpadTextView LimitMent_Dimm;
-
-    // [API]
-    private WallPadAPI mAPI = null;
-    private Sdb_LivingRoomLightAPI NewLivApi = null;           // 신규 거실 에너지미터 API
-    private TransactionDisplay transactionDisplay = null;
-
-    // [Value]
-    private int OPERATION_MODE = -1;
-    private Data mData = null;
-    private Data_NewLiv mData_NewLiv = null;
-    private LightView[] lightView = null;
-    private boolean NewLivingAPIUse = true;
-    private boolean NewLivLightLimit = false;
-    boolean livingEm_Kitchen_Use = false;
-
-    // [SeekBar Value]
-    SeekBar seekBar;
-    public static final int step = 1;
-    public static final int max = 10;
-    public static final int min = 1;
-    public int SeekBarValue = 1;
-
-    // [Class]
-    /**
-     * 에너지미터 데이터
-     **/
-    private class Data
-    {
-        DataClasses.EnergyMeterV2 LivingEM;
-        boolean ControlType; //false:밝기, true:색상
-
-        public Data()
-        {
-            ControlType = false;
-            LivingEM = new DataClasses.EnergyMeterV2();
-        }
-    }
-
-    // [Class]
-    /**
-     * 에너지미터 데이터
-     **/
-    private class Data_NewLiv
-    {
-        Sdb_DataClasses.LivingEnergyMeterClass NewLivingEM;
-        boolean ControlType; //false:밝기, true:색상
-
-        public Data_NewLiv()
-        {
-            ControlType = false;
-            NewLivingEM = new Sdb_DataClasses.LivingEnergyMeterClass();
-        }
-    }
-
-    /**
-     * 개별 조명 class
-     **/
-    private class LightView
-    {
-        public WpadTextView Name;         // 조명등 이름
-        public WpadImageView OnOffBtn;    // OnOff 버튼
-
-        private LightView(int left, int top, int index, String name)
-        {
-            if (bEasyModeUse) {
-                Name = new WpadTextView(getContext(), false, 270, 60, Gravity.CENTER, Color.WHITE, Common.fontsize._44, false, ID.LightHdcLivMainScreenID.text.ONOFF_1 + index);
-                ViewRegistration(getLayout(), Name, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                Name.setText(name);
-
-                OnOffBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 270, new int[]{LightOffImageArray_easymode[index][0], LightOffImageArray_easymode[index][1]}, new int[]{LightOnImageArray_easymode[index][0], LightOnImageArray_easymode[index][1]}, ID.LightHdcLivMainScreenID.button.ONOFF_1 + index);
-                ViewRegistration(getLayout(), OnOffBtn, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top + 85));
-                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            } else {
-                Name = new WpadTextView(getContext(), false, 208, 45, Gravity.CENTER, Color.WHITE, Common.fontsize._35, false, ID.LightHdcLivMainScreenID.text.ONOFF_1 + index);
-                ViewRegistration(getLayout(), Name, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
-                Name.setText(name);
-
-                OnOffBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 208, 208, new int[]{LightOffImageArray[index][0], LightOffImageArray[index][1]}, new int[]{LightOnImageArray[index][0], LightOnImageArray[index][1]}, ID.LightHdcLivMainScreenID.button.ONOFF_1 + index);
-                ViewRegistration(getLayout(), OnOffBtn, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top + 67));
-                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-            }
-        }
-    }
-
-    private boolean bEasyModeUse = false;
-
-    /**
-     * 생성자
-     **/
-    public LightHdcLivMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)
-    {
-        super(context, layout);
-        Log.d(TAG, "[START - Screen] --------------------------------------------");
-        ((MainActivity) getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
-
-        bEasyModeUse = ((MainActivity) context).GetEasyModeUXUse();
-        DebugLogOutput("[Create] - bEasyModeUse [" + bEasyModeUse + "]");
-
-        // 0. 화면 ID -> DB 저장
-        //if(this.getClass().getSimpleName().equals("LightHdcLivMainScreen"))
-        {
-            Log.d(TAG, "[Step 0] - true");
-            Log.d(TAG, "[Step 0] - Now name = " + this.getClass().getSimpleName());
-            Log.d(TAG, "[Step 0] - Now name Str = " + this.getClass().getSimpleName().toString());
-
-            WallpadStatusData wd = new WallpadStatusData( this.getContext());
-            Log.d(TAG, "[Step 0] - prev db val = " + wd.GetCurrentScreenIDValue());
-
-            wd.SetCurrentScreenIDValue(API_Menu.SubMenuCtrl.HDC_LivingLamp);
-            Log.d(TAG, "[Step 0] - now db val = " + wd.GetCurrentScreenIDValue());
-
-            wd.closeDB();
-        }
-        /*else
-        {
-            Log.d(TAG, "[Step 0] - false");
-            Log.d(TAG, "[Step 0] - Now name = " + this.getClass().getSimpleName());
-            Log.d(TAG, "[Step 0] - Now name Str = " + this.getClass().getSimpleName().toString());
-        }*/
-
-        WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
-        livingEm_Kitchen_Use = wpdds.Get_LivingEm_KitchenLight_Use();
-        wpdds.closeDB();
-
-        // 1. Data Create
-        DebugLogOutput("[Create] - Step1 : Data Create");
-        OPERATION_MODE = operationMode;
-        OPERATION_MODE = Common.MODE_NOMAL;
-
-        mData_NewLiv = new Data_NewLiv();
-
-        // 2. Device API Load & Update
-        DebugLogOutput("[Create] - Step2 : Device API Load & Update");
-        if (OPERATION_MODE == Common.MODE_NOMAL)
-        {
-            DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
-            mAPI = wpapi;
-            if(Device_ApiLoad_NewLiv(wpapi) >= 0) Device_Update_NewLiv();
-        }
-        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
-        {
-            DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
-            //int LightCount = DB_GetLightCount();
-            if(NewLivingAPIUse)
-            {
-                // 샘플 데이터 로드
-                // 신규 거실 에너지미터 데이터 로딩하기
-                LoadSampleData_NewLiv();
-            }
-            else
-            {
-                int LightCount = 2;
-                if (LightCount > 0) mData.LivingEM.device.SetLedCount((byte) LightCount);
-                else mData.LivingEM.device.SetLedCount((byte) 2);
-            }
-        }
-        else
-        {
-            DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
-            OPERATION_MODE = Common.MODE_NOMAL;
-        }
-
-        // 3. Image Create
-        Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.LightHdcLivMainScreenID.image.BACKGROUND);
-        ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
-
-        // 4. Button Create
-        DebugLogOutput("[Create] - Step4 : Button Create");
-
-        //밝기, 색상 버튼 등록
-        if (bEasyModeUse) {
-            BtnDimmingLevel = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 146, new int[]{R.drawable.btn_dimming_selected_easymode, R.drawable.btn_dimming_selected_easymode}, new int[]{R.drawable.btn_dimming_normal_easymode, R.drawable.btn_dimming_pressed_easymode}, ID.LightHdcLivMainScreenID.button.DIMMING);
-            ViewRegistration(getLayout(), BtnDimmingLevel, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(279));
-
-            BtnColor = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 146, new int[]{R.drawable.btn_color_normal_easymode, R.drawable.btn_color_pressed_easymode}, new int[]{R.drawable.btn_color_selected_easymode, R.drawable.btn_color_selected_easymode}, ID.LightHdcLivMainScreenID.button.COLOR);
-            ViewRegistration(getLayout(), BtnColor, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(425));
-        } else {
-            BtnDimmingLevel = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 230, 130, new int[]{R.drawable.btn_dimming_selected, R.drawable.btn_dimming_selected}, new int[]{R.drawable.btn_dimming_normal, R.drawable.btn_dimming_pressed}, ID.LightHdcLivMainScreenID.button.DIMMING);
-            ViewRegistration(getLayout(), BtnDimmingLevel, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(270));
-
-            BtnColor = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 230, 130, new int[]{R.drawable.btn_color_normal, R.drawable.btn_color_pressed}, new int[]{R.drawable.btn_color_selected, R.drawable.btn_color_selected}, ID.LightHdcLivMainScreenID.button.COLOR);
-            ViewRegistration(getLayout(), BtnColor, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(400));
-        }
-
-        LimitMent_Dimm = new WpadTextView(this.getContext(), true, 575, 50, Gravity.LEFT, Color.rgb(0xff,0x7d,0x00), Common.fontsize._30, true,  ID.LightHdcLivMainScreenID.text.LIMITMENT);
-        ViewRegistration(this.getLayout(), LimitMent_Dimm, Common.ImgPosion.GetX(350), Common.ImgPosion.GetY(157));
-        LimitMent_Dimm.setText("LED 컨버터 이상으로 밝기를 높일 수 없습니다.");
-        LimitMent_Dimm.setVisibility(View.INVISIBLE);
-
-        //SeekBar 등록
-        Registration_SeekBar();
-
-        // 5. Draw_Update
-        DebugLogOutput("[Create] - Step5 : Draw_Update");
-
-        // 6. 조명OFF인 경우에 최초 create시 버튼들 표시되었다가 바로 사라져서 증상이 안나오게 수정함
-        DebugLogOutput("[Create] - Step6 : Button INVISIBLE");
-        BtnDimmingLevel.setVisibility(View.INVISIBLE);
-        BtnColor.setVisibility(View.INVISIBLE);
-        Bg_Seekbar.setVisibility(View.INVISIBLE);
-        seekBar.setVisibility(View.INVISIBLE);
-
-        if (OPERATION_MODE == Common.MODE_NOMAL)
-        {
-            DebugLogOutput("mEM_DriverCheckHandler OK");
-            if (NewLivApi != null)
-            {
-                Device_BrRegistration(true);
-                Registration_Light_NewLiv();
-                Draw_Update_NewLiv();
-
-                if(MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) NewLivApi, (WpadScreen) this);
-            }
-        }
-        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
-        {
-            Registration_Light_NewLiv();
-            Draw_Update_NewLiv();
-        }
-        Log.d(TAG, "[END - Screen] --------------------------------------------");
-    }
-
-    // =================================================================================================
-    // [[ BroadcastReceiver ]] region
-    // =================================================================================================
-
-    /**
-     * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
-     */
-    @Override
-    protected void onBrReceive(Intent intent)
-    {
-        super.onBrReceive(intent);
-
-        String ActionName = intent.getAction();
-
-        DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
-
-        if (ActionName.equals(ID.LightHdcLivMainScreenID.BR_LIGHT))
-        {
-            DebugLogOutput("onBrReceive - BR_LIGHT");
-            Device_Update_NewLiv();
-            Draw_Update_NewLiv();
-        }
-        else if (ActionName.equals(define.NOTIFY_DAIL))
-        {
-            DebugLogOutput("onBrReceive - NOTIFY_DAIL");
-            byte OnOff = intent.getByteExtra("ONOFF", (byte)0xEE);
-            byte Dial = intent.getByteExtra("DIAL", (byte)0xEE);
-            byte Level = intent.getByteExtra("LEVEL", (byte)0xEE);
-            byte Color = intent.getByteExtra("COLOR", (byte)0xEE);
-            byte Control = intent.getByteExtra("CONTROL", (byte)0xEE);
-
-
-            DebugLogOutput("onBrReceive - OnOff   : " + OnOff);
-            DebugLogOutput("onBrReceive - Dial    : " + Dial);
-            DebugLogOutput("onBrReceive - Level   : " + Level);
-            DebugLogOutput("onBrReceive - Color   : " + Color);
-            DebugLogOutput("onBrReceive - Control : " + Control);
-
-            setFinishTimerReset();
-
-            boolean LightOnOff =  GetmData_LightOnOff_NewLiv();
-            DebugLogOutput("LightOnOff : " + LightOnOff);
-            if(LightOnOff == false)
-            {
-                if(OnOff == 1) //켜짐이면
-                {
-                    if(Dial == 0)//조작 없음 이면
-                    {
-                        //Sound().Play(SND.effect.TOUCH_LATCHED);
-                        if (mData_NewLiv.ControlType == true)  //기존에 색온도 조절 중으로 밝기 조절로 변경
-                        {
-                            BtnDimmingLevel.setButtonFrontImage();
-                            BtnColor.setButtonFrontImage();
-                            Bg_Seekbar.setButtonFrontImage();
-                            mData_NewLiv.ControlType = false;
-                        }
-
-                        if ((SeekBarValue) != (Level))
-                        {
-                            SetSeekBarProgress(Level);
-                        }
-                    }
-                    else if(Dial == 2)//OFF 상태에서 조그버튼 길게 눌러 바로 색온도 조절 시
-                    {
-                        OnOff = 1;
-
-                        if(Control == 1)
-                        {
-                            NewLivApi.SetControlMode(true); // 조그 버튼 색변경(빨강)
-                        }
-                    }
-                }
-                else
-                {
-                    if(Dial == 2)
-                    {
-
-                    }
-                }
-            }
-
-            if(OnOff == 1) //켜짐이면
-            {
-                if (mData_NewLiv.ControlType == true)  //기존에 색온도 조절 중
-                {
-                    if(Dial == 1) //디밍 조절중
-                    {
-                        //Sound().Play(SND.effect.TOUCH_LATCHED);
-                        BtnDimmingLevel.setButtonFrontImage();
-                        BtnColor.setButtonFrontImage();
-                        Bg_Seekbar.setButtonFrontImage();
-                        mData_NewLiv.ControlType = false;
-                    }
-                    else if(Dial == 2) // 색온도 조절중
-                    {
-                    }
-                }
-                else //기존에 밝기 조절 중
-                {
-                    if(Dial == 2) //색온도 조절 중
-                    {
-                        //Sound().Play(SND.effect.TOUCH_LATCHED);
-                        BtnDimmingLevel.setButtonRearImage();
-                        BtnColor.setButtonRearImage();
-                        Bg_Seekbar.setButtonRearImage();
-                        mData_NewLiv.ControlType = true;
-
-                        if(Control == 1)
-                        {
-                            NewLivApi.SetControlMode(true); // 조그 버튼 색변경(빨강)
-                        }
-                    }
-
-                }
-
-                if(Dial == 1) //디밍 조절중
-                {
-                    SetSeekBarProgress(Level);
-                }
-                else if(Dial == 2) //색온도 조절 중
-                {
-                    SetSeekBarProgress(Color);
-                }
-            }
-            else //꺼짐
-            {
-                if(Dial == 0) //조작 없음
-                {
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-                else if(Dial == 2)
-                {
-
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void onClose()
-    {
-        super.onClose();
-        ((MainActivity) getContext()).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
-
-        // 등록된 BR 을 해제 한다.
-        if(OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE)
-        {
-            NewLivApi.SetControlMode(false);
-        }
-
-        if (NewLivApi != null)
-        {
-            Device_BrRegistration(false);
-            if(MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
-        }
-
-        WallpadStatusData wd = new WallpadStatusData( this.getContext());
-        Log.d(TAG, "close db val = " + wd.GetCurrentScreenIDValue());
-
-        wd.SetCurrentScreenIDValue(0);
-        Log.d(TAG, "change close db val = " + wd.GetCurrentScreenIDValue());
-
-        wd.closeDB();
-    }
-
-    @Override
-    public void Close()
-    {
-        super.Close();
-    }
-
-    @Override
-    protected void onTouchEvent(View v, MotionEvent event) {
-        super.onTouchEvent(v, event);
-
-        int TargetId = v.getId();
-        int MoveEvent = event.getAction();
-
-        if (MoveEvent == MotionEvent.ACTION_DOWN) {
-
-        }
-        else if (MoveEvent == MotionEvent.ACTION_UP) {
-            if (TargetId == ID.LightHdcLivMainScreenID.button.DIMMING) {
-                DebugLogOutput("onTouchEvent [DIMMING] BUTTON !!!, " + mData_NewLiv.ControlType);
-                if (mData_NewLiv.ControlType == true) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    BtnDimmingLevel.setButtonFrontImage();
-                    BtnColor.setButtonFrontImage();
-                    Bg_Seekbar.setButtonFrontImage();
-                    mData_NewLiv.ControlType = false;
-
-                    if (mData_NewLiv.NewLivingEM.Data.LedLight != null) {
-                        if (mData_NewLiv.NewLivingEM.Data.LedLight[0] != null) {
-                            DebugLogOutput("onTouchEvent [DIMMING] BUTTON mData.LivingEM.device.ledController[0].device.Level: " +  mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming );
-                            SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming );
-                        }
-                    }
-                    if (OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE) {
-                        NewLivApi.SetControlMode(false);
-                    }
-                }
-            }
-            else if (TargetId == ID.LightHdcLivMainScreenID.button.COLOR) {
-                DebugLogOutput("onTouchEvent [COLOR] BUTTON !!!, " + mData_NewLiv.ControlType);
-                if (mData_NewLiv.ControlType == false) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    BtnDimmingLevel.setButtonRearImage();
-                    BtnColor.setButtonRearImage();
-                    Bg_Seekbar.setButtonRearImage();
-                    mData_NewLiv.ControlType = true;
-
-                    if (mData_NewLiv.NewLivingEM.Data.LedLight != null) {
-                        if (mData_NewLiv.NewLivingEM.Data.LedLight[0] != null) {
-                            DebugLogOutput("onTouchEvent [DIMMING] BUTTON mData.LivingEM.device.ledController[0].device.Level: " +  mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
-                            SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
-                        }
-                    }
-
-                    if (OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE) {
-                        NewLivApi.SetControlMode(true);
-                    }
-                }
-            }
-            else if ((TargetId >= ID.LightHdcLivMainScreenID.button.ONOFF_1) && (TargetId <= ID.LightHdcLivMainScreenID.button.ONOFF_8)) {
-                // 개별 조명 제어
-                int index = TargetId - ID.LightHdcLivMainScreenID.button.ONOFF_1;
-                DebugLogOutput("onTouchEvent [LIGHT_" + (index + 1) + "] BUTTON !!!");
-//                Log.e(TAG, "[onTouchEvent] Group_Hallway = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Hallway);
-//                Log.e(TAG, "[onTouchEvent] Group_Indirect = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Indirect);
-//                Log.e(TAG, "[onTouchEvent] Exist_Hallway = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway);
-//                Log.e(TAG, "[onTouchEvent] Exist_Indirect = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect);
-//                Log.e(TAG, "[onTouchEvent] bHallwayLight2GroupSet = " + mData_NewLiv.NewLivingEM.Info.bHallwayLight2GroupSet);
-//                Log.e(TAG, "[onTouchEvent] bHallwayLight2GroupSupport = " + mData_NewLiv.NewLivingEM.Info.bHallwayLight2GroupSupport);
-
-                boolean OnOff = false;
-                if (mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff == true) {
-                    OnOff = true;
-                }
-
-                if (OnOff) OnOff = false;
-                else OnOff = true;
-
-                if (OPERATION_MODE == Common.MODE_NOMAL) {
-                    /** 조명 개별제어 시작 **/
-                    int ret = NewLivApi.SetLightOnOff((byte) index, OnOff);
-                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-
-                    /** 조명 개별제어 끝**/
-                }
-                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                    if (OnOff) {
-                        mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff = true;
-                    }
-                    else {
-                        mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff = false;
-                    }
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-
-                /////////////////////////////////////////////
-                Draw_Update_NewLiv();
-            }
-        }
-    }
-
-    /**
-     * Seekbar 터치 시 동작 처리
-     * **/
-    SeekBar.OnSeekBarChangeListener mOnSeekBarChangeListener = new SeekBar.OnSeekBarChangeListener() {
-        @Override
-        public void onStopTrackingTouch(SeekBar seekBar) {
-            try {
-                if (seekBar.getId() == ID.LightHdcLivMainScreenID.button.SeekBar) {
-                    Log.i(TAG, "[onStopTrackingTouch] SeekBarValue [" + SeekBarValue + "]");
-                    setFinishTimerReset();
-
-                    if (OPERATION_MODE == Common.MODE_NOMAL) {
-                        /**
-                         * 디밍, 색온도 제어 시작
-                         * **/
-                        if (mData_NewLiv.NewLivingEM.Data.LedLight == null) {
-                            Log.e(TAG, "[onStopTrackingTouch] mData_NewLiv.NewLivingEM.Data.LedLight == null");
-                            return;
-                        }
-
-                        //for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount ; i++)
-                        Log.i(TAG, "[onStopTrackingTouch] - seekbarval2 = " + SeekBarValue);{
-                            if (mData_NewLiv.ControlType == false) {
-                                if (NewLivLightLimit) {
-                                    // 조명 밝기 제한 중 (SMPS 1개 고장)
-                                    if (SeekBarValue > 3) {
-										Log.i(TAG, "[onStopTrackingTouch] - Do Limit 1 ########################");
-                                        SeekBarValue = 3;
-                                    }
-                                    else {
-									    // 이미 3인 경우에 소리 나는 것을 방지
-                                        if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)) {
-                                            Log.i(TAG, "[onStopTrackingTouch] - Set Dimming 1 ########################");
-                                            int ret = NewLivApi.SetLightDimming(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
-                                            if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                                            else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                                        }
-									}
-                                }
-                                else {
-                                    Log.i(TAG, "[onStopTrackingTouch] - Set Dimming 2 ########################");
-									int ret = NewLivApi.SetLightDimming(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
-									if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-									else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-								}
-                            }
-                            else {
-                                int ret = NewLivApi.SetLightColor(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
-                                if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-                                else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-                            }
-                        }
-                        /**
-                         * 디밍, 색온도 제어 끝
-                         * **/
-                    }
-                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
-                            if (mData_NewLiv.ControlType == false) {
-                                mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.Dimming = (byte) (SeekBarValue);
-                            }
-                            else {
-                                mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.Color = (byte) (SeekBarValue);
-                            }
-                        }
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                    }
-                }
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-            }
-            catch (Exception e) {
-                Log.e(TAG, "[Exception] mOnSeekBarChangeListener.onStopTrackingTouch");
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-            }
-        }
-
-        @Override
-        public void onStartTrackingTouch(SeekBar seekBar) {
-
-        }
-
-        @Override
-        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
-            if (seekBar.getId() == ID.LightHdcLivMainScreenID.button.SeekBar) {
-                if (mData_NewLiv.ControlType == false) {
-                    if (NewLivLightLimit) {
-                        // 조명 밝기 제한 중 (SMPS 1개 고장)
-						SeekBarValue = min + (progress * step);
-                        if (SeekBarValue > 3) {
-                            // 조명 제한 중, 30% 이상의 값을 요청하는 경우 : 3 유지
-                            Log.i(TAG, "[onProgressChanged] - Do Limit 2 ########################");
-                            SeekBarValue = 3;
-                            SetSeekBarProgress(3);
-                        }
-                    }
-                    else {
-                        SeekBarValue = min + (progress * step);
-                    }
-                }
-                else {
-                    SeekBarValue = min + (progress * step);
-                }
-            }
-        }
-    };
-
-    //[Function]
-
-    // =================================================================================================
-    // [[ Device ]] region
-    // =================================================================================================
-
-    /**
-     * 디바이스 API 를 Load 한다.
-     *
-     * @param wpapi - 생성시 전달받은 WallPadAPI
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int Device_ApiLoad_NewLiv(WallPadAPI wpapi) {
-        // 1. Mode Check
-        if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
-
-        DebugLogOutput("[Device_ApiLoad_NewLiv] - Start");
-
-        // 2. wpapi Check
-        if (wpapi == null) {
-            Log.e(TAG, "[Device_ApiLoad_NewLiv] - wpapi is null");
-            return -2;
-        }
-
-        //////////////////////////////////////////////////////////////////////////////
-        // Light
-        //////////////////////////////////////////////////////////////////////////////
-
-        // 3. Load API (Get_Sdb_LivingRoomLightAPI)
-        DebugLogOutput("[Device_ApiLoad_NewLiv] - Step1 : Light API Load...");
-        try {
-            NewLivApi = wpapi.Get_Sdb_LivingRoomLightAPI();
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Device_ApiLoad_NewLiv] - [Exception Error] wpapi.Get_Sdb_LivingRoomLightAPI");
-            Log.e(TAG, "[Device_ApiLoad_NewLiv] - " + e.toString());
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-
-        if (NewLivApi == null) {
-            Log.e(TAG, "[Device_ApiLoad_NewLiv] - NewLivApi is null");
-            return -4;
-        }
-
-        DebugLogOutput("[Device_ApiLoad_NewLiv] - OK");
-
-        return 0;
-    }
-
-    /**
-     * 디바이스에 알림 BR 을 등록한다. (거실 에너지미터)
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int Device_BrRegistration(boolean OnOff) {
-        DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
-
-        String BR_NAME = ID.LightHdcLivMainScreenID.BR_LIGHT;
-
-        // 1. Api Load Check
-        if (NewLivApi == null) {
-            Log.e(TAG, "[Device_BrRegistration] - NewLivApi unload !!!");
-            return -1;
-        }
-
-        if (OnOff) {
-            try {
-                DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
-                NewLivApi.regChangedBR(BR_NAME);
-                DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-                return -101;
-            }
-            catch (Exception e) {
-                Log.e(TAG, "[Device_BrRegistration] - [Exception Error] NewLivApi.regChangedBR");
-                Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-                return -101;
-            }
-            super.addBrActionFilter(BR_NAME);
-
-            super.addBrActionFilter(define.NOTIFY_DAIL);
-        }
-        else {
-            try {
-                DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
-                NewLivApi.unregChangedBR(BR_NAME);
-                DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
-            } catch (RuntimeException re) {
-                LogUtil.errorLogInfo("", TAG, re);
-                return -102;
-            }
-            catch (Exception e) {
-                Log.e(TAG, "[Device_BrRegistration] - [Exception Error] NewLivApi.unregChangedBR");
-                Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
-                //e.printStackTrace();
-                LogUtil.errorLogInfo("", TAG, e);
-                return -102;
-            }
-            super.removeBrActionFilter(BR_NAME);
-            super.removeBrActionFilter(define.NOTIFY_DAIL);
-        }
-        return 0;
-    }
-
-    /**
-     * 제어기기의 상태를 갱신한다.
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int Device_Update_NewLiv() {
-        DebugLogOutput("[Device_Update_NewLiv] - Start");
-
-        // 1. Api Load Check
-        if (NewLivApi == null) {
-            Log.e(TAG, "[Device_Update_NewLiv] EMApi unload !!!");
-            return -1;
-        }
-
-        // 2. Refresh
-        try {
-            int ret = NewLivApi.Refresh();
-            if (ret < 0) {
-                Log.e(TAG, "[Device_Update_NewLiv] Refresh ret (" + ret + ")   ErrorCode = " + NewLivApi.ErrorCode.ErrStr());
-                return -2;
-            }
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[Device_Update_NewLiv] - [Exception Error] lightApi.Refresh( )");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-
-        // 3. Data Copy
-        mData_NewLiv.NewLivingEM = NewLivApi.data;
-        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
-            Log.i(TAG, mData_NewLiv.NewLivingEM.Data.ToString());
-        }
-
-        NewLivLightLimit = mData_NewLiv.NewLivingEM.Data.LightLimitControl;
-        Log.i(TAG, "NewLivLightLimit = " + NewLivLightLimit);
-
-        // 4. Debug Msg
-        DebugLogOutput("[Device_Update_NewLiv] - OK");
-        return 0;
-    }
-
-    // =================================================================================================
-    // [[ Draw ]] region
-    // =================================================================================================
-
-    /**
-     * 변경되는 이미지를 다시 그린다.
-     */
-    private void Draw_Update_NewLiv() {
-        if (mData_NewLiv == null) return;
-        if (mData_NewLiv.NewLivingEM.Info.Install == false) return;
-        if (mData_NewLiv.NewLivingEM.Info.LightGroup == null) return;
-
-        DebugLogOutput("[Draw_Update_NewLiv] Start !!!");
-        //if (mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway == false)
-        //if (mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect == false)
-
-        if (NewLivLightLimit) {
-            LimitMent_Dimm.setVisibility(View.VISIBLE);
-        }
-        else {
-            LimitMent_Dimm.setVisibility(View.INVISIBLE);
-        }
-
-        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
-            if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
-                //Log.i(TAG, "i = " + i + " OnOff = " + );
-
-                if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
-                    Draw_LightStatusChange(i + 1, true);
-                }
-                else {
-                    Draw_LightStatusChange(i + 1, false);
-                }
-            }
-        }
-
-        if (mData_NewLiv.ControlType == false) {
-            if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)) {
-                Log.i(TAG, "(int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)  : " + (int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming);
-
-                if (NewLivLightLimit) {
-                    // 조명 밝기 제한 중 (SMPS 1개 고장)
-                    if (((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming) > 3) {
-                        Log.i(TAG, "[Draw_Update_NewLiv] - Do Limit 3 ########################");
-                        SetSeekBarProgress( 3);
-                    }
-                    else {
-                        Log.i(TAG, "[Draw_Update_NewLiv] - SetSeekBarProgress 1");
-                        SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming  );
-                    }
-                }
-                else {
-                    Log.i(TAG, "[Draw_Update_NewLiv] - SetSeekBarProgress 2");
-                    SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming  );
-                }
-            }
-        }
-        else {
-            if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color)) {
-                SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
-            }
-        }
-
-        //거실등 ON/OFF 상태에 따른 바, 디밍/색온도 박스 표시
-        if (mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.OnOff == true && !livingEm_Kitchen_Use) {
-            BtnDimmingLevel.setVisibility(View.VISIBLE);
-            BtnColor.setVisibility(View.VISIBLE);
-            Bg_Seekbar.setVisibility(View.VISIBLE);
-            seekBar.setVisibility(View.VISIBLE);
-        }
-        else {
-            boolean tempLightStatus = false; //true면 간접등 또는 복도등 하나라도 켜짐
-            for (int i = 1; i <  mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
-				if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
-					if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
-						tempLightStatus = true;
-					}
-				}
-            }
-
-            if (tempLightStatus) {
-                if (mData_NewLiv.ControlType == true) {
-                    // 기존에 색온도(디밍) 조절 중에서 밝기 조절로 변경
-                    BtnDimmingLevel.setButtonFrontImage();
-                    BtnColor.setButtonFrontImage();
-                    Bg_Seekbar.setButtonFrontImage();
-                    mData_NewLiv.ControlType = false;
-                    SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming);
-                }
-                BtnDimmingLevel.setVisibility(View.INVISIBLE);
-                BtnColor.setVisibility(View.INVISIBLE);
-                Bg_Seekbar.setVisibility(View.VISIBLE);
-                seekBar.setVisibility(View.VISIBLE);
-            }
-            else {
-                BtnDimmingLevel.setVisibility(View.INVISIBLE);
-                BtnColor.setVisibility(View.INVISIBLE);
-                Bg_Seekbar.setVisibility(View.INVISIBLE);
-                seekBar.setVisibility(View.INVISIBLE);
-            }
-        }
-    }
-
-    /**
-     * 각 조명그림을 ON, OFF 이미지 변환한다.
-     *
-     * @param LightNumber - 변경할 조명 번호 (1~8 각조명 [조명개수를 초과할 경우 변경되지않는다])
-     * @param OnOff       - true : ON / false : OFF
-     */
-    private void Draw_LightStatusChange(int LightNumber, boolean OnOff) {
-        if (LightNumber < 0) return;
-        if (lightView == null) return;
-        if (LightNumber > lightView.length) return;
-
-        int index = LightNumber - 1;
-        if (lightView[index] == null) return;
-
-        DebugLogOutput("[Draw_LightStatusChange] - LightNumber : " + LightNumber + " / OnOff : " + OnOff );
-        if (OnOff) {
-            lightView[index].OnOffBtn.setButtonRearImage();
-        }
-        else {
-            lightView[index].OnOffBtn.setButtonFrontImage();
-        }
-    }
-    // =================================================================================================
-    // [[ Function ]] 조명 상태 관련
-    // =================================================================================================
-
-    /**
-     * 조명 ON OFF 상태 반환
-     * @param EM2 상태를 확인할 DataClasses.EnergyMeterV2 class
-     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
-     * **/
-    public boolean GetmData_LightOnOff(DataClasses.EnergyMeterV2 EM2) {
-        boolean LightOnOff = false;
-        if (EM2 == null) return false;
-
-        for (int i  = 0; i<EM2.device.ledController.length; i++) {
-            if (EM2.device.ledController[i].device.OnOff == DataClasses.LedController.POWER.On) {
-                LightOnOff = true;
-            }
-        }
-        return LightOnOff;
-    }
-
-    /**
-     * 조명 ON OFF 상태 반환
-     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
-     * **/
-    public boolean GetmData_LightOnOff() {
-        boolean LightOnOff = false;
-        if (mData.LivingEM.device.ledController == null) return false;
-
-        for(int i  = 0; i<mData.LivingEM.device.ledController.length; i++) {
-            if (mData.LivingEM.device.ledController[i].device.OnOff == DataClasses.LedController.POWER.On) {
-                LightOnOff = true;
-            }
-        }
-        return LightOnOff;
-    }
-
-    /**
-     * 조명 ON OFF 상태 반환
-     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
-     * **/
-    public boolean GetmData_LightOnOff_NewLiv() {
-        boolean LightOnOff = false;
-        if (mData_NewLiv.NewLivingEM.Data.LedLight == null) return false;
-
-        for (int i  = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount ; i++) {
-            if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
-                LightOnOff = true;
-            }
-        }
-        return LightOnOff;
-    }
-
-
-    // =================================================================================================
-    // [[ Light UI 등록 ]] region
-    // =================================================================================================
-
-    /**
-     * 조명 UI를 등록한다.
-     **/
-    private void Registration_Light_NewLiv() {
-        DebugLogOutput("[Registration_Light_NewLiv] - Start !!!");
-        if (mData_NewLiv.NewLivingEM.Info.Install == false) {
-            Log.w(TAG, "[Registration_Light_NewLiv] mData_NewLiv.NewLivingEM.Info.Install == false");
-            return;
-        }
-
-        if (lightView != null) {
-            Log.w(TAG, "[Registration_Light_NewLiv] lightView != null");
-            return;
-        }
-
-        // Install 여부에 따라서 조명 그룹을 그리도록 한다.
-        // 거실조명, 조명그룹설정 모두 이를 따라야 함
-
-        int LightCount = mData_NewLiv.NewLivingEM.Info.LightCount;
-        if ((LightCount >= 1) && (LightCount <= 3)) {
-            Log.d(TAG, "[Registration_Light_NewLiv] lightView = new");
-            lightView = new LightView[LightCount];
-
-            int installCount = 0;
-            for (int i = 0; i < LightCount; i++) {
-                if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
-                    installCount++;
-                }
-            }
-            Log.d(TAG, "installCount = " + installCount);
-
-            int posIndex = LightCount - 1;
-            if (installCount < LightCount) {
-                posIndex = installCount - 1;
-                Log.d(TAG, "installCount < LightCount --> change posIndex : " + posIndex);
-            }
-
-            int createLight = 0;
-            for (int i = 0; i < LightCount; i++) {
-                try {
-                    if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
-                        int left, top;
-                        if (bEasyModeUse) {
-                            left = (mPos_easymode[posIndex][createLight][0]);
-                            top = (mPos_easymode[posIndex][createLight][1]);
-                        }
-                        else {
-                            left = (mPos[posIndex][createLight][0]);
-                            top = (mPos[posIndex][createLight][1]);
-                        }
-
-                        byte using = mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Code.Usage;
-                        String name = "";
-
-                        if (using == LEDLIGHT_USAGE_CODE.LIVINGROOM) {
-                            name = "거실등";
-
-                            if (livingEm_Kitchen_Use) {
-                                name = "주방등";   // 명칭 덮어쓰기
-                                left += 310;       // 우측으로 조명버튼 이동
-                            }
-                        }
-                        else if (using == LEDLIGHT_USAGE_CODE.HALLWAY) {
-                            name = "복도등";
-                        }
-                        else if (using == LEDLIGHT_USAGE_CODE.INDIRECT) {
-                            name = "간접등";
-                        }
-                        else if (using == LEDLIGHT_USAGE_CODE.KITCHEN) {
-                            name = "주방등";
-                        }
-                        else {
-                            name = "거실등";
-                        }
-                        Log.d(TAG, "[Registration_Light_NewLiv] - name[" + i + "] = " + name);
-                        lightView[createLight] = new LightView(left, top, createLight, name);
-                        createLight++;
-                    }
-                } catch (RuntimeException re) {
-                    LogUtil.errorLogInfo("", TAG, re);
-                    lightView[i] = null;
-                }
-		        catch (Exception e) {
-                    Log.e(TAG, "[Exception Error] - [Create] LightView new");
-                    //e.printStackTrace();
-                    LogUtil.errorLogInfo("", TAG, e);
-                    lightView[i] = null;
-                }
-            }
-        }
-        else {
-            Log.e(TAG, "LightCount  Out of range!!! (" + LightCount + ")");
-        }
-    }
-
-    /**
-     * 조명 UI를 삭제한다.
-     **/
-    private void Remove_Light() {
-        if (mData.LivingEM.device.ledController == null) {
-            Log.e(TAG, "mData.LivingEM.device.ledController == null");
-            return;
-        }
-
-        if (lightView != null) {
-            int LightCount = mData.LivingEM.device.ledController.length;
-            for (int i = 0; i < LightCount; i++) {
-                try {
-                    getLayout().removeView(lightView[i].OnOffBtn);
-                } catch (RuntimeException re) {
-                    LogUtil.errorLogInfo("", TAG, re);
-                }
-                catch (Exception e) {
-                    Log.e(TAG, "[Exception Error] - [Remove] LightView Remove");
-                    //e.printStackTrace();
-                    LogUtil.errorLogInfo("", TAG, e);
-                }
-            }
-        }
-    }
-    // =================================================================================================
-    // [[ SeekBar 등록 ]] region
-    // =================================================================================================
-    private void Registration_SeekBar() {
-        //SeekBar 배경 등록
-        Bg_Seekbar = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 34, 484, new int[]{R.drawable.bar_dimming, R.drawable.bar_dimming}, new int[]{R.drawable.bar_color, R.drawable.bar_color}, ID.LightHdcLivMainScreenID.image.BG_SEEKBAR);
-        ViewRegistration(getLayout(), Bg_Seekbar, Common.ImgPosion.GetX(1108+7), Common.ImgPosion.GetY(158));
-
-        //SeekBar 등록
-        seekBar = new SeekBar(getContext());
-        seekBar.setId(ID.LightHdcLivMainScreenID.button.SeekBar);
-
-        Bitmap size = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.bar_cir);
-        size = Bitmap.createScaledBitmap(size, WpadScale.getWidth(size.getWidth()), WpadScale.getWidth(size.getHeight()), true);
-
-        ImageView imageView = new ImageView(getContext());
-        imageView.setImageBitmap(size);
-        seekBar.setThumb(imageView.getDrawable());
-
-        Drawable mDrawable = getContext().getResources().getDrawable(R.drawable.transparent_background);
-        seekBar.setProgressDrawable(mDrawable);
-        seekBar.setProgress(0);
-        //seekBar.setBackgroundColor(Color.RED);
-
-        RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(WpadScale.getWidth(484 - WpadScale.getWidth(size.getWidth()) / 2), WpadScale.getHeight(80));
-        seekBar.setLayoutParams(Params);
-        seekBar.setPadding(WpadScale.getWidth(size.getWidth()) / 2, 0, WpadScale.getWidth(size.getHeight()) / 2, 0);
-        seekBar.setMax((max - min) / step);
-
-        seekBar.setRotation(270);
-        seekBar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);
-
-        seekBar.setTranslationX(WpadScale.getWidth(900));
-        seekBar.setTranslationY(WpadScale.getHeight(253));
-
-        getLayout().addView(seekBar);
-    }
-
-
-    /**
-     * SeekBar의 게이지를 설정할때 사용한다.
-     * @param value 설정할 값
-     * **/
-    public void SetSeekBarProgress(int value) {
-        Log.d(TAG, "[SetSeekBarProgress] - value = " + value);
-
-        if (value - min < 0) {
-            Log.d(TAG, "[SetSeekBarProgress] - 000 value < min :" + value + " < " + min);
-            seekBar.setProgress(0);
-        }
-        else {
-            Log.d(TAG, "[SetSeekBarProgress] - !!! value >= min :" + value + " > " + min);
-            seekBar.setProgress(value - min);
-        }
-    }
-
-    // =================================================================================================
-    // [[ DB ]] region
-    // =================================================================================================
-
-    /**
-     * DB 에 저장되어있는 조명 회로 개수를 얻어온다.
-     *
-     * @return (int) - >=0 : 성공, <0 : 실패
-     */
-    private int DB_GetLightCount() {
-        try {
-            WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(getContext());
-            int[] Get_Light_info = wallpadDeviceSet.Get_Light_info();
-            wallpadDeviceSet.closeDB();
-            if (Get_Light_info == null) {
-                Log.w(TAG, "[DB_GetLightCount] Get_Light_info return value is null !!!");
-                return -1;
-            }
-
-            if (Get_Light_info.length < 3) {
-                Log.w(TAG, "[DB_GetLightCount] Get_Light_info return Length 3 under !!! (len:" + Get_Light_info.length + ")");
-                return -2;
-            }
-            int LightCount = Get_Light_info[2];
-
-            return LightCount;
-        } catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-            return -100;
-        }
-		catch (Exception e) {
-            Log.e(TAG, "[DB_GetLightCount] Exception Error");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return -100;
-        }
-    }
-
-    // =================================================================================================
-    // [[ Sample ]] region
-    // =================================================================================================
-    public void LoadSampleData_NewLiv() {
-        mData_NewLiv.NewLivingEM.Info.Install = true;
-        mData_NewLiv.NewLivingEM.Info.LightCount = 3;
-        mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect = true;
-        mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway = true;
-        mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Hallway = true;
-        mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Indirect = true;
-
-        mData_NewLiv.NewLivingEM.Data.setLedLight(mData_NewLiv.NewLivingEM.Info.LightCount);
-        mData_NewLiv.NewLivingEM.Data.LightElecNow = 100;
-        mData_NewLiv.NewLivingEM.Data.LightElecAcc = 200;
-
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Install = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Code.Usage = LEDLIGHT_USAGE_CODE.LIVINGROOM;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.Color = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.Dimming = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming = 1;
-        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color = 2;
-
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Install = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Code.Usage = LEDLIGHT_USAGE_CODE.INDIRECT;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.Color = false;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.Dimming = false;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.Dimming = 4;
-        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.Color = 5;
-
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Install = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Code.Usage = LEDLIGHT_USAGE_CODE.HALLWAY;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.Color = false;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.Dimming = false;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.OnOff = true;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.Dimming = 7;
-        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.Color = 8;
-    }
-
-
-    // =================================================================================================
-    // [[ Handler ]] region
-    // =================================================================================================
-
-
-    // =================================================================================================
-    // [[ Handler ]] WallPadInterface
-    // =================================================================================================
-
-}
+package kr.co.icontrols.wallpadhomectrl.screen.screen_light;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Color;
+import android.graphics.drawable.Drawable;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.SeekBar;
+
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
+import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.artncore.commons.API_Menu;
+import com.artncore.commons.DataClasses;
+import com.artncore.commons.Sdb_DataClasses;
+import com.artncore.commons.Sdb_DataClasses.LEDLIGHT_USAGE_CODE;
+import com.artncore.commons.define;
+import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
+
+import kr.co.icontrols.wallpadhomectrl.MainActivity;
+import kr.co.icontrols.wallpadhomectrl.R;
+import kr.co.icontrols.wallpadhomectrl.declare.Common;
+import kr.co.icontrols.wallpadhomectrl.declare.ID;
+import kr.co.icontrols.wallpadhomectrl.declare.TransactionDisplay;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadScale;
+import kr.co.icontrols.wallpadsupport.WpadScreen;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import kr.co.icontrols.wallpadsupport.WpadTextView;
+
+public class LightHdcLivMainScreen extends WpadScreen
+{
+    // [Define]
+    String TAG = this.getClass().getSimpleName();
+
+    private void DebugLogOutput(String s)
+    {
+        if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
+    }
+
+    /**
+     * 조명개수에 따른 좌표를 정의한다.
+     */
+    private int[][][] mPos = new int[][][]
+            {{{263, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                // 1개 - 거실등
+            {{144, 262}, {382, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},             // 2개 - 거실등 + (간접등 or 복도등)
+            {{48, 262}, {264, 262}, {479, 262}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},          // 3개 - 거실등 + 간접등 + 복도등
+            {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                     // 4개 - X
+    };
+
+    private int[][][] mPos_easymode = new int[][][]
+            {{{266, 214}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                // 1개 - 거실등
+            {{113, 214}, {409, 214}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},             // 2개 - 거실등 + (간접등 or 복도등)
+            {{52, 110}, {448, 110}, {250, 419}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},          // 3개 - 거실등 + 간접등 + 복도등
+            {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},                     // 4개 - X
+            };
+
+    /**
+     * 거실에너지미터 명칭정보
+     **/
+    //private String LightName[] = {"거실등", "복도등", "간접등"};
+
+    //     이미지 Array
+    private int[][] LightOnImageArray = new int[][]{{R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}, {R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}, {R.drawable.btn_li_on_normal, R.drawable.btn_li_on_pressed}};
+    private int[][] LightOffImageArray = new int[][]{{R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}, {R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}, {R.drawable.btn_li_off_normal, R.drawable.btn_li_off_pressed}};
+
+    private int[][] LightOnImageArray_easymode = new int[][]{{R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}, {R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}, {R.drawable.btn_li_on_normal_easymode, R.drawable.btn_li_on_pressed_easymode}};
+    private int[][] LightOffImageArray_easymode = new int[][]{{R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}, {R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}, {R.drawable.btn_li_off_normal_easymode, R.drawable.btn_li_off_pressed_easymode}};
+
+    // [View - ImageView(Background or Image - No touch)]
+    WpadImageView Background;
+    WpadImageView Bg_Seekbar;
+
+    // [View - ImageView(Button - touch)]
+    WpadImageView BtnDimmingLevel;
+    WpadImageView BtnColor;
+
+    // [View - TextView]
+    private WpadTextView Title;
+    private WpadTextView LimitMent_Dimm;
+
+    // [API]
+    private WallPadAPI mAPI = null;
+    private Sdb_LivingRoomLightAPI NewLivApi = null;           // 신규 거실 에너지미터 API
+    private TransactionDisplay transactionDisplay = null;
+
+    // [Value]
+    private int OPERATION_MODE = -1;
+    private Data mData = null;
+    private Data_NewLiv mData_NewLiv = null;
+    private LightView[] lightView = null;
+    private boolean NewLivingAPIUse = true;
+    private boolean NewLivLightLimit = false;
+    boolean livingEm_Kitchen_Use = false;
+
+    // [SeekBar Value]
+    SeekBar seekBar;
+    public static final int step = 1;
+    public static final int max = 10;
+    public static final int min = 1;
+    public int SeekBarValue = 1;
+
+    // [Class]
+    /**
+     * 에너지미터 데이터
+     **/
+    private class Data
+    {
+        DataClasses.EnergyMeterV2 LivingEM;
+        boolean ControlType; //false:밝기, true:색상
+
+        public Data()
+        {
+            ControlType = false;
+            LivingEM = new DataClasses.EnergyMeterV2();
+        }
+    }
+
+    // [Class]
+    /**
+     * 에너지미터 데이터
+     **/
+    private class Data_NewLiv
+    {
+        Sdb_DataClasses.LivingEnergyMeterClass NewLivingEM;
+        boolean ControlType; //false:밝기, true:색상
+
+        public Data_NewLiv()
+        {
+            ControlType = false;
+            NewLivingEM = new Sdb_DataClasses.LivingEnergyMeterClass();
+        }
+    }
+
+    /**
+     * 개별 조명 class
+     **/
+    private class LightView
+    {
+        public WpadTextView Name;         // 조명등 이름
+        public WpadImageView OnOffBtn;    // OnOff 버튼
+
+        private LightView(int left, int top, int index, String name)
+        {
+            if (bEasyModeUse) {
+                Name = new WpadTextView(getContext(), false, 270, 60, Gravity.CENTER, Color.WHITE, Common.fontsize._44, false, ID.LightHdcLivMainScreenID.text.ONOFF_1 + index);
+                ViewRegistration(getLayout(), Name, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                Name.setText(name);
+
+                OnOffBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 270, new int[]{LightOffImageArray_easymode[index][0], LightOffImageArray_easymode[index][1]}, new int[]{LightOnImageArray_easymode[index][0], LightOnImageArray_easymode[index][1]}, ID.LightHdcLivMainScreenID.button.ONOFF_1 + index);
+                ViewRegistration(getLayout(), OnOffBtn, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top + 85));
+                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            } else {
+                Name = new WpadTextView(getContext(), false, 208, 45, Gravity.CENTER, Color.WHITE, Common.fontsize._35, false, ID.LightHdcLivMainScreenID.text.ONOFF_1 + index);
+                ViewRegistration(getLayout(), Name, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
+                Name.setText(name);
+
+                OnOffBtn = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 208, 208, new int[]{LightOffImageArray[index][0], LightOffImageArray[index][1]}, new int[]{LightOnImageArray[index][0], LightOnImageArray[index][1]}, ID.LightHdcLivMainScreenID.button.ONOFF_1 + index);
+                ViewRegistration(getLayout(), OnOffBtn, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top + 67));
+                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+            }
+        }
+    }
+
+    private boolean bEasyModeUse = false;
+
+    /**
+     * 생성자
+     **/
+    public LightHdcLivMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)
+    {
+        super(context, layout);
+        Log.d(TAG, "[START - Screen] --------------------------------------------");
+        ((MainActivity) getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
+        bEasyModeUse = ((MainActivity) context).GetEasyModeUXUse();
+        DebugLogOutput("[Create] - bEasyModeUse [" + bEasyModeUse + "]");
+
+        // 0. 화면 ID -> DB 저장
+        //if(this.getClass().getSimpleName().equals("LightHdcLivMainScreen"))
+        {
+            Log.d(TAG, "[Step 0] - true");
+            Log.d(TAG, "[Step 0] - Now name = " + this.getClass().getSimpleName());
+            Log.d(TAG, "[Step 0] - Now name Str = " + this.getClass().getSimpleName().toString());
+
+            WallpadStatusData wd = new WallpadStatusData( this.getContext());
+            Log.d(TAG, "[Step 0] - prev db val = " + wd.GetCurrentScreenIDValue());
+
+            wd.SetCurrentScreenIDValue(API_Menu.SubMenuCtrl.HDC_LivingLamp);
+            Log.d(TAG, "[Step 0] - now db val = " + wd.GetCurrentScreenIDValue());
+
+            wd.closeDB();
+        }
+        /*else
+        {
+            Log.d(TAG, "[Step 0] - false");
+            Log.d(TAG, "[Step 0] - Now name = " + this.getClass().getSimpleName());
+            Log.d(TAG, "[Step 0] - Now name Str = " + this.getClass().getSimpleName().toString());
+        }*/
+
+        WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
+        livingEm_Kitchen_Use = wpdds.Get_LivingEm_KitchenLight_Use();
+        wpdds.closeDB();
+
+        // 1. Data Create
+        DebugLogOutput("[Create] - Step1 : Data Create");
+        OPERATION_MODE = operationMode;
+        OPERATION_MODE = Common.MODE_NOMAL;
+
+        mData_NewLiv = new Data_NewLiv();
+
+        // 2. Device API Load & Update
+        DebugLogOutput("[Create] - Step2 : Device API Load & Update");
+        if (OPERATION_MODE == Common.MODE_NOMAL)
+        {
+            DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
+            mAPI = wpapi;
+            if(Device_ApiLoad_NewLiv(wpapi) >= 0) Device_Update_NewLiv();
+        }
+        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
+        {
+            DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
+            //int LightCount = DB_GetLightCount();
+            if(NewLivingAPIUse)
+            {
+                // 샘플 데이터 로드
+                // 신규 거실 에너지미터 데이터 로딩하기
+                LoadSampleData_NewLiv();
+            }
+            else
+            {
+                int LightCount = 2;
+                if (LightCount > 0) mData.LivingEM.device.SetLedCount((byte) LightCount);
+                else mData.LivingEM.device.SetLedCount((byte) 2);
+            }
+        }
+        else
+        {
+            DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
+            OPERATION_MODE = Common.MODE_NOMAL;
+        }
+
+        // 3. Image Create
+        Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.LightHdcLivMainScreenID.image.BACKGROUND);
+        ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
+
+        // 4. Button Create
+        DebugLogOutput("[Create] - Step4 : Button Create");
+
+        //밝기, 색상 버튼 등록
+        if (bEasyModeUse) {
+            BtnDimmingLevel = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 146, new int[]{R.drawable.btn_dimming_selected_easymode, R.drawable.btn_dimming_selected_easymode}, new int[]{R.drawable.btn_dimming_normal_easymode, R.drawable.btn_dimming_pressed_easymode}, ID.LightHdcLivMainScreenID.button.DIMMING);
+            ViewRegistration(getLayout(), BtnDimmingLevel, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(279));
+
+            BtnColor = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 270, 146, new int[]{R.drawable.btn_color_normal_easymode, R.drawable.btn_color_pressed_easymode}, new int[]{R.drawable.btn_color_selected_easymode, R.drawable.btn_color_selected_easymode}, ID.LightHdcLivMainScreenID.button.COLOR);
+            ViewRegistration(getLayout(), BtnColor, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(425));
+        } else {
+            BtnDimmingLevel = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 230, 130, new int[]{R.drawable.btn_dimming_selected, R.drawable.btn_dimming_selected}, new int[]{R.drawable.btn_dimming_normal, R.drawable.btn_dimming_pressed}, ID.LightHdcLivMainScreenID.button.DIMMING);
+            ViewRegistration(getLayout(), BtnDimmingLevel, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(270));
+
+            BtnColor = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 230, 130, new int[]{R.drawable.btn_color_normal, R.drawable.btn_color_pressed}, new int[]{R.drawable.btn_color_selected, R.drawable.btn_color_selected}, ID.LightHdcLivMainScreenID.button.COLOR);
+            ViewRegistration(getLayout(), BtnColor, Common.ImgPosion.GetX(768), Common.ImgPosion.GetY(400));
+        }
+
+        LimitMent_Dimm = new WpadTextView(this.getContext(), true, 575, 50, Gravity.LEFT, Color.rgb(0xff,0x7d,0x00), Common.fontsize._30, true,  ID.LightHdcLivMainScreenID.text.LIMITMENT);
+        ViewRegistration(this.getLayout(), LimitMent_Dimm, Common.ImgPosion.GetX(350), Common.ImgPosion.GetY(157));
+        LimitMent_Dimm.setText("LED 컨버터 이상으로 밝기를 높일 수 없습니다.");
+        LimitMent_Dimm.setVisibility(View.INVISIBLE);
+
+        //SeekBar 등록
+        Registration_SeekBar();
+
+        // 5. Draw_Update
+        DebugLogOutput("[Create] - Step5 : Draw_Update");
+
+        // 6. 조명OFF인 경우에 최초 create시 버튼들 표시되었다가 바로 사라져서 증상이 안나오게 수정함
+        DebugLogOutput("[Create] - Step6 : Button INVISIBLE");
+        BtnDimmingLevel.setVisibility(View.INVISIBLE);
+        BtnColor.setVisibility(View.INVISIBLE);
+        Bg_Seekbar.setVisibility(View.INVISIBLE);
+        seekBar.setVisibility(View.INVISIBLE);
+
+        if (OPERATION_MODE == Common.MODE_NOMAL)
+        {
+            DebugLogOutput("mEM_DriverCheckHandler OK");
+            if (NewLivApi != null)
+            {
+                Device_BrRegistration(true);
+                Registration_Light_NewLiv();
+                Draw_Update_NewLiv();
+
+                if(MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) NewLivApi, (WpadScreen) this);
+            }
+        }
+        else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE)
+        {
+            Registration_Light_NewLiv();
+            Draw_Update_NewLiv();
+        }
+        Log.d(TAG, "[END - Screen] --------------------------------------------");
+    }
+
+    // =================================================================================================
+    // [[ BroadcastReceiver ]] region
+    // =================================================================================================
+
+    /**
+     * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
+     */
+    @Override
+    protected void onBrReceive(Intent intent)
+    {
+        super.onBrReceive(intent);
+
+        String ActionName = intent.getAction();
+
+        DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
+
+        if (ActionName.equals(ID.LightHdcLivMainScreenID.BR_LIGHT))
+        {
+            DebugLogOutput("onBrReceive - BR_LIGHT");
+            Device_Update_NewLiv();
+            Draw_Update_NewLiv();
+        }
+        else if (ActionName.equals(define.NOTIFY_DAIL))
+        {
+            DebugLogOutput("onBrReceive - NOTIFY_DAIL");
+            byte OnOff = intent.getByteExtra("ONOFF", (byte)0xEE);
+            byte Dial = intent.getByteExtra("DIAL", (byte)0xEE);
+            byte Level = intent.getByteExtra("LEVEL", (byte)0xEE);
+            byte Color = intent.getByteExtra("COLOR", (byte)0xEE);
+            byte Control = intent.getByteExtra("CONTROL", (byte)0xEE);
+
+
+            DebugLogOutput("onBrReceive - OnOff   : " + OnOff);
+            DebugLogOutput("onBrReceive - Dial    : " + Dial);
+            DebugLogOutput("onBrReceive - Level   : " + Level);
+            DebugLogOutput("onBrReceive - Color   : " + Color);
+            DebugLogOutput("onBrReceive - Control : " + Control);
+
+            setFinishTimerReset();
+
+            boolean LightOnOff =  GetmData_LightOnOff_NewLiv();
+            DebugLogOutput("LightOnOff : " + LightOnOff);
+            if(LightOnOff == false)
+            {
+                if(OnOff == 1) //켜짐이면
+                {
+                    if(Dial == 0)//조작 없음 이면
+                    {
+                        //Sound().Play(SND.effect.TOUCH_LATCHED);
+                        if (mData_NewLiv.ControlType == true)  //기존에 색온도 조절 중으로 밝기 조절로 변경
+                        {
+                            BtnDimmingLevel.setButtonFrontImage();
+                            BtnColor.setButtonFrontImage();
+                            Bg_Seekbar.setButtonFrontImage();
+                            mData_NewLiv.ControlType = false;
+                        }
+
+                        if ((SeekBarValue) != (Level))
+                        {
+                            SetSeekBarProgress(Level);
+                        }
+                    }
+                    else if(Dial == 2)//OFF 상태에서 조그버튼 길게 눌러 바로 색온도 조절 시
+                    {
+                        OnOff = 1;
+
+                        if(Control == 1)
+                        {
+                            NewLivApi.SetControlMode(true); // 조그 버튼 색변경(빨강)
+                        }
+                    }
+                }
+                else
+                {
+                    if(Dial == 2)
+                    {
+
+                    }
+                }
+            }
+
+            if(OnOff == 1) //켜짐이면
+            {
+                if (mData_NewLiv.ControlType == true)  //기존에 색온도 조절 중
+                {
+                    if(Dial == 1) //디밍 조절중
+                    {
+                        //Sound().Play(SND.effect.TOUCH_LATCHED);
+                        BtnDimmingLevel.setButtonFrontImage();
+                        BtnColor.setButtonFrontImage();
+                        Bg_Seekbar.setButtonFrontImage();
+                        mData_NewLiv.ControlType = false;
+                    }
+                    else if(Dial == 2) // 색온도 조절중
+                    {
+                    }
+                }
+                else //기존에 밝기 조절 중
+                {
+                    if(Dial == 2) //색온도 조절 중
+                    {
+                        //Sound().Play(SND.effect.TOUCH_LATCHED);
+                        BtnDimmingLevel.setButtonRearImage();
+                        BtnColor.setButtonRearImage();
+                        Bg_Seekbar.setButtonRearImage();
+                        mData_NewLiv.ControlType = true;
+
+                        if(Control == 1)
+                        {
+                            NewLivApi.SetControlMode(true); // 조그 버튼 색변경(빨강)
+                        }
+                    }
+
+                }
+
+                if(Dial == 1) //디밍 조절중
+                {
+                    SetSeekBarProgress(Level);
+                }
+                else if(Dial == 2) //색온도 조절 중
+                {
+                    SetSeekBarProgress(Color);
+                }
+            }
+            else //꺼짐
+            {
+                if(Dial == 0) //조작 없음
+                {
+                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+                else if(Dial == 2)
+                {
+
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void onClose()
+    {
+        super.onClose();
+        ((MainActivity) getContext()).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
+        // 등록된 BR 을 해제 한다.
+        if(OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE)
+        {
+            NewLivApi.SetControlMode(false);
+        }
+
+        if (NewLivApi != null)
+        {
+            Device_BrRegistration(false);
+            if(MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
+        }
+
+        WallpadStatusData wd = new WallpadStatusData( this.getContext());
+        Log.d(TAG, "close db val = " + wd.GetCurrentScreenIDValue());
+
+        wd.SetCurrentScreenIDValue(0);
+        Log.d(TAG, "change close db val = " + wd.GetCurrentScreenIDValue());
+
+        wd.closeDB();
+    }
+
+    @Override
+    public void Close()
+    {
+        super.Close();
+    }
+
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+        super.onTouchEvent(v, event);
+
+        int TargetId = v.getId();
+        int MoveEvent = event.getAction();
+
+        if (MoveEvent == MotionEvent.ACTION_DOWN) {
+
+        }
+        else if (MoveEvent == MotionEvent.ACTION_UP) {
+            if (TargetId == ID.LightHdcLivMainScreenID.button.DIMMING) {
+                DebugLogOutput("onTouchEvent [DIMMING] BUTTON !!!, " + mData_NewLiv.ControlType);
+                if (mData_NewLiv.ControlType == true) {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    BtnDimmingLevel.setButtonFrontImage();
+                    BtnColor.setButtonFrontImage();
+                    Bg_Seekbar.setButtonFrontImage();
+                    mData_NewLiv.ControlType = false;
+
+                    if (mData_NewLiv.NewLivingEM.Data.LedLight != null) {
+                        if (mData_NewLiv.NewLivingEM.Data.LedLight[0] != null) {
+                            DebugLogOutput("onTouchEvent [DIMMING] BUTTON mData.LivingEM.device.ledController[0].device.Level: " +  mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming );
+                            SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming );
+                        }
+                    }
+                    if (OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE) {
+                        NewLivApi.SetControlMode(false);
+                    }
+                }
+            }
+            else if (TargetId == ID.LightHdcLivMainScreenID.button.COLOR) {
+                DebugLogOutput("onTouchEvent [COLOR] BUTTON !!!, " + mData_NewLiv.ControlType);
+                if (mData_NewLiv.ControlType == false) {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    BtnDimmingLevel.setButtonRearImage();
+                    BtnColor.setButtonRearImage();
+                    Bg_Seekbar.setButtonRearImage();
+                    mData_NewLiv.ControlType = true;
+
+                    if (mData_NewLiv.NewLivingEM.Data.LedLight != null) {
+                        if (mData_NewLiv.NewLivingEM.Data.LedLight[0] != null) {
+                            DebugLogOutput("onTouchEvent [DIMMING] BUTTON mData.LivingEM.device.ledController[0].device.Level: " +  mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
+                            SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
+                        }
+                    }
+
+                    if (OPERATION_MODE != Common.MODE_BUSINESS_SAMPLE) {
+                        NewLivApi.SetControlMode(true);
+                    }
+                }
+            }
+            else if ((TargetId >= ID.LightHdcLivMainScreenID.button.ONOFF_1) && (TargetId <= ID.LightHdcLivMainScreenID.button.ONOFF_8)) {
+                // 개별 조명 제어
+                int index = TargetId - ID.LightHdcLivMainScreenID.button.ONOFF_1;
+                DebugLogOutput("onTouchEvent [LIGHT_" + (index + 1) + "] BUTTON !!!");
+//                Log.e(TAG, "[onTouchEvent] Group_Hallway = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Hallway);
+//                Log.e(TAG, "[onTouchEvent] Group_Indirect = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Indirect);
+//                Log.e(TAG, "[onTouchEvent] Exist_Hallway = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway);
+//                Log.e(TAG, "[onTouchEvent] Exist_Indirect = " + mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect);
+//                Log.e(TAG, "[onTouchEvent] bHallwayLight2GroupSet = " + mData_NewLiv.NewLivingEM.Info.bHallwayLight2GroupSet);
+//                Log.e(TAG, "[onTouchEvent] bHallwayLight2GroupSupport = " + mData_NewLiv.NewLivingEM.Info.bHallwayLight2GroupSupport);
+
+                boolean OnOff = false;
+                if (mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff == true) {
+                    OnOff = true;
+                }
+
+                if (OnOff) OnOff = false;
+                else OnOff = true;
+
+                if (OPERATION_MODE == Common.MODE_NOMAL) {
+                    /** 조명 개별제어 시작 **/
+                    int ret = NewLivApi.SetLightOnOff((byte) index, OnOff);
+                    if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                    else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+
+                    /** 조명 개별제어 끝**/
+                }
+                else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                    if (OnOff) {
+                        mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff = true;
+                    }
+                    else {
+                        mData_NewLiv.NewLivingEM.Data.LedLight[index].Data.OnOff = false;
+                    }
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+
+                /////////////////////////////////////////////
+                Draw_Update_NewLiv();
+            }
+        }
+    }
+
+    /**
+     * Seekbar 터치 시 동작 처리
+     * **/
+    SeekBar.OnSeekBarChangeListener mOnSeekBarChangeListener = new SeekBar.OnSeekBarChangeListener() {
+        @Override
+        public void onStopTrackingTouch(SeekBar seekBar) {
+            try {
+                if (seekBar.getId() == ID.LightHdcLivMainScreenID.button.SeekBar) {
+                    Log.i(TAG, "[onStopTrackingTouch] SeekBarValue [" + SeekBarValue + "]");
+                    setFinishTimerReset();
+
+                    if (OPERATION_MODE == Common.MODE_NOMAL) {
+                        /**
+                         * 디밍, 색온도 제어 시작
+                         * **/
+                        if (mData_NewLiv.NewLivingEM.Data.LedLight == null) {
+                            Log.e(TAG, "[onStopTrackingTouch] mData_NewLiv.NewLivingEM.Data.LedLight == null");
+                            return;
+                        }
+
+                        //for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount ; i++)
+                        Log.i(TAG, "[onStopTrackingTouch] - seekbarval2 = " + SeekBarValue);{
+                            if (mData_NewLiv.ControlType == false) {
+                                if (NewLivLightLimit) {
+                                    // 조명 밝기 제한 중 (SMPS 1개 고장)
+                                    if (SeekBarValue > 3) {
+										Log.i(TAG, "[onStopTrackingTouch] - Do Limit 1 ########################");
+                                        SeekBarValue = 3;
+                                    }
+                                    else {
+									    // 이미 3인 경우에 소리 나는 것을 방지
+                                        if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)) {
+                                            Log.i(TAG, "[onStopTrackingTouch] - Set Dimming 1 ########################");
+                                            int ret = NewLivApi.SetLightDimming(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
+                                            if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                                            else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                                        }
+									}
+                                }
+                                else {
+                                    Log.i(TAG, "[onStopTrackingTouch] - Set Dimming 2 ########################");
+									int ret = NewLivApi.SetLightDimming(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
+									if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+									else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+								}
+                            }
+                            else {
+                                int ret = NewLivApi.SetLightColor(define.DEVICE_ALL_OR_NOTHING, (byte) (SeekBarValue) );
+                                if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+                                else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+                            }
+                        }
+                        /**
+                         * 디밍, 색온도 제어 끝
+                         * **/
+                    }
+                    else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
+                            if (mData_NewLiv.ControlType == false) {
+                                mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.Dimming = (byte) (SeekBarValue);
+                            }
+                            else {
+                                mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.Color = (byte) (SeekBarValue);
+                            }
+                        }
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                    }
+                }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
+                Log.e(TAG, "[Exception] mOnSeekBarChangeListener.onStopTrackingTouch");
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+            }
+        }
+
+        @Override
+        public void onStartTrackingTouch(SeekBar seekBar) {
+
+        }
+
+        @Override
+        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+            if (seekBar.getId() == ID.LightHdcLivMainScreenID.button.SeekBar) {
+                if (mData_NewLiv.ControlType == false) {
+                    if (NewLivLightLimit) {
+                        // 조명 밝기 제한 중 (SMPS 1개 고장)
+						SeekBarValue = min + (progress * step);
+                        if (SeekBarValue > 3) {
+                            // 조명 제한 중, 30% 이상의 값을 요청하는 경우 : 3 유지
+                            Log.i(TAG, "[onProgressChanged] - Do Limit 2 ########################");
+                            SeekBarValue = 3;
+                            SetSeekBarProgress(3);
+                        }
+                    }
+                    else {
+                        SeekBarValue = min + (progress * step);
+                    }
+                }
+                else {
+                    SeekBarValue = min + (progress * step);
+                }
+            }
+        }
+    };
+
+    //[Function]
+
+    // =================================================================================================
+    // [[ Device ]] region
+    // =================================================================================================
+
+    /**
+     * 디바이스 API 를 Load 한다.
+     *
+     * @param wpapi - 생성시 전달받은 WallPadAPI
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int Device_ApiLoad_NewLiv(WallPadAPI wpapi) {
+        // 1. Mode Check
+        if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
+
+        DebugLogOutput("[Device_ApiLoad_NewLiv] - Start");
+
+        // 2. wpapi Check
+        if (wpapi == null) {
+            Log.e(TAG, "[Device_ApiLoad_NewLiv] - wpapi is null");
+            return -2;
+        }
+
+        //////////////////////////////////////////////////////////////////////////////
+        // Light
+        //////////////////////////////////////////////////////////////////////////////
+
+        // 3. Load API (Get_Sdb_LivingRoomLightAPI)
+        DebugLogOutput("[Device_ApiLoad_NewLiv] - Step1 : Light API Load...");
+        try {
+            NewLivApi = wpapi.Get_Sdb_LivingRoomLightAPI();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Device_ApiLoad_NewLiv] - [Exception Error] wpapi.Get_Sdb_LivingRoomLightAPI");
+            Log.e(TAG, "[Device_ApiLoad_NewLiv] - " + e.toString());
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+
+        if (NewLivApi == null) {
+            Log.e(TAG, "[Device_ApiLoad_NewLiv] - NewLivApi is null");
+            return -4;
+        }
+
+        DebugLogOutput("[Device_ApiLoad_NewLiv] - OK");
+
+        return 0;
+    }
+
+    /**
+     * 디바이스에 알림 BR 을 등록한다. (거실 에너지미터)
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int Device_BrRegistration(boolean OnOff) {
+        DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
+
+        String BR_NAME = ID.LightHdcLivMainScreenID.BR_LIGHT;
+
+        // 1. Api Load Check
+        if (NewLivApi == null) {
+            Log.e(TAG, "[Device_BrRegistration] - NewLivApi unload !!!");
+            return -1;
+        }
+
+        if (OnOff) {
+            try {
+                DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
+                NewLivApi.regChangedBR(BR_NAME);
+                DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -101;
+            }
+            catch (Exception e) {
+                Log.e(TAG, "[Device_BrRegistration] - [Exception Error] NewLivApi.regChangedBR");
+                Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                return -101;
+            }
+            super.addBrActionFilter(BR_NAME);
+
+            super.addBrActionFilter(define.NOTIFY_DAIL);
+        }
+        else {
+            try {
+                DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
+                NewLivApi.unregChangedBR(BR_NAME);
+                DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -102;
+            }
+            catch (Exception e) {
+                Log.e(TAG, "[Device_BrRegistration] - [Exception Error] NewLivApi.unregChangedBR");
+                Log.e(TAG, "[Device_BrRegistration] - " + e.toString());
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+                return -102;
+            }
+            super.removeBrActionFilter(BR_NAME);
+            super.removeBrActionFilter(define.NOTIFY_DAIL);
+        }
+        return 0;
+    }
+
+    /**
+     * 제어기기의 상태를 갱신한다.
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int Device_Update_NewLiv() {
+        DebugLogOutput("[Device_Update_NewLiv] - Start");
+
+        // 1. Api Load Check
+        if (NewLivApi == null) {
+            Log.e(TAG, "[Device_Update_NewLiv] EMApi unload !!!");
+            return -1;
+        }
+
+        // 2. Refresh
+        try {
+            int ret = NewLivApi.Refresh();
+            if (ret < 0) {
+                Log.e(TAG, "[Device_Update_NewLiv] Refresh ret (" + ret + ")   ErrorCode = " + NewLivApi.ErrorCode.ErrStr());
+                return -2;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[Device_Update_NewLiv] - [Exception Error] lightApi.Refresh( )");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+
+        // 3. Data Copy
+        mData_NewLiv.NewLivingEM = NewLivApi.data;
+        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
+            Log.i(TAG, mData_NewLiv.NewLivingEM.Data.ToString());
+        }
+
+        NewLivLightLimit = mData_NewLiv.NewLivingEM.Data.LightLimitControl;
+        Log.i(TAG, "NewLivLightLimit = " + NewLivLightLimit);
+
+        // 4. Debug Msg
+        DebugLogOutput("[Device_Update_NewLiv] - OK");
+        return 0;
+    }
+
+    // =================================================================================================
+    // [[ Draw ]] region
+    // =================================================================================================
+
+    /**
+     * 변경되는 이미지를 다시 그린다.
+     */
+    private void Draw_Update_NewLiv() {
+        if (mData_NewLiv == null) return;
+        if (mData_NewLiv.NewLivingEM.Info.Install == false) return;
+        if (mData_NewLiv.NewLivingEM.Info.LightGroup == null) return;
+
+        DebugLogOutput("[Draw_Update_NewLiv] Start !!!");
+        //if (mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway == false)
+        //if (mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect == false)
+
+        if (NewLivLightLimit) {
+            LimitMent_Dimm.setVisibility(View.VISIBLE);
+        }
+        else {
+            LimitMent_Dimm.setVisibility(View.INVISIBLE);
+        }
+
+        for (int i = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
+            if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
+                //Log.i(TAG, "i = " + i + " OnOff = " + );
+
+                if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
+                    Draw_LightStatusChange(i + 1, true);
+                }
+                else {
+                    Draw_LightStatusChange(i + 1, false);
+                }
+            }
+        }
+
+        if (mData_NewLiv.ControlType == false) {
+            if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)) {
+                Log.i(TAG, "(int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming)  : " + (int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming);
+
+                if (NewLivLightLimit) {
+                    // 조명 밝기 제한 중 (SMPS 1개 고장)
+                    if (((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming) > 3) {
+                        Log.i(TAG, "[Draw_Update_NewLiv] - Do Limit 3 ########################");
+                        SetSeekBarProgress( 3);
+                    }
+                    else {
+                        Log.i(TAG, "[Draw_Update_NewLiv] - SetSeekBarProgress 1");
+                        SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming  );
+                    }
+                }
+                else {
+                    Log.i(TAG, "[Draw_Update_NewLiv] - SetSeekBarProgress 2");
+                    SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming  );
+                }
+            }
+        }
+        else {
+            if ((SeekBarValue) != ((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color)) {
+                SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color );
+            }
+        }
+
+        //거실등 ON/OFF 상태에 따른 바, 디밍/색온도 박스 표시
+        if (mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.OnOff == true && !livingEm_Kitchen_Use) {
+            BtnDimmingLevel.setVisibility(View.VISIBLE);
+            BtnColor.setVisibility(View.VISIBLE);
+            Bg_Seekbar.setVisibility(View.VISIBLE);
+            seekBar.setVisibility(View.VISIBLE);
+        }
+        else {
+            boolean tempLightStatus = false; //true면 간접등 또는 복도등 하나라도 켜짐
+            for (int i = 1; i <  mData_NewLiv.NewLivingEM.Info.LightCount; i++) {
+				if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
+					if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
+						tempLightStatus = true;
+					}
+				}
+            }
+
+            if (tempLightStatus) {
+                if (mData_NewLiv.ControlType == true) {
+                    // 기존에 색온도(디밍) 조절 중에서 밝기 조절로 변경
+                    BtnDimmingLevel.setButtonFrontImage();
+                    BtnColor.setButtonFrontImage();
+                    Bg_Seekbar.setButtonFrontImage();
+                    mData_NewLiv.ControlType = false;
+                    SetSeekBarProgress((int) mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming);
+                }
+                BtnDimmingLevel.setVisibility(View.INVISIBLE);
+                BtnColor.setVisibility(View.INVISIBLE);
+                Bg_Seekbar.setVisibility(View.VISIBLE);
+                seekBar.setVisibility(View.VISIBLE);
+            }
+            else {
+                BtnDimmingLevel.setVisibility(View.INVISIBLE);
+                BtnColor.setVisibility(View.INVISIBLE);
+                Bg_Seekbar.setVisibility(View.INVISIBLE);
+                seekBar.setVisibility(View.INVISIBLE);
+            }
+        }
+    }
+
+    /**
+     * 각 조명그림을 ON, OFF 이미지 변환한다.
+     *
+     * @param LightNumber - 변경할 조명 번호 (1~8 각조명 [조명개수를 초과할 경우 변경되지않는다])
+     * @param OnOff       - true : ON / false : OFF
+     */
+    private void Draw_LightStatusChange(int LightNumber, boolean OnOff) {
+        if (LightNumber < 0) return;
+        if (lightView == null) return;
+        if (LightNumber > lightView.length) return;
+
+        int index = LightNumber - 1;
+        if (lightView[index] == null) return;
+
+        DebugLogOutput("[Draw_LightStatusChange] - LightNumber : " + LightNumber + " / OnOff : " + OnOff );
+        if (OnOff) {
+            lightView[index].OnOffBtn.setButtonRearImage();
+        }
+        else {
+            lightView[index].OnOffBtn.setButtonFrontImage();
+        }
+    }
+    // =================================================================================================
+    // [[ Function ]] 조명 상태 관련
+    // =================================================================================================
+
+    /**
+     * 조명 ON OFF 상태 반환
+     * @param EM2 상태를 확인할 DataClasses.EnergyMeterV2 class
+     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
+     * **/
+    public boolean GetmData_LightOnOff(DataClasses.EnergyMeterV2 EM2) {
+        boolean LightOnOff = false;
+        if (EM2 == null) return false;
+
+        for (int i  = 0; i<EM2.device.ledController.length; i++) {
+            if (EM2.device.ledController[i].device.OnOff == DataClasses.LedController.POWER.On) {
+                LightOnOff = true;
+            }
+        }
+        return LightOnOff;
+    }
+
+    /**
+     * 조명 ON OFF 상태 반환
+     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
+     * **/
+    public boolean GetmData_LightOnOff() {
+        boolean LightOnOff = false;
+        if (mData.LivingEM.device.ledController == null) return false;
+
+        for(int i  = 0; i<mData.LivingEM.device.ledController.length; i++) {
+            if (mData.LivingEM.device.ledController[i].device.OnOff == DataClasses.LedController.POWER.On) {
+                LightOnOff = true;
+            }
+        }
+        return LightOnOff;
+    }
+
+    /**
+     * 조명 ON OFF 상태 반환
+     * @return boolean true-하나라도 켜짐, false-모두 꺼짐
+     * **/
+    public boolean GetmData_LightOnOff_NewLiv() {
+        boolean LightOnOff = false;
+        if (mData_NewLiv.NewLivingEM.Data.LedLight == null) return false;
+
+        for (int i  = 0; i < mData_NewLiv.NewLivingEM.Info.LightCount ; i++) {
+            if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Data.OnOff == true) {
+                LightOnOff = true;
+            }
+        }
+        return LightOnOff;
+    }
+
+
+    // =================================================================================================
+    // [[ Light UI 등록 ]] region
+    // =================================================================================================
+
+    /**
+     * 조명 UI를 등록한다.
+     **/
+    private void Registration_Light_NewLiv() {
+        DebugLogOutput("[Registration_Light_NewLiv] - Start !!!");
+        if (mData_NewLiv.NewLivingEM.Info.Install == false) {
+            Log.w(TAG, "[Registration_Light_NewLiv] mData_NewLiv.NewLivingEM.Info.Install == false");
+            return;
+        }
+
+        if (lightView != null) {
+            Log.w(TAG, "[Registration_Light_NewLiv] lightView != null");
+            return;
+        }
+
+        // Install 여부에 따라서 조명 그룹을 그리도록 한다.
+        // 거실조명, 조명그룹설정 모두 이를 따라야 함
+
+        int LightCount = mData_NewLiv.NewLivingEM.Info.LightCount;
+        if ((LightCount >= 1) && (LightCount <= 3)) {
+            Log.d(TAG, "[Registration_Light_NewLiv] lightView = new");
+            lightView = new LightView[LightCount];
+
+            int installCount = 0;
+            for (int i = 0; i < LightCount; i++) {
+                if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
+                    installCount++;
+                }
+            }
+            Log.d(TAG, "installCount = " + installCount);
+
+            int posIndex = LightCount - 1;
+            if (installCount < LightCount) {
+                posIndex = installCount - 1;
+                Log.d(TAG, "installCount < LightCount --> change posIndex : " + posIndex);
+            }
+
+            int createLight = 0;
+            for (int i = 0; i < LightCount; i++) {
+                try {
+                    if (mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Install) {
+                        int left, top;
+                        if (bEasyModeUse) {
+                            left = (mPos_easymode[posIndex][createLight][0]);
+                            top = (mPos_easymode[posIndex][createLight][1]);
+                        }
+                        else {
+                            left = (mPos[posIndex][createLight][0]);
+                            top = (mPos[posIndex][createLight][1]);
+                        }
+
+                        byte using = mData_NewLiv.NewLivingEM.Data.LedLight[i].Info.Code.Usage;
+                        String name = "";
+
+                        if (using == LEDLIGHT_USAGE_CODE.LIVINGROOM) {
+                            name = "거실등";
+
+                            if (livingEm_Kitchen_Use) {
+                                name = "주방등";   // 명칭 덮어쓰기
+                                left += 310;       // 우측으로 조명버튼 이동
+                            }
+                        }
+                        else if (using == LEDLIGHT_USAGE_CODE.HALLWAY) {
+                            name = "복도등";
+                        }
+                        else if (using == LEDLIGHT_USAGE_CODE.INDIRECT) {
+                            name = "간접등";
+                        }
+                        else if (using == LEDLIGHT_USAGE_CODE.KITCHEN) {
+                            name = "주방등";
+                        }
+                        else {
+                            name = "거실등";
+                        }
+                        Log.d(TAG, "[Registration_Light_NewLiv] - name[" + i + "] = " + name);
+                        lightView[createLight] = new LightView(left, top, createLight, name);
+                        createLight++;
+                    }
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    lightView[i] = null;
+                }
+		        catch (Exception e) {
+                    Log.e(TAG, "[Exception Error] - [Create] LightView new");
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
+                    lightView[i] = null;
+                }
+            }
+        }
+        else {
+            Log.e(TAG, "LightCount  Out of range!!! (" + LightCount + ")");
+        }
+    }
+
+    /**
+     * 조명 UI를 삭제한다.
+     **/
+    private void Remove_Light() {
+        if (mData.LivingEM.device.ledController == null) {
+            Log.e(TAG, "mData.LivingEM.device.ledController == null");
+            return;
+        }
+
+        if (lightView != null) {
+            int LightCount = mData.LivingEM.device.ledController.length;
+            for (int i = 0; i < LightCount; i++) {
+                try {
+                    getLayout().removeView(lightView[i].OnOffBtn);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
+                    Log.e(TAG, "[Exception Error] - [Remove] LightView Remove");
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+            }
+        }
+    }
+    // =================================================================================================
+    // [[ SeekBar 등록 ]] region
+    // =================================================================================================
+    private void Registration_SeekBar() {
+        //SeekBar 배경 등록
+        Bg_Seekbar = new WpadImageView(getContext(), TOUCH_KIND.BUTTON, 34, 484, new int[]{R.drawable.bar_dimming, R.drawable.bar_dimming}, new int[]{R.drawable.bar_color, R.drawable.bar_color}, ID.LightHdcLivMainScreenID.image.BG_SEEKBAR);
+        ViewRegistration(getLayout(), Bg_Seekbar, Common.ImgPosion.GetX(1108+7), Common.ImgPosion.GetY(158));
+
+        //SeekBar 등록
+        seekBar = new SeekBar(getContext());
+        seekBar.setId(ID.LightHdcLivMainScreenID.button.SeekBar);
+
+        Bitmap size = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.bar_cir);
+        size = Bitmap.createScaledBitmap(size, WpadScale.getWidth(size.getWidth()), WpadScale.getWidth(size.getHeight()), true);
+
+        ImageView imageView = new ImageView(getContext());
+        imageView.setImageBitmap(size);
+        seekBar.setThumb(imageView.getDrawable());
+
+        Drawable mDrawable = getContext().getResources().getDrawable(R.drawable.transparent_background);
+        seekBar.setProgressDrawable(mDrawable);
+        seekBar.setProgress(0);
+        //seekBar.setBackgroundColor(Color.RED);
+
+        RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(WpadScale.getWidth(484 - WpadScale.getWidth(size.getWidth()) / 2), WpadScale.getHeight(80));
+        seekBar.setLayoutParams(Params);
+        seekBar.setPadding(WpadScale.getWidth(size.getWidth()) / 2, 0, WpadScale.getWidth(size.getHeight()) / 2, 0);
+        seekBar.setMax((max - min) / step);
+
+        seekBar.setRotation(270);
+        seekBar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);
+
+        seekBar.setTranslationX(WpadScale.getWidth(900));
+        seekBar.setTranslationY(WpadScale.getHeight(253));
+
+        getLayout().addView(seekBar);
+    }
+
+
+    /**
+     * SeekBar의 게이지를 설정할때 사용한다.
+     * @param value 설정할 값
+     * **/
+    public void SetSeekBarProgress(int value) {
+        Log.d(TAG, "[SetSeekBarProgress] - value = " + value);
+
+        if (value - min < 0) {
+            Log.d(TAG, "[SetSeekBarProgress] - 000 value < min :" + value + " < " + min);
+            seekBar.setProgress(0);
+        }
+        else {
+            Log.d(TAG, "[SetSeekBarProgress] - !!! value >= min :" + value + " > " + min);
+            seekBar.setProgress(value - min);
+        }
+    }
+
+    // =================================================================================================
+    // [[ DB ]] region
+    // =================================================================================================
+
+    /**
+     * DB 에 저장되어있는 조명 회로 개수를 얻어온다.
+     *
+     * @return (int) - >=0 : 성공, <0 : 실패
+     */
+    private int DB_GetLightCount() {
+        try {
+            WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(getContext());
+            int[] Get_Light_info = wallpadDeviceSet.Get_Light_info();
+            wallpadDeviceSet.closeDB();
+            if (Get_Light_info == null) {
+                Log.w(TAG, "[DB_GetLightCount] Get_Light_info return value is null !!!");
+                return -1;
+            }
+
+            if (Get_Light_info.length < 3) {
+                Log.w(TAG, "[DB_GetLightCount] Get_Light_info return Length 3 under !!! (len:" + Get_Light_info.length + ")");
+                return -2;
+            }
+            int LightCount = Get_Light_info[2];
+
+            return LightCount;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
+            Log.e(TAG, "[DB_GetLightCount] Exception Error");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -100;
+        }
+    }
+
+    // =================================================================================================
+    // [[ Sample ]] region
+    // =================================================================================================
+    public void LoadSampleData_NewLiv() {
+        mData_NewLiv.NewLivingEM.Info.Install = true;
+        mData_NewLiv.NewLivingEM.Info.LightCount = 3;
+        mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Indirect = true;
+        mData_NewLiv.NewLivingEM.Info.LightGroup.Exist_Hallway = true;
+        mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Hallway = true;
+        mData_NewLiv.NewLivingEM.Info.LightGroup.Group_Indirect = true;
+
+        mData_NewLiv.NewLivingEM.Data.setLedLight(mData_NewLiv.NewLivingEM.Info.LightCount);
+        mData_NewLiv.NewLivingEM.Data.LightElecNow = 100;
+        mData_NewLiv.NewLivingEM.Data.LightElecAcc = 200;
+
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Install = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Code.Usage = LEDLIGHT_USAGE_CODE.LIVINGROOM;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.Color = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Info.Support.Dimming = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Dimming = 1;
+        mData_NewLiv.NewLivingEM.Data.LedLight[0].Data.Color = 2;
+
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Install = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Code.Usage = LEDLIGHT_USAGE_CODE.INDIRECT;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.Color = false;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Info.Support.Dimming = false;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.Dimming = 4;
+        mData_NewLiv.NewLivingEM.Data.LedLight[1].Data.Color = 5;
+
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Install = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Code.Usage = LEDLIGHT_USAGE_CODE.HALLWAY;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.Color = false;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Info.Support.Dimming = false;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.OnOff = true;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.Dimming = 7;
+        mData_NewLiv.NewLivingEM.Data.LedLight[2].Data.Color = 8;
+    }
+
+
+    // =================================================================================================
+    // [[ Handler ]] region
+    // =================================================================================================
+
+
+    // =================================================================================================
+    // [[ Handler ]] WallPadInterface
+    // =================================================================================================
+
+}

+ 2341 - 2341
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_venti/VentiMainScreen.java

@@ -1,2341 +1,2341 @@
-/*
- * Copyright (C) 2018 Android WallPad Project
- *
- * FileName  : HeatingV2PopupScreen.java
- * Project   : Android WallPad Project
- * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
- * Author    : Choi In Bo  , inbo207@icontrols.co.kr
- */
-
-
-package kr.co.icontrols.wallpadhomectrl.screen.screen_venti;
-
-import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.WallPadDataMgr.WallpadStatusData;
-import com.artncore.commons.API_Menu;
-import com.artncore.commons.DataClasses;
-import com.artncore.commons.DataClasses.Venti;
-import com.artncore.wallpadapi.VentiAPI;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.artncore.wallpadapi.WallPadDevAPI;
-import com.util.LogUtil;
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Color;
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.RelativeLayout;
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
-import kr.co.icontrols.wallpadhomectrl.R;
-import kr.co.icontrols.wallpadhomectrl.declare.*;
-import kr.co.icontrols.wallpadsupport.*;
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-
-
-/**
- * @description
- * 월패드 [우리집제어->환기] 메인화면 이다.<br>
- * 예약버튼, ON/OFF버튼, 약풍/미풍,강풍 풍량버튼, 타이머좌우 버튼<br>
- * 을(를) 여기서 처리한다.
- */
-@SuppressLint("ViewConstructor")
-public class VentiMainScreen extends WpadScreen {
-	private final String TAG = "VentiMainScreen";
-
-	private final boolean DEBUG_LOG_ON = true;
-	private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
-
-	// =================================================================================================
-	// [[ Declaration ]] region
-	// =================================================================================================
-	// [Image]
-	private WpadImageView Background, BackgroundSub, BackgroundBox, Line1, Line2;
-	private WpadImageView FanImg;
-	private WpadImageView ReservationStatus;
-	private WpadImageView FilterService;
-	//private WpadImageView WindTitle;
-	//private WpadImageView TimerTitle, TimerBlank;
-	private WpadImageView FillterChange;
-	//private WpadImageView ByPassTitle;
-	//private WpadImageView HeaterTitle;
-
-
-	//private WpadImageView AutoDrivingTitle;
-	//private WpadImageView BathRoomTitle;
-
-	// [Button]
-	private WpadImageView ReservationBtn, OnOffBtn, BathRoomBtn;
-	private WpadImageView Wind1Btn, Wind2Btn, Wind3Btn;
-	private WpadImageView TimerLeftBtn, TimerRightBtn;
-	private WpadImageView ByPassBtn;
-	private WpadImageView HeaterBtn;
-	private WpadImageView SleepModeBtn;
-	private WpadImageView AutoDrivingBtn;
-	private WpadImageView InnerCycleBtn;
-	private WpadImageView OutAirCleanBtn;
-
-	// [Text]
-	private WpadTextView TimerText;
-	private WpadTextView HeaterTimeText;
-    private WpadTextView OnOffTitle;
-    private WpadTextView ReservationTitle;
-	private WpadTextView BathRoomTitle;
-
-	private WpadTextView WindTitle;
-	private WpadTextView TimerTitle;
-	private WpadTextView ByPassTitle;
-	private WpadTextView HeaterTitle;
-	private WpadTextView SleepTitle;
-	private WpadTextView AutoDrivingTitle;
-
-	// [Variables]
-	private int OPERATION_MODE = -1;
-	private boolean TEST_BUTTON = false; // 외기청정, 내부순환 테스트용 버튼 임시생성 / 자연,자동,취침 임시용
-	private boolean SAMPLE_MODE_TEST = false; // 샘플모드 플래그 (테스트용)
-
-	private boolean bEasyModeUse = false;
-
-	/** 현산 김용한부장 요청에 따른 전원 예약 버튼 위치 교체 적용 */
-	private boolean UI_CHANGE_2016_01 = true;
-
-	private int mFanAnimImgCutCount = 0;
-
-	private Handler mFanAnimHandler = null;
-
-	private Handler mFilterChangeHandler = null;
-	private boolean mFilterChangeHandlerRun = false;
-
-	private byte mFanAnimStatus = 0;
-	private int [] mFanAnimImg = null;
-
-	private int [] mFanDefaultAnimImg = new int []
-			{ R.drawable.control_venti_wind_0, R.drawable.control_venti_wind_1_b_r, R.drawable.control_venti_wind_2_b_r, R.drawable.control_venti_wind_3_b_r, R.drawable.control_venti_wind_4_b_r };
-	private int [] mFanByPassAnimImg = new int []
-			{ R.drawable.control_venti_wind_0, R.drawable.control_venti_wind_1_b_b, R.drawable.control_venti_wind_2_b_b, R.drawable.control_venti_wind_3_b_b, R.drawable.control_venti_wind_4_b_b };
-
-	private class Data {
-		DataClasses.Venti Status;
-
-		int Type;              // 현산,LH,후드
-
-		int [] TimerTable;
-
-		public Data(int nType) {
-			Status = new DataClasses.Venti();
-			Type = nType;
-			if (Type == API_Menu.SubMenuCtrl.ChangAir_LH) TimerTable = new int [] { 0, 30 , 60 , 90 };
-			else TimerTable = new int [] { 0, 10 , 20 , 30 , 60 , 120 , 180 , 240 };
-		}
-	}
-
-	private Data mData;
-	public String VentiManual_Str = ""; // ByPass:0/Heater:0
-
-	public static boolean bVentiCycleEnable = false;
-	public static int nVentiType = 0;
-
-	// [API]
-	private VentiAPI ventiAPI = null;
-	private TransactionDisplay transactionDisplay = null;
-
-	// =================================================================================================
-	// [[ Create & Close ]] region
-	// =================================================================================================
-	/**
-	 * VentiMainScreen 클래스 생성자
-	 *
-	 * @param context       - 부모 context
-	 * @param layout        - 사용할 main layout
-	 * @param wpapi         - 상속받은 WallPadAPI
-	 * @param operationMode - 동작모드
-	 * @param nMenuId       - APP 시작시 메인에서 전달받은 MunuID (본 값으로 하여 [기본], [후드], [LH] 상태를 변경한다)
-	 */
-	@SuppressLint("HandlerLeak")
-	public VentiMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode, int nMenuId) {
-		super(context, layout);
-
-		Log.i(TAG, "[START - Screen] --------------------------------------------");
-
-		// 1. Data Create
-		DebugLogOutput("[Create] - Step1 : Data Create");
-		OPERATION_MODE = operationMode;
-		mFanAnimImg = mFanDefaultAnimImg;
-		mData = new Data(nMenuId);
-
-		bEasyModeUse = ((MainActivity) context).GetEasyModeUXUse();
-		DebugLogOutput("[Create] - bEasyModeUse [" + bEasyModeUse + "]");
-
-		// 2. Device API Load & Update
-		DebugLogOutput("[Create] - Step2 : Device API Load & Update");
-		if (OPERATION_MODE == Common.MODE_NOMAL) {
-			DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
-			if (Device_ApiLoad(wpapi) >= 0) Device_Update(false);
-		}
-		else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-			DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
-		}
-		else {
-			DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
-			OPERATION_MODE = Common.MODE_NOMAL;
-		}
-
-		// 3. Common - Image & Button Create
-		DebugLogOutput("[Create] - Step3 : Common - Image & Button Create");
-		Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.VentiMainScreenID.image.BACKGROUND);
-		ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
-
-		BackgroundSub = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, 629, 382, R.drawable.control_venti_fan_bgr, 0, ID.VentiMainScreenID.image.BACKGROUND_SUB);
-		ViewRegistration(layout, BackgroundSub, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
-
-		BackgroundBox = new WpadImageView(context, TOUCH_KIND.NONE, 419, 382, R.drawable.control_venti_fan_bgbox, 0, ID.VentiMainScreenID.image.BACKGROUND_BOX);
-		ViewRegistration(layout, BackgroundBox, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(110));
-
-		FanImg = new WpadImageView(context, TOUCH_KIND.NONE, 472, 78, R.drawable.control_venti_wind_4_b_r, 0, ID.VentiMainScreenID.image.FAN);
-		ViewRegistration(layout, FanImg, Common.ImgPosion.GetX(172), Common.ImgPosion.GetY(312));
-
-		ReservationStatus = new WpadImageView(context, TOUCH_KIND.NONE, 419, 48, R.drawable.control_venti_box_alarm_booking, 0, ID.VentiMainScreenID.image.RESERVATION);
-		ViewRegistration(layout, ReservationStatus, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(112));
-
-		/** 환기 케어 서비스 버튼 추가 : SBS */
-		WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
-		if (wpdds.Get_VentiServiceQRUse()) {
-			FilterService = new WpadImageView(context, TOUCH_KIND.BUTTON, 130, 54,
-					new int[] { R.drawable.btn_venti_inqu_normal, R.drawable.btn_venti_inqu_pressed },
-					new int[] { R.drawable.btn_venti_inqu_normal, R.drawable.btn_venti_inqu_pressed },
-					ID.VentiMainScreenID.button.FILLTER_SERVICE);
-			ViewRegistration(layout, FilterService, Common.ImgPosion.GetX(572), Common.ImgPosion.GetY(418));
-		}
-		/** 환기 케어 서비스 버튼 추가 end : SBS */
-
-		Log.e("SBS", " mData.Status.Support.FilterReset : " + mData.Status.Support.FilterReset);
-
-		if (mData.Status.Support.FilterReset) {
-			FillterChange = new WpadImageView(context, TOUCH_KIND.BUTTON, 254, 54,
-					new int[] { R.drawable.control_venti_btn_filter_normal, R.drawable.control_venti_btn_filter_pressed },
-					new int[] { R.drawable.control_venti_btn_filter_normal, R.drawable.control_venti_btn_filter_pressed },
-					ID.VentiMainScreenID.button.FILLTER_CHANGE);
-			ViewRegistration(layout, FillterChange, Common.ImgPosion.GetX(848), Common.ImgPosion.GetY(418));
-			FillterChange.setVisibility(View.INVISIBLE);
-		}
-		else {
-			FillterChange = new WpadImageView(context, TOUCH_KIND.NONE, 419, 48, R.drawable.control_venti_box_alarm_filter, 0, ID.VentiMainScreenID.image.FILLTER_CHANGE);
-			ViewRegistration(layout, FillterChange, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(441));
-			FillterChange.setVisibility(View.INVISIBLE);
-		}
-
-		boolean BathRoomUse = false;
-		if (wpapi != null) {
-			if (ventiAPI != null) {
-				BathRoomUse = ventiAPI.data.Support.BathRoom;
-			}
-		}
-
-
-		if (UI_CHANGE_2016_01) {
-			if (BathRoomUse == false) {
-                OnOffTitle = new WpadTextView(context, false, 129, 54, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.ONOFF_TITLE);
-                ViewRegistration(layout, OnOffTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(228));
-				OnOffTitle.setText("전원");
-
-                ReservationTitle = new WpadTextView(context, false, 150, 50, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.RESERV_TITLE);
-                ViewRegistration(layout, ReservationTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(325));
-				ReservationTitle.setText("예약");
-
-				ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
-                ViewRegistration(layout, ReservationBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(325));
-				ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-
-				OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
-						new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
-						new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
-						ID.VentiMainScreenID.button.ONOFF);
-                ViewRegistration(layout, OnOffBtn, Common.ImgPosion.GetX(976), Common.ImgPosion.GetY(231));
-				OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			}
-			else {
-                OnOffTitle = new WpadTextView(context, false, 129, 54, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.ONOFF_TITLE);
-                ViewRegistration(layout, OnOffTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(186));
-				OnOffTitle.setText("전원");
-
-                ReservationTitle = new WpadTextView(context, false, 150, 50, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.RESERV_TITLE);
-                ViewRegistration(layout, ReservationTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(267));
-				ReservationTitle.setText("예약");
-
-                ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
-                ViewRegistration(layout, ReservationBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(267));
-                ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-
-                OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
-                        new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
-                        new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
-                        ID.VentiMainScreenID.button.ONOFF);
-                ViewRegistration(layout, OnOffBtn, Common.ImgPosion.GetX(976), Common.ImgPosion.GetY(189));
-                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-				//BathRoomTitle = new WpadImageView(context, TOUCH_KIND.NONE, 46, 24, R.drawable.control_venti_typo_exhaust, 0, ID.VentiMainScreenID.image.BATHROOM_TITLE); //전원
-				BathRoomTitle = new WpadTextView(context, false, 129, 54, Gravity.START, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.EXHAUSTION_TITLE);
-				ViewRegistration(layout, BathRoomTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(348));
-
-				BathRoomBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 40, 42,
-						new int[] { R.drawable.but_check_default, R.drawable.but_check_checked },
-						new int[] { R.drawable.but_check_checked, R.drawable.but_check_default },
-						ID.VentiMainScreenID.button.BATHROOM);
-				ViewRegistration(layout, BathRoomBtn, Common.ImgPosion.GetX(993), Common.ImgPosion.GetY(342));
-				BathRoomBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-				WallpadStatusData wd = new WallpadStatusData(this.getContext());
-				String ret = wd.GetWallPADData(WallpadStatusData.VENTI_BATHROOM);
-				if (ret == null) {
-					wd.insertWallPADDB(WallpadStatusData.VENTI_BATHROOM, WallpadStatusData.VENTI_BATHROOM_VALUE_DEFAULT);
-					ret = WallpadStatusData.VENTI_BATHROOM_VALUE_DEFAULT;
-				}
-
-				if (ret.equalsIgnoreCase("true") == true) {
-					BathRoomBtn.setButtonRearImage();
-				}
-				else {
-					BathRoomBtn.setButtonFrontImage();
-				}
-				wd.closeDB();
-			}
-		}
-		else {
-//			ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 144, 50, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
-//			ViewRegistration(layout, ReservationBtn, Common.CtrlMarginLEFT(731), Common.ImgPosion.GetY(195));
-//			ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-//
-//			OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
-//					new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
-//					new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
-//					ID.VentiMainScreenID.button.ONOFF);
-//			ViewRegistration(layout, OnOffBtn, Common.CtrlMarginLEFT(749), Common.ImgPosion.GetY(272));
-//			OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-		}
-
-		// 4. Other - Image & Button Create
-		DebugLogOutput("[Create] - Step4 : Other - Image & Button Create");
-		if (TEST_BUTTON) {
-			//mData.Status.Support.InnerCycle = true; 	// 테스트용 설정
-			//mData.Status.Support.OutAirClean = true;	// 테스트용 설정
-			mData.Status.Support.ByPass = true;
-			mData.Status.Support2.SleepMode = true;
-			mData.Status.Support.AutoDriving = true;
-		}
-
-		if (SAMPLE_MODE_TEST) {
-//			nVentiType = 4; // 테스트용 설정
-		}
-
-		if ((mData.Status.Support.InnerCycle && mData.Status.Support.OutAirClean) || SAMPLE_MODE_TEST) {
-			bVentiCycleEnable = true;
-			InnerCycleBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 98, 54,
-					new int[] { R.drawable.control_venti_btn_innercycle_normal, R.drawable.control_venti_btn_innercycle_pressed},
-					new int[] { R.drawable.control_venti_btn_innercycle_selected, R.drawable.control_venti_btn_innercycle_selected},
-					ID.VentiMainScreenID.button.INNERCYCLE);
-			ViewRegistration(layout, InnerCycleBtn, Common.ImgPosion.GetX(850), Common.ImgPosion.GetY(420));
-			InnerCycleBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-
-			OutAirCleanBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 98, 54,
-					new int[] { R.drawable.control_venti_btn_outairclean_normal, R.drawable.control_venti_btn_outairclean_pressed},
-					new int[] { R.drawable.control_venti_btn_outairclean_selected, R.drawable.control_venti_btn_outairclean_selected},
-					ID.VentiMainScreenID.button.OUTAIRCLEAN);
-			ViewRegistration(layout, OutAirCleanBtn, Common.ImgPosion.GetX(960), Common.ImgPosion.GetY(420));
-			OutAirCleanBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
-		}
-
-		if ((mData.Status.Support.ByPass && mData.Status.Support.Heater && !mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 0)) {
-			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
-			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
-
-			DebugLogOutput("[Create] - Step4 : ByPass , Heater");
-			VentiManual_Str = "ByPass:1/Heater:1"; // ByPass:0/Heater:0
-			nVentiType = 0;
-
-			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
-			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
-			WindTitle.setText("풍량");
-
-			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
-			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
-			TimerTitle.setText("타이머");
-
-			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
-			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
-			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
-			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
-			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
-			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
-			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
-			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
-			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
-			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
-			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
-			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
-
-			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
-			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(543));
-			ByPassTitle.setText("자연환기");
-
-			HeaterTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TITLE);
-			ViewRegistration(layout, HeaterTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
-			HeaterTitle.setText("히터");
-
-			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.BYPASS);
-			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(543));
-			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			HeaterBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed, ID.VentiMainScreenID.button.HEATER);
-			ViewRegistration(layout, HeaterBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
-			HeaterBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
-			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
-		}
-		else if ((mData.Status.Support.ByPass && mData.Status.Support.Heater && mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 1)) {
-			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
-			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
-
-			DebugLogOutput("[Create] - Step4 : ByPass , Heater, Auto");
-			VentiManual_Str = "ByPass:1/Heater:1/Auto:1"; // ByPass:0/Heater:0
-			nVentiType = 1;
-
-			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
-			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
-			WindTitle.setText("풍량");
-
-			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
-			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
-			TimerTitle.setText("타이머");
-
-			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
-			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
-			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
-			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
-			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
-			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
-			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
-			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
-			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
-			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
-			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
-			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
-
-			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
-			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(520));
-			ByPassTitle.setText("자연환기");
-
-			HeaterTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TITLE);
-			ViewRegistration(layout, HeaterTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
-			HeaterTitle.setText("히터");
-
-			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.BYPASS);
-			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(520));
-			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			HeaterBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed, ID.VentiMainScreenID.button.HEATER);
-			ViewRegistration(layout, HeaterBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
-			HeaterBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
-			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
-
-			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
-			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(580));
-			AutoDrivingTitle.setText("자동환기");
-
-			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.AUTODRIVING);
-			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(580));
-			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-		}
-		else if ((mData.Status.Support.ByPass && mData.Status.Support2.SleepMode && mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 2)) {
-			DebugLogOutput("[Create] - Step4 : ByPass, Auto, SleepMode");
-			VentiManual_Str = "ByPass:1/Sleep:1/Auto:1"; // ByPass:0/Heater:0
-			nVentiType = 2;
-
-			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
-			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
-			WindTitle.setText("풍량");
-
-			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
-			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
-			TimerTitle.setText("타이머");
-
-			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
-			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
-			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
-			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
-			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
-			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
-			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
-			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
-			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
-			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
-			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
-			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
-
-			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
-			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(520));
-			ByPassTitle.setText("자연환기");
-
-			SleepTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.SLEEP_TITLE);
-			ViewRegistration(layout, SleepTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
-			SleepTitle.setText("취침모드");
-
-			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.BYPASS);
-			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(520));
-			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			SleepModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.SLEEP);
-			ViewRegistration(layout, SleepModeBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
-			SleepModeBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
-			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
-
-			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
-			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(605));
-			AutoDrivingTitle.setText("자동환기");
-
-			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.AUTODRIVING);
-			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(605));
-			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-		}
-		else if ((mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 3)) {
-			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
-			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
-
-			DebugLogOutput("[Create] - Step4 : AutoDriving");
-			VentiManual_Str = "ByPass:0/Heater:0/Auto:1"; // ByPass:0/Heater:0
-			nVentiType = 3;
-
-			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
-			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
-			WindTitle.setText("풍량");
-
-			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
-			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
-			TimerTitle.setText("타이머");
-
-			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
-			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
-			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
-			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
-			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
-			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
-			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
-			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
-			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
-			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
-			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
-			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
-
-			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
-			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(543));
-			AutoDrivingTitle.setText("자동환기");
-
-			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
-					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
-					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
-					ID.VentiMainScreenID.button.AUTODRIVING);
-			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(543));
-			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-		}
-		else {
-			DebugLogOutput("[Create] - Step4 : Normal");
-			VentiManual_Str = "ByPass:0/Heater:0"; // ByPass:0/Heater:0
-			nVentiType = 4;
-
-			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.START, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
-			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(325), Common.ImgPosion.GetY(543));
-			WindTitle.setText("풍량");
-
-			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
-			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(325), Common.ImgPosion.GetY(697));
-			TimerTitle.setText("타이머");
-
-			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
-			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(546), Common.ImgPosion.GetY(543));
-			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
-			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(685), Common.ImgPosion.GetY(543));
-			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
-			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(824), Common.ImgPosion.GetY(543));
-			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
-			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(546), Common.ImgPosion.GetY(697));
-			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
-			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(873), Common.ImgPosion.GetY(697));
-			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
-
-			TimerText = new WpadTextView(context, false, 232, 44, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
-			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(626), Common.ImgPosion.GetY(697));
-		}
-		Log.d(TAG, "[Create] bVentiCycleEnable [ " + bVentiCycleEnable + "], nVentiType [" + nVentiType + "]");
-
-		// 5. Draw_Update
-		DebugLogOutput("[Create] - Step5 : Draw_Update");
-
-		//     6.1. 환기 에니메이션용 Handler
-		mFanAnimHandler = new Handler()
-		{
-			@SuppressLint("HandlerLeak")
-			@Override
-			public void handleMessage(Message msg)
-			{
-				//Log.d(TAG, "FanAnimHandler - msg.what = " + msg.what);
-
-				if (mData.Status.Support.ByPass && mData.Status.ByPass) {
-					// 자연환기 동작중 에니메이션 이미지 지정
-					mFanAnimImg = mFanByPassAnimImg;
-				}
-				else {
-					// 자연환기 아닐시 에니메이션 기본 이미지 지정
-					mFanAnimImg = mFanDefaultAnimImg;
-				}
-
-				if (msg.what == 1) {
-					if (mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
-					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
-					mFanAnimImgCutCount++;
-					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 400);
-				}
-				else if (msg.what == 2) {
-					if(mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
-					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
-					mFanAnimImgCutCount++;
-					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 300);
-				}
-				else if (msg.what == 3) {
-					if (mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
-					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
-					mFanAnimImgCutCount++;
-					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 200);
-				}
-			}
-		};
-
-		//      6.2. 필터교환 에니메이션용 Handler
-		mFilterChangeHandler = new Handler() {
-			@SuppressLint("HandlerLeak")
-			@Override
-			public void handleMessage(Message msg) {
-				//Log.d(TAG, "FanAnimHandler - msg.what = " + msg.what);
-				if (msg.what == 0) {
-					mFilterChangeHandlerRun = false;
-					FillterChange.setVisibility(View.INVISIBLE);
-				}
-				else if (msg.what == 1) {
-					mFilterChangeHandlerRun = true;
-					if (mData.Status.Support.FilterReset) {
-						if (FillterChange.getVisibility() == View.INVISIBLE) FillterChange.setVisibility(View.VISIBLE);
-						FillterChange.setButtonFrontImage();
-					}
-					else {
-						FillterChange.setVisibility(View.VISIBLE);
-					}
-					mFilterChangeHandler.sendEmptyMessageDelayed(2, 2000);
-				}
-				else if (msg.what == 2) {
-					mFilterChangeHandlerRun = true;
-					if (mData.Status.Support.FilterReset) {
-						FillterChange.setButtonRearImage();
-					}
-					else {
-						FillterChange.setVisibility(View.INVISIBLE);
-					}
-					mFilterChangeHandler.sendEmptyMessageDelayed(1, 1000);
-				}
-			}
-		};
-
-		Draw_Update();
-
-		if (ventiAPI != null) {
-			Device_BrRegistration(true);
-			if (MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) ventiAPI, (WpadScreen) this);
-		}
-
-		// 현산모델에서 안전모드일시 시작과 동시에 알람팝업을 띄움
-		if (Version.getGatewayUsage()) {
-			if (mData.Status.Fault.SafeMode) {
-				Handler PopupHandler = new Handler() {
-					@SuppressLint("HandlerLeak")
-					@Override
-					public void handleMessage(Message msg) {
-						if (msg.what == 0) {
-							// 안전모드 팝업
-							StartAlarmPopup(ID.VentiPopup_Alarm.kind.SafeMode);
-						}
-					}
-				};
-				PopupHandler.sendEmptyMessageDelayed(0, 300);
-			}
-		}
-	}
-
-	/**
-	 * 본 스크린 종료시 호출됨
-	 */
-	@Override
-	protected void onClose() {
-		super.onClose();
-
-		// 등록된 BR 을 해제 한다.
-		if (ventiAPI != null) {
-			Device_BrRegistration(false);
-			if (MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
-		}
-
-		Draw_FanAnim((byte)0x00);
-		mFanAnimHandler = null;
-
-		Log.i(TAG, "[END   - Screen] ********************************************");
-	}
-
-	// =================================================================================================
-	// [[ BroadcastReceiver ]] region
-	// =================================================================================================
-	/**
-	 * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
-	 */
-	@Override
-	protected void onBrReceive(Intent intent) {
-		super.onBrReceive(intent);
-
-		String ActionName = intent.getAction();
-
-		DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
-		if (ActionName.equals(ID.VentiMainScreenID.BR_VENTI)) {
-			DebugLogOutput("onBrReceive - BR_VENTI");
-			Device_Update(false);
-			Draw_Update();
-		}
-	}
-
-	/**
-	 * 팝업 Activity에서 Result 를 전달 받았을시 호출된다.
-	 */
-	@Override
-	protected void onPopupResult(Intent intent) {
-		super.onPopupResult(intent);
-
-		if (intent != null) {
-			int Screen = intent.getIntExtra("SCREEN", -1);
-			if (Screen == ID.screen.VentiPopupAlarmScreen) {
-				int kind = intent.getIntExtra("KIND", -1);
-				boolean ok = intent.getBooleanExtra("OK", false);
-
-				if (ok) {
-					if (kind == ID.VentiPopup_Alarm.kind.ReservationClear) {
-						if (OPERATION_MODE == Common.MODE_NOMAL) {
-							Device_ReserveCont(false);
-						}
-						else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-							Sample_ReservationOnOff(false);
-						}
-					}
-					else if (kind == ID.VentiPopup_Alarm.kind.HeaterOn) {
-						if (OPERATION_MODE == Common.MODE_NOMAL) {
-							Device_SetHeater(true);
-						}
-					}
-					else if (kind == ID.VentiPopup_Alarm.kind.FilterReset) {
-						if (OPERATION_MODE == Common.MODE_NOMAL) {
-							Device_SetFilterReset();
-						}
-					}
-					else if (kind == ID.VentiPopup_Alarm.kind.SafeMode) {
-
-					}
-					else if (kind == ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn) {
-						if (OPERATION_MODE == Common.MODE_NOMAL) {
-							Device_SetAutoDriving(true);
-						}
-					}
-				}
-			}
-			else if (Screen == ID.screen.VentiPopupReservationScreen) {
-				if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					boolean Reservation = intent.getBooleanExtra("Reservation", false);
-					Sample_ReservationOnOff(Reservation);
-				}
-			}
-		}
-	}
-
-	// =================================================================================================
-	// [[ Touch & Key Event ]] region
-	// =================================================================================================
-	/**
-	 * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
-	 */
-	@Override
-	protected void onTouchEvent(View v, MotionEvent event) {
-		super.onTouchEvent(v, event);
-
-		int TargetId = v.getId();
-		int MoveEvent = event.getAction();
-
-		Log.e(TAG, "[onTouchEvent] MoveEvent [" + MoveEvent + "], TargetId [" + TargetId + "]");
-
-		if (MoveEvent == MotionEvent.ACTION_UP) {
-			if (TargetId == ID.VentiMainScreenID.button.RESERVATION_SET) {
-				// 예약
-				DebugLogOutput("onTouchEvent [RESERVATION_SET] BUTTON !!!");
-
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupReservationScreen);
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Intent intent = new Intent();
-					intent.putExtra("Reservation", mData.Status.Reservation);
-					((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupReservationScreen, intent);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.ONOFF) {
-				// ON/OFF
-				DebugLogOutput("onTouchEvent [ONOFF] BUTTON !!!");
-
-				if (Version.getGatewayUsage()) {
-					if (mData.Status.Fault.SafeMode) {
-						// 안전모드 팝업
-						StartAlarmPopup(ID.VentiPopup_Alarm.kind.SafeMode);
-						return;
-					}
-				}
-
-				if (mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					boolean OnOff = false;
-					if (!mData.Status.OnOff) OnOff = true;
-
-					int ret = Device_SetOnOff(OnOff);
-					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_PowerOnOff();
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			else if ((TargetId >= ID.VentiMainScreenID.button.WIND_1) && (TargetId <= ID.VentiMainScreenID.button.WIND_3)) {
-				// 풍량변경 [약풍 , 미풍 , 강풍]
-				int index = TargetId - ID.VentiMainScreenID.button.WIND_1;
-				DebugLogOutput("onTouchEvent [WIND_" + (index+1) + "] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) {
-					return;
-				}
-
-				// 예약중 체크
-				if (mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				// 동일한 풍량을 눌렀을 경우
-				if (mData.Status.Wind == (byte)(index + 1)) {
-					return;
-				}
-
-				byte Wind = (byte)(index + 1);
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					int ret = Device_WindCont(Wind);
-					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_WindCont(Wind);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			else if ((TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) || (TargetId == ID.VentiMainScreenID.button.TIMER_RIGHT)) {
-				// 타이머 변경 [좌 , 우]
-				if (TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) DebugLogOutput("onTouchEvent [TIMER_LEFT] BUTTON !!!");
-				else DebugLogOutput("onTouchEvent [TIMER_RIGHT] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) return;
-
-				// 예약중 체크
-				if (mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					mData.Status.Timer = getNextTimerValue(TargetId);
-					int ret = Device_TimerCont(mData.Status.Timer);
-					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_TimerCont(TargetId);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.BYPASS) {
-				// 자연환기
-				DebugLogOutput("onTouchEvent [BYPASS] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) return;
-
-				if (mData.Status.Support2.WindowVenti && mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				boolean OnOff = false;
-				if (!mData.Status.ByPass) OnOff = true;
-
-				int ret = Device_SetByPass(OnOff);
-				if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-				else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.HEATER) {
-				// 히터
-				DebugLogOutput("onTouchEvent [HEATER] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) return;
-
-				if (mData.Status.HeaterStatus == Venti.HEATER.OFF) {
-					// 히터알람 팝업
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.HeaterOn);
-				}
-				else {
-					int ret = Device_SetHeater(false);
-					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.FILLTER_CHANGE) {
-				DebugLogOutput("onTouchEvent [FILLTER_CHANGE] BUTTON !!!");
-
-				if (mData.Status.Support.FilterReset) {
-					// 필터교환 팝업
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.AUTODRIVING) {
-				// 자동환기
-				DebugLogOutput("onTouchEvent [AUTODRIVING] BUTTON !!!");
-
-				// 예약운전 OFF, 타이머 OFF  체크
-				if (mData.Status.Reservation) {
-					if (mData.Status.Support2.WindowVenti) {
-						// 예약중입니다 팝업 알람
-						StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-						return;
-					}
-					else {
-						return;
-					}
-				}
-
-				if (mData.Status.Timer != 0) return;
-
-				if (mData.Status.AutoDriving == false) {
-					// 자동운전 알림 팝업
-					if (mData.Status.Support2.WindowVenti) {
-						// 창호 환기 - 자동모드(하이브리드)
-						// 자동모드 설정 팝업 생성 안하고 바로 제어
-						int ret = Device_SetAutoDriving(true);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-					else {
-						// 일반 전열교환기(일반 환기장비)
-						StartAlarmPopup(ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn);
-					}
-				}
-				else {
-					int ret = Device_SetAutoDriving(false);
-					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.BATHROOM) {
-				//욕실 배기
-				DebugLogOutput("onTouchEvent [BATHROOM] BUTTON !!!");
-
-				// 9. 욕실 배기
-				if (mData.Status.Support.BathRoom) {
-					WallpadStatusData wd = new WallpadStatusData(this.getContext());
-					String ret = wd.GetWallPADData(WallpadStatusData.VENTI_BATHROOM);
-
-					if (ret.equalsIgnoreCase("true") == true) {
-						wd.UpdateWallPADData(WallpadStatusData.VENTI_BATHROOM, "false");
-						BathRoomBtn.setButtonFrontImage();
-					}
-					else {
-						wd.UpdateWallPADData(WallpadStatusData.VENTI_BATHROOM, "true");
-						BathRoomBtn.setButtonRearImage();
-					}
-					wd.closeDB();
-
-					if (mData.Status.OnOff == true) {
-						//제어
-						int ret2 = Device_SetOnOff(mData.Status.OnOff);
-						if (ret2 >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-					else {
-						Sound().Play(SND.effect.TOUCH_LATCHED);
-					}
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.INNERCYCLE) {
-				// 내부순환
-				DebugLogOutput("onTouchEvent [INNERCYCLE] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) {
-					return;
-				}
-
-				// 예약중 체크
-				if (mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					if (mData.Status.InnerCycle) {
-						// 사용중일때 눌림 : On -> Off
-						int ret = Device_SetInnerCycle(false);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-					else {
-						// Off -> On
-						int ret = Device_SetInnerCycle(true);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_InnerCycle(!mData.Status.InnerCycle);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.OUTAIRCLEAN) {
-				// 내부순환
-				DebugLogOutput("onTouchEvent [OUTAIRCLEAN] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) {
-					return;
-				}
-
-				// 예약중 체크
-				if (mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					if (mData.Status.OutAirClean) {
-						// 사용중일때 눌림 : On -> Off
-						int ret = Device_SetOutAirClean(false);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-					else {
-						// Off -> On
-						int ret = Device_SetOutAirClean(true);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					Sample_OutAirClean(!mData.Status.OutAirClean);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			else if (TargetId == ID.VentiMainScreenID.button.SLEEP) {
-				// 취침 모드
-				DebugLogOutput("onTouchEvent [SLEEP] BUTTON !!!");
-
-				// 전원 OFF 체크
-				if (!mData.Status.OnOff) {
-					return;
-				}
-
-				if (mData.Status.Support2.WindowVenti && mData.Status.Reservation) {
-					// 예약중입니다 팝업 알람
-					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
-					return;
-				}
-
-				if (OPERATION_MODE == Common.MODE_NOMAL) {
-					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) {
-						// 사용중일때 눌림 : On -> Off
-						int ret = Device_SetSleepMode(false);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-					else {
-						// Off -> On
-						int ret = Device_SetSleepMode(true);
-						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
-						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
-					}
-				}
-				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-					boolean onoff = false;
-					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) onoff = true;
-					Sample_SleepMode(onoff);
-					Sound().Play(SND.effect.TOUCH_LATCHED);
-				}
-			}
-			/**
-			* 환기케어서비스 버튼
-			* @author 신범식
-			* @since
-			**/
-			else if (TargetId == ID.VentiMainScreenID.button.FILLTER_SERVICE) {
-				//StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterService);
-
-				// 환기 케어 서비스
-				DebugLogOutput("onTouchEvent [FILLTER_SERVICE] BUTTON !!!");
-
-				Sound().Play(SND.effect.TOUCH_LATCHED);
-
-				((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupServiceScreen);
-			}
-		}
-		else if (MoveEvent == MotionEvent.ACTION_POINTER_DOWN) {
-			Log.e(TAG, "[onTouchEvent] ===== jeff 1 =====");
-			if (TargetId == ID.VentiMainScreenID.image.BACKGROUND_SUB) {
-				Log.e(TAG, "[onTouchEvent] mData.Status.Support.FilterReset = " + mData.Status.Support.FilterReset);
-				// 필터교환 팝업 히든 버튼 (환기케어 서비스 담당자용)
-				StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
-//				if (mData.Status.Support.FilterReset) {
-//					// 필터교환 팝업
-//					StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
-//				}
-			}
-		}
-	}
-
-	/**
-	 * 알람팝업을 실행시킨다.
-	 *
-	 * @param kind - (int) 팝업 종류 : 예약중       ID.VentiPopup_Alarm.kind.ReservationClear<br>
-	 *                                히터 알람  ID.VentiPopup_Alarm.kind.HeaterOn<br>
-	 *                                필터교환   ID.VentiPopup_Alarm.kind.FilterReset<br>
-	 *                                안전모드   ID.VentiPopup_Alarm.kind.SafeMode<br>
-	 *
-	 * @return (boolean) true : 성공, false : 실패
-	 */
-	private boolean StartAlarmPopup(int kind) {
-		boolean bRet = false;
-		Intent data = null;
-		if (kind == ID.VentiPopup_Alarm.kind.ReservationClear) {
-			// 예약중입니다 팝업 알람
-			data = new Intent();
-			data.putExtra("KIND", kind);
-			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
-			data.putExtra("TEXT1", "예약기능이 동작중입니다.");
-			data.putExtra("TEXT2", "환기예약을 정지 하시겠습니까?");
-			data.putExtra("BTN_COUNT", 2);
-		}
-		else if (kind == ID.VentiPopup_Alarm.kind.HeaterOn) {
-			// 히터알람 팝업
-			data = new Intent();
-			data.putExtra("KIND", kind);
-			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
-			data.putExtra("TEXT1", "히터 기능 선택시 시간당 약 400Wh 의");
-			data.putExtra("TEXT2", "전기 요금이 추가 됩니다.");
-			data.putExtra("BTN_COUNT", 2);
-		}
-		else if (kind == ID.VentiPopup_Alarm.kind.FilterReset) {
-			// 필터교환 팝업
-			WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
-			if (wpdds.Get_VentiServiceQRUse()) {
-				// 신규
-				data = new Intent();
-				data.putExtra("KIND", kind);
-				data.putExtra("IMAGE_ID", R.drawable.control_venti_popup_qr);
-				data.putExtra("TEXT1", "필터교체 시기가 되었습니다.");
-				data.putExtra("TEXT2", "이를 초기화 시키겠습니까?");
-				data.putExtra("TEXT3", "환기 케어 서비스(필터교환)");
-				data.putExtra("TEXT4", "1811-2770");
-				data.putExtra("BTN_COUNT", 2);
-				data.putExtra("EXTEND_TYPE", "Y");
-			}
-			else {
-				// 기존
-				data = new Intent();
-				data.putExtra("KIND", kind);
-				data.putExtra("IMAGE_ID", R.drawable.control_venti_popup_image);
-				data.putExtra("TEXT1", "필터교체 시기가 되었습니다.");
-				data.putExtra("TEXT2", "이를 초기화 시키겠습니까?");
-				data.putExtra("BTN_COUNT", 2);
-			}
-		}
-		else if (kind == ID.VentiPopup_Alarm.kind.SafeMode) {
-			// 안전모드 팝업
-			data = new Intent();
-			data.putExtra("KIND", kind);
-			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
-			data.putExtra("TEXT1", "영하 -10℃ 이하에서는 장비 손상의");
-			data.putExtra("TEXT2", "우려가 있어 구동을 멈춥니다.");
-			data.putExtra("BTN_COUNT", 1);
-		}
-		else if (kind == ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn) {
-			// 자동운전 팝업 (ON)
-			data = new Intent();
-			data.putExtra("KIND", kind);
-			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
-			data.putExtra("TEXT1", "실내의 공기오염정도에 따라 자동운전되며");
-			data.putExtra("TEXT2", "24시간후 자동 OFF 됩니다.");
-			data.putExtra("BTN_COUNT", 2);
-		}
-		else {
-			Log.w(TAG, "[StartAlarmPopup] Param : kind - Out Of Range !!! (kind:" + kind + ")");
-			return false;
-		}
-
-		if (data != null) {
-			bRet = ((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupAlarmScreen, data);
-			if (bRet) Sound().Play(SND.effect.WARNING005);
-			else Log.w(TAG, "[StartAlarmPopup] StartPopup return false !!!");
-		}
-		return bRet;
-	}
-
-	// =================================================================================================
-	// [[ Draw ]] region
-	// =================================================================================================
-	/**
-	 * 변경되는 이미지를 다시 그린다.
-	 */
-	private void Draw_Update() {
-		try {
-			// 1. 예약중 표시
-			if (mData.Status.Reservation) Draw_Reservation(true);
-			else Draw_Reservation(false);
-
-			// 2. 전원 ON/OFF
-			if (mData.Status.OnOff) Draw_Power(true);
-			else Draw_Power(false);
-
-			// 3. 풍량
-			if (mData.Status.OnOff) {
-				Draw_Wind(mData.Status.Wind);
-				Draw_FanAnim(mData.Status.Wind);
-			}
-			else {
-				Draw_Wind((byte)0x00);
-				Draw_FanAnim((byte)0x00);
-			}
-
-			// 4. 타이머
-			Draw_Timer(mData.Status.Timer);
-
-			// 5. 필터교환
-			if (mData.Status.Fault.FilterChangeMedium || mData.Status.Fault.FilterChangeFree) {
-				if (!mFilterChangeHandlerRun) {
-					mFilterChangeHandler.sendEmptyMessage(1);
-				}
-			}
-			else {
-				if (mFilterChangeHandlerRun) {
-					mFilterChangeHandler.removeMessages(1);
-					mFilterChangeHandler.removeMessages(2);
-					mFilterChangeHandler.sendEmptyMessage(0);
-				}
-			}
-
-			// 6. 자연환기
-			if (mData.Status.Support.ByPass && ByPassBtn!=null) {
-				if (mData.Status.OnOff) {
-					ByPassBtn.setButtonEventOffDisable();
-					if (mData.Status.ByPass) {
-						ByPassBtn.setButtonRearImage();
-					}
-					else {
-						ByPassBtn.setButtonFrontImage();
-					}
-				}
-				else {
-					ByPassBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
-				}
-			}
-
-			// 7. 히터
-			if (mData.Status.Support.Heater) {
-				if (mData.Status.ByPass) {
-					if(HeaterBtn!=null)
-						HeaterBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_disable);    // Disable
-					if(HeaterTimeText!=null)
-						HeaterTimeText.setText("");
-				}
-				else {
-					if (mData.Status.OnOff) {
-						if(HeaterBtn!=null)
-							HeaterBtn.setButtonEventOffDisable();
-
-						int nDefaultImageID = 0;
-						int nPressedImageID = 0;
-						if (mData.Status.HeaterStatus == Venti.HEATER.OFF) {
-							nDefaultImageID = R.drawable.control_venti_btn_off_normal;
-							nPressedImageID = R.drawable.control_venti_btn_off_pressed;
-							if(HeaterTimeText!=null)
-								HeaterTimeText.setText("");
-						}
-						else if (mData.Status.HeaterStatus == Venti.HEATER.STAND_BY) {
-							nDefaultImageID = R.drawable.control_venti_btn_prepare_normal;
-							nPressedImageID = R.drawable.control_venti_btn_prepare_pressed;
-							if(HeaterTimeText!=null)
-								HeaterTimeText.setText("");
-						}
-						else if (mData.Status.HeaterStatus == Venti.HEATER.ON) {
-							nDefaultImageID = R.drawable.control_venti_btn_on_red_normal;
-							nPressedImageID = R.drawable.control_venti_btn_on_red_pressed;
-							if(HeaterTimeText!=null)
-								HeaterTimeText.setText(mData.Status.HeaterTimeRemaining + "분");
-						}
-						if(HeaterBtn!=null)
-							HeaterBtn.setImageChange(nDefaultImageID, nPressedImageID);
-					}
-					else {
-						if(HeaterBtn!=null)
-							HeaterBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
-						if(HeaterTimeText!=null)
-							HeaterTimeText.setText("");
-					}
-				}
-			}
-
-			// 8. 자동운전
-			if (mData.Status.Support.AutoDriving && AutoDrivingBtn!=null) {
-				// [예약운전 & 창호환기 아닌경우] 또는 [타이머운전] 또는 [운전OFF중에 자동운전OFF일시] 자동운전 비활성화
-				if ((mData.Status.Reservation && !mData.Status.Support2.WindowVenti) || (mData.Status.Timer != 0) || (!mData.Status.OnOff && !mData.Status.AutoDriving)) {
-					AutoDrivingBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
-				}
-
-				// 아닐시
-				// [타이머:OFF] [예약운전:OFF] [운전:ON]  [자동운전:OFF] - 켜기 활성화
-				//
-				// [타이머:OFF] [예약운전:OFF] [운전:OFF] [자동운전:ON ] - 끄기 활성화
-				// [타이머:OFF] [예약운전:OFF] [운전:ON ] [자동운전:ON ] - 끄기 활성화
-				else {
-					AutoDrivingBtn.setButtonEventOffDisable();
-					if (mData.Status.AutoDriving) {
-						// 끄기 활성화
-						AutoDrivingBtn.setButtonRearImage();
-					}
-					else {
-						// 켜기 활성화
-						AutoDrivingBtn.setButtonFrontImage();
-					}
-				}
-			}
-
-			// 9. 내부순환
-			if (mData.Status.Support.InnerCycle && InnerCycleBtn!=null) {
-				if (mData.Status.OnOff) {
-					InnerCycleBtn.setButtonEventOffDisable();
-					if (mData.Status.InnerCycle) {
-						InnerCycleBtn.setButtonRearImage();
-					}
-					else {
-						InnerCycleBtn.setButtonFrontImage();
-					}
-				}
-				else {
-					InnerCycleBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_innercycle_disabled);    // Disable
-				}
-				Log.d(TAG, "[Draw_Update] InnerCycle [" + mData.Status.InnerCycle + "]");
-			}
-
-			// 10. 외기청정
-			if (mData.Status.Support.OutAirClean && OutAirCleanBtn!=null) {
-				if (mData.Status.OnOff) {
-					OutAirCleanBtn.setButtonEventOffDisable();
-					if (mData.Status.OutAirClean) {
-						OutAirCleanBtn.setButtonRearImage();
-					}
-					else {
-						OutAirCleanBtn.setButtonFrontImage();
-					}
-				}
-				else {
-					OutAirCleanBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_outairclean_disabled);    // Disable
-				}
-				Log.d(TAG, "[Draw_Update] OutAirClean [" + mData.Status.OutAirClean + "]");
-			}
-
-			// 11. 취침 모드
-			if (mData.Status.Support2.SleepMode && SleepModeBtn!=null) {
-				if (mData.Status.OnOff) {
-					SleepModeBtn.setButtonEventOffDisable();
-					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) {
-						SleepModeBtn.setButtonRearImage();
-					}
-					else {
-						SleepModeBtn.setButtonFrontImage();
-					}
-				}
-				else {
-					SleepModeBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
-				}
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-        }
-		catch (Exception ex) {
-			Log.e(TAG, "[Draw_Update] Exception !!!");
-			//ex.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, ex);
-		}
-	}
-
-	/**
-	 * 풍량에 따른 환기 에니메이션 효과 적용
-	 *
-	 * @param nWind - 변경할 풍량 (VentiAPI.WIND.LOW, VentiAPI.WIND.MID, VentiAPI.WIND.HI)
-	 */
-	private void Draw_FanAnim(byte nWind) {
-		if (mFanAnimStatus == nWind) return;
-
-		if ((nWind == VentiAPI.WIND.LOW) || (nWind == VentiAPI.WIND.MID) || (nWind == VentiAPI.WIND.HI)) {
-			if (mFanAnimHandler == null) return;
-			mFanAnimStatus = nWind;
-			mFanAnimHandler.removeMessages(1);
-			mFanAnimHandler.removeMessages(2);
-			mFanAnimHandler.removeMessages(3);
-			mFanAnimImgCutCount = 0;
-			mFanAnimHandler.sendEmptyMessage(nWind);
-		}
-		else {
-			mFanAnimStatus = 0x00;
-			mFanAnimHandler.removeMessages(1);
-			mFanAnimHandler.removeMessages(2);
-			mFanAnimHandler.removeMessages(3);
-			mFanAnimImg = mFanDefaultAnimImg;
-			if(FanImg!=null)
-				FanImg.setImageResource(mFanAnimImg[4]);
-		}
-	}
-
-	/**
-	 * 예약중 표시 활성화 / 비활성화
-	 *
-	 * @param OnOff - true : [예약중] 보이기, false : [예약중] 숨기기
-	 */
-	private void Draw_Reservation(boolean OnOff) {
-		if(ReservationStatus!=null)
-		{
-			if (OnOff) ReservationStatus.setVisibility(View.VISIBLE);
-			else ReservationStatus.setVisibility(View.INVISIBLE);
-		}
-
-	}
-
-	/**
-	 * 전원버튼 ON/OFF 이미지 교체
-	 *
-	 * @param OnOff - true : ON, false : OFF
-	 */
-	private void Draw_Power(boolean OnOff) {
-		if(OnOffBtn!=null)
-		{
-			if (OnOff) OnOffBtn.setButtonRearImage();
-			else OnOffBtn.setButtonFrontImage();
-		}
-
-	}
-
-	/**
-	 * 풍량버튼 이미지 교체
-	 *
-	 * @param nWind - 변경할 풍량 (VentiAPI.WIND.LOW, VentiAPI.WIND.MID, VentiAPI.WIND.HI)
-	 */
-	private void Draw_Wind(byte nWind) {
-		if (nWind == VentiAPI.WIND.LOW) {
-			if(Wind1Btn!=null)
-				Wind1Btn.setImageResource(Wind1Btn.getPressedImageID());
-			if(Wind2Btn!=null)
-				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
-			if(Wind3Btn!=null)
-				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
-		}
-		else if (nWind == VentiAPI.WIND.MID) {
-			if(Wind1Btn!=null)
-				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
-			if(Wind2Btn!=null)
-				Wind2Btn.setImageResource(Wind2Btn.getPressedImageID());
-			if(Wind3Btn!=null)
-				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
-		}
-		else if (nWind == VentiAPI.WIND.HI) {
-			if(Wind1Btn!=null)
-				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
-			if(Wind2Btn!=null)
-				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
-			if(Wind3Btn!=null)
-				Wind3Btn.setImageResource(Wind3Btn.getPressedImageID());
-		}
-		else {
-			if(Wind1Btn!=null)
-				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
-			if(Wind2Btn!=null)
-				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
-			if(Wind3Btn!=null)
-				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
-		}
-	}
-
-	/**
-	 * 타이머 시간 표시 변경
-	 *
-	 * @param nTimer - 변경할 시간값
-	 */
-	private void Draw_Timer(int nTimer) {
-		String TimerStr = new String();
-		if (!mData.Status.OnOff) {
-
-		}
-		else if (nTimer == 0x00) {
-			TimerStr = "계속";
-		}
-		else {
-			int timer = nTimer;
-			int Hour = timer / 60;
-			if (Hour == 0) TimerStr = timer + " 분";
-			else {
-				int Minute = timer - (Hour * 60);
-				if (Minute == 0) TimerStr = Hour + " 시간";
-				else TimerStr = Hour + " 시간" + "   " + Minute + " 분";
-			}
-		}
-		if(TimerText!=null)
-			TimerText.setText(TimerStr);
-	}
-
-	/**
-	 * 타이머설정 버튼 좌우가 눌렸을 경우 타이머 값을 가져온다.
-	 *
-	 * @param TargetId - 눌린버튼 LEFT or RIGHT (ID.ventimain.button.TIMER_LEFT, ID.ventimain.button.TIMER_RIGHT)
-	 * @return (int) 타이머값
-	 */
-	private int getNextTimerValue(int TargetId) {
-		if (mData.TimerTable == null) return 0;
-		int retTimer = mData.Status.Timer;
-		if (TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) {
-			int FindIndex = mData.TimerTable.length-1;
-			if (retTimer != mData.TimerTable[0]) {
-				for (int i = 0; i < mData.TimerTable.length; i--) {
-					if (retTimer > mData.TimerTable[FindIndex]) break;
-					FindIndex--;
-				}
-			}
-			retTimer = mData.TimerTable[FindIndex];
-		}
-		else if (TargetId == ID.VentiMainScreenID.button.TIMER_RIGHT) {
-			int FindIndex = 0;
-			if (retTimer < mData.TimerTable[mData.TimerTable.length-1]) {
-				for (int i=0; i < mData.TimerTable.length; i++) {
-					if (retTimer < mData.TimerTable[FindIndex]) break;
-					FindIndex++;
-				}
-			}
-			retTimer = mData.TimerTable[FindIndex];
-		}
-		return retTimer;
-	}
-
-
-	// =================================================================================================
-	// [[ Device ]] region
-	// =================================================================================================
-	/**
-	 * 디바이스 API 를 Load 한다.
-	 *
-	 * @param wpapi - 생성시 전달받은 WallPadAPI
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_ApiLoad(WallPadAPI wpapi) {
-		// 1. Mode Check
-		if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
-
-		DebugLogOutput("[Device_ApiLoad] - Start");
-
-		// 2. wpapi Check
-		if (wpapi == null) {
-			Log.e(TAG, "[Device_ApiLoad] - wpapi is null");
-			return -2;
-		}
-
-		// 3. Load API
-		DebugLogOutput("[Device_ApiLoad] - Step1 : Vanti API Load...");
-		try {
-			ventiAPI = wpapi.Get_VentiController();
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_VentiController");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_ApiLoad] - ventiAPI is null");
-			return -4;
-		}
-
-		DebugLogOutput("[Device_ApiLoad] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 디바이스에 알림 BR 을 등록한다. (에너지미터)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_BrRegistration(boolean OnOff) {
-		DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
-		String BR_NAME = ID.VentiMainScreenID.BR_VENTI;
-
-		// 1. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_BrRegistration] - ventiAPI unload !!!");
-			return -1;
-		}
-
-		if (OnOff) {
-			try {
-				//DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
-				ventiAPI.regChangedBR(BR_NAME);
-				//DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
-			} catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-				return -101;
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] ventiAPI.regChangedBR");
-				//e.printStackTrace();
-            	LogUtil.errorLogInfo("", TAG, e);
-				return -101;
-			}
-			super.addBrActionFilter(BR_NAME);
-		}
-		else {
-			try {
-				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
-				ventiAPI.unregChangedBR(BR_NAME);
-				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
-			} catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-				return -102;
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] ventiAPI.unregChangedBR");
-				//e.printStackTrace();
-            	LogUtil.errorLogInfo("", TAG, e);
-				return -102;
-			}
-			super.removeBrActionFilter(BR_NAME);
-		}
-		return 0;
-	}
-
-	/**
-	 * 제어기 상태를 가져온다.
-	 *
-	 * @param real - (boolean) true : 실시간 , false : 가장최근
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_Update(boolean real) {
-		DebugLogOutput("[Device_Update] - Start   (real : " + real + ")");
-
-		// 1. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_Update] - ventiAPI unload !!!");
-			return -1;
-		}
-
-		// 2. reflash
-		try {
-			int ret = ventiAPI.Refresh(real);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_Update] refresh - ret (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -2;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_Update] - [Exception Error] ventiAPI.Refresh(" + real + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		// 3. Data Copy
-		mData.Status = ventiAPI.data;
-
-
-//		mData.Status.Fault.FaultByte |= (byte) 0x01;
-//		mData.Status.Fault.FilterChangeFree = true;
-
-//		mData.Status.Fault.FaultByte |= (byte) 0x02;
-//		mData.Status.Fault.FilterChangeMedium = true;
-//
-//		mData.Status.Fault.FaultByte |= (byte) 0x04;
-//		mData.Status.Fault.MotorError = true;
-//
-//		mData.Status.Fault.FaultByte |= (byte) 0x08;
-//		mData.Status.Fault.MotorError = true;
-//
-//		mData.Status.Fault.FaultByte |= (byte) 0x10;
-//		mData.Status.Fault.SafeMode = true;
-//
-//		mData.Status.Fault.FaultByte |= (byte) 0x20;
-//		mData.Status.Fault.SupplyFanError = true;
-//
-//		mData.Status.Fault.FaultByte |= (byte) 0x40;
-//		mData.Status.Fault.TempSensorError = true;
-
-//		mData.Status.Fault.FilterChangeFree = true;
-//		mData.Status.Fault.FilterChangeMedium = true;
-//		mData.Status.Fault.MotorError = true;
-//		mData.Status.Fault.TempSensorError = true;
-//		mData.Status.Fault.SafeMode = true;
-//		mData.Status.Fault.SupplyFanError = true;
-//		mData.Status.Fault.TempSensorError = true;
-
-		// 4. Debug Msg
-		DebugLogOutput(mData.Status.ToDebugString());
-
-		DebugLogOutput("[Device_Update] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 운전모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetOnOff(boolean OnOff) {
-		DebugLogOutput("[Device_SetOnOff] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetOnOff] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetOnOff(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetOnOff] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetOnOff] - [Exception Error] ventiAPI.SetOnOff(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetOnOff] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환풍기 예약 운전 동작을 제어한다.
-	 *
-	 * @param OnOff - 변경할 예약상태 (true : 시작, false : 정지)
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_ReserveCont(boolean OnOff) {
-		DebugLogOutput("[Device_ReserveCont] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_ReserveCont] - ventilationApi unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetReservationOnOff(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_ReserveCont] SetReservationOnOff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_ReserveCont] - [Exception Error] ventiAPI.SetReservationOnOff(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_ReserveCont] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 풍량을 변경한다.
-	 *
-	 * @param Wind - 변경할 풍량 (VentiAPI.WIND.LOW , VentiAPI.WIND.MID, VentiAPI.WIND.HI)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_WindCont(byte Wind) {
-		DebugLogOutput("[Device_WindCont] - Start   (Wind : " + String.format("[%02x]", Wind) + ")");
-
-		// 1. Param Check
-		if (!DataClasses.Venti.WIND.CheckRange(Wind)) {
-			Log.e(TAG, "[Device_WindCont] - Wind Param  Out of range!!! (" + String.format("[%02x]", Wind) + ")");
-			return -2;
-		}
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_WindCont] - ventiAPI unload !!!");
-			return -3;
-		}
-
-		// 3. Control
-		try {
-			int ret = ventiAPI.SetWind(Wind);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_WindCont] SetWind - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -4;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_WindCont] - [Exception Error] ventiAPI.SetWind");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_WindChange] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 타이머를 변경한다.
-	 *
-	 * @param Timer - 변경할 타이머값
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_TimerCont(int Timer) {
-		DebugLogOutput("[Device_TimerCont] - Start   (Timer : " + Timer + ")");
-
-		// 1. Param Check
-		if ((Timer < 0) || (Timer > 240)) {
-			Log.e(TAG, "[Device_TimerCont] - Timer Param  Out of range!!! (" + Timer + ")");
-			return -1;
-		}
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_TimerCont] - ventiAPI unload !!!");
-			return -3;
-		}
-
-		// 3. Control
-		try {
-			int ret = ventiAPI.SetTimer(Timer);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_TimerCont] SetTimer - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -4;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_TimerCont] - [Exception Error] ventiAPI.SetTimer");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_TimerCont] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 자연환기 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetByPass(boolean OnOff) {
-		DebugLogOutput("[Device_SetByPass] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetByPass] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetByPass(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetByPass] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetByPass] - [Exception Error] ventiAPI.SetByPass(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetByPass] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 히터 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetHeater(boolean OnOff) {
-		DebugLogOutput("[Device_SetHeater] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetHeater] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetHeater(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetHeater] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetHeater] - [Exception Error] ventiAPI.SetHeater(" + OnOff + ")");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetHeater] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 필터교환을 리셋한다.
-	 *
-	 * param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetFilterReset() {
-		DebugLogOutput("[Device_SetFilterReset] - Start");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetFilterReset] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetFilterReset();
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetFilterReset] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetFilterReset] - [Exception Error] ventiAPI.SetFilterReset()");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetFilterReset] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 자동환기 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetAutoDriving(boolean OnOff) {
-		DebugLogOutput("[Device_SetAutoDriving] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetAutoDriving] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetAutoDriving(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetAutoDriving] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetAutoDriving] - [Exception Error] ventiAPI.SetAutoDriving(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetAutoDriving] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 내부순환 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetInnerCycle(boolean OnOff) {
-		DebugLogOutput("[Device_SetInnerCycle] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetInnerCycle] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetInnerCycle(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetInnerCycle] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetInnerCycle] - [Exception Error] ventiAPI.SetInnerCycle(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetInnerCycle] - OK");
-
-		return 0;
-	}
-
-	/**
-	 * 환기의 외기청정 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetOutAirClean(boolean OnOff) {
-		DebugLogOutput("[Device_SetOutAirClean] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetOutAirClean] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetOutAirClean(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetOutAirClean] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetOutAirClean] - [Exception Error] ventiAPI.SetOutAirClean(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetOutAirClean] - OK");
-
-		return 0;
-	}
-	/**
-	 * 환기의 취침 모드를 변경한다.
-	 *
-	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
-	 *
-	 * @return (int) - >=0 : 성공, <0 : 실패
-	 */
-	private int Device_SetSleepMode(boolean OnOff) {
-		DebugLogOutput("[Device_SetSleepMode] - Start   (OnOff : " + OnOff + ")");
-
-		// 1. Param Check
-
-		// 2. Api Load Check
-		if (ventiAPI == null) {
-			Log.e(TAG, "[Device_SetSleepMode] - ventiAPI unload !!!");
-			return -2;
-		}
-
-		// 2. Control
-		try {
-			int ret = ventiAPI.SetSleepMode(OnOff);
-			if (ret < 0) {
-				Log.e(TAG, "[Device_SetSleepMode] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
-				return -3;
-			}
-		} catch (RuntimeException re) {
-            LogUtil.errorLogInfo("", TAG, re);
-			return -100;
-        }
-		catch (Exception e) {
-			Log.e(TAG, "[Device_SetSleepMode] - [Exception Error] ventiAPI.SetSleepMode(" + OnOff + ")");
-			//e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-			return -100;
-		}
-
-		DebugLogOutput("[Device_SetSleepMode] - OK");
-
-		return 0;
-	}
-
-	// =================================================================================================
-	// [[ Sample ]] region
-	// =================================================================================================
-	/**
-	 * (영업샘플모드) 가상으로 환기의 전원을 ON/OFF 한다.
-	 */
-	private void Sample_PowerOnOff() {
-		if (mData.Status.OnOff) {
-			mData.Status.OnOff = false;
-			mData.Status.Timer = 0;
-		}
-		else {
-			mData.Status.OnOff = true;
-			mData.Status.Wind = VentiAPI.WIND.LOW;
-		}
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 예약운전을 ON/OFF 한다.
-	 */
-	private void Sample_ReservationOnOff(boolean OnOff) {
-		if (OnOff) mData.Status.Reservation = true;
-		else mData.Status.Reservation = false;
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 풍량을 제어한다.
-	 *
-	 * @param Wind - 변경할 풍량 상태
-	 */
-	private void Sample_WindCont(byte Wind) {
-		mData.Status.Wind = Wind;
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 타이머를 변경한다.
-	 *
-	 * @param TargetId - 눌린 버튼
-	 */
-	private void Sample_TimerCont(int TargetId) {
-		mData.Status.Timer = getNextTimerValue(TargetId);
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 내부순환을 제어한다.
-	 *
-	 * @param OnOff - 변경할 상태
-	 */
-	private void Sample_InnerCycle(boolean OnOff) {
-        if (OnOff) mData.Status.OutAirClean = false;
-		mData.Status.InnerCycle = OnOff;
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 외기청정을 제어한다.
-	 *
-	 * @param OnOff - 변경할 상태
-	 */
-	private void Sample_OutAirClean(boolean OnOff) {
-        if (OnOff) mData.Status.InnerCycle = false;
-		mData.Status.OutAirClean = OnOff;
-
-		Draw_Update();
-	}
-
-	/**
-	 * (영업샘플모드) 가상으로 환기의 외기청정을 제어한다.
-	 *
-	 * @param OnOff - 변경할 상태
-	 */
-	private void Sample_SleepMode(boolean OnOff) {
-		byte bOnOff = (byte)0x00;
-		if (OnOff) bOnOff = (byte)0x01;
-
-		mData.Status.Sleep = bOnOff;
-
-		Draw_Update();
-	}
-
-}
+/*
+ * Copyright (C) 2018 Android WallPad Project
+ *
+ * FileName  : HeatingV2PopupScreen.java
+ * Project   : Android WallPad Project
+ * Company   : HDC I-CONTROLS ( www.icontrols.co.kr )
+ * Author    : Choi In Bo  , inbo207@icontrols.co.kr
+ */
+
+
+package kr.co.icontrols.wallpadhomectrl.screen.screen_venti;
+
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
+import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.artncore.commons.API_Menu;
+import com.artncore.commons.DataClasses;
+import com.artncore.commons.DataClasses.Venti;
+import com.artncore.wallpadapi.VentiAPI;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+import kr.co.icontrols.wallpadhomectrl.MainActivity;
+import kr.co.icontrols.wallpadhomectrl.R;
+import kr.co.icontrols.wallpadhomectrl.declare.*;
+import kr.co.icontrols.wallpadsupport.*;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+
+
+/**
+ * @description
+ * 월패드 [우리집제어->환기] 메인화면 이다.<br>
+ * 예약버튼, ON/OFF버튼, 약풍/미풍,강풍 풍량버튼, 타이머좌우 버튼<br>
+ * 을(를) 여기서 처리한다.
+ */
+@SuppressLint("ViewConstructor")
+public class VentiMainScreen extends WpadScreen {
+	private final String TAG = "VentiMainScreen";
+
+	private final boolean DEBUG_LOG_ON = true;
+	private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
+
+	// =================================================================================================
+	// [[ Declaration ]] region
+	// =================================================================================================
+	// [Image]
+	private WpadImageView Background, BackgroundSub, BackgroundBox, Line1, Line2;
+	private WpadImageView FanImg;
+	private WpadImageView ReservationStatus;
+	private WpadImageView FilterService;
+	//private WpadImageView WindTitle;
+	//private WpadImageView TimerTitle, TimerBlank;
+	private WpadImageView FillterChange;
+	//private WpadImageView ByPassTitle;
+	//private WpadImageView HeaterTitle;
+
+
+	//private WpadImageView AutoDrivingTitle;
+	//private WpadImageView BathRoomTitle;
+
+	// [Button]
+	private WpadImageView ReservationBtn, OnOffBtn, BathRoomBtn;
+	private WpadImageView Wind1Btn, Wind2Btn, Wind3Btn;
+	private WpadImageView TimerLeftBtn, TimerRightBtn;
+	private WpadImageView ByPassBtn;
+	private WpadImageView HeaterBtn;
+	private WpadImageView SleepModeBtn;
+	private WpadImageView AutoDrivingBtn;
+	private WpadImageView InnerCycleBtn;
+	private WpadImageView OutAirCleanBtn;
+
+	// [Text]
+	private WpadTextView TimerText;
+	private WpadTextView HeaterTimeText;
+    private WpadTextView OnOffTitle;
+    private WpadTextView ReservationTitle;
+	private WpadTextView BathRoomTitle;
+
+	private WpadTextView WindTitle;
+	private WpadTextView TimerTitle;
+	private WpadTextView ByPassTitle;
+	private WpadTextView HeaterTitle;
+	private WpadTextView SleepTitle;
+	private WpadTextView AutoDrivingTitle;
+
+	// [Variables]
+	private int OPERATION_MODE = -1;
+	private boolean TEST_BUTTON = false; // 외기청정, 내부순환 테스트용 버튼 임시생성 / 자연,자동,취침 임시용
+	private boolean SAMPLE_MODE_TEST = false; // 샘플모드 플래그 (테스트용)
+
+	private boolean bEasyModeUse = false;
+
+	/** 현산 김용한부장 요청에 따른 전원 예약 버튼 위치 교체 적용 */
+	private boolean UI_CHANGE_2016_01 = true;
+
+	private int mFanAnimImgCutCount = 0;
+
+	private Handler mFanAnimHandler = null;
+
+	private Handler mFilterChangeHandler = null;
+	private boolean mFilterChangeHandlerRun = false;
+
+	private byte mFanAnimStatus = 0;
+	private int [] mFanAnimImg = null;
+
+	private int [] mFanDefaultAnimImg = new int []
+			{ R.drawable.control_venti_wind_0, R.drawable.control_venti_wind_1_b_r, R.drawable.control_venti_wind_2_b_r, R.drawable.control_venti_wind_3_b_r, R.drawable.control_venti_wind_4_b_r };
+	private int [] mFanByPassAnimImg = new int []
+			{ R.drawable.control_venti_wind_0, R.drawable.control_venti_wind_1_b_b, R.drawable.control_venti_wind_2_b_b, R.drawable.control_venti_wind_3_b_b, R.drawable.control_venti_wind_4_b_b };
+
+	private class Data {
+		DataClasses.Venti Status;
+
+		int Type;              // 현산,LH,후드
+
+		int [] TimerTable;
+
+		public Data(int nType) {
+			Status = new DataClasses.Venti();
+			Type = nType;
+			if (Type == API_Menu.SubMenuCtrl.ChangAir_LH) TimerTable = new int [] { 0, 30 , 60 , 90 };
+			else TimerTable = new int [] { 0, 10 , 20 , 30 , 60 , 120 , 180 , 240 };
+		}
+	}
+
+	private Data mData;
+	public String VentiManual_Str = ""; // ByPass:0/Heater:0
+
+	public static boolean bVentiCycleEnable = false;
+	public static int nVentiType = 0;
+
+	// [API]
+	private VentiAPI ventiAPI = null;
+	private TransactionDisplay transactionDisplay = null;
+
+	// =================================================================================================
+	// [[ Create & Close ]] region
+	// =================================================================================================
+	/**
+	 * VentiMainScreen 클래스 생성자
+	 *
+	 * @param context       - 부모 context
+	 * @param layout        - 사용할 main layout
+	 * @param wpapi         - 상속받은 WallPadAPI
+	 * @param operationMode - 동작모드
+	 * @param nMenuId       - APP 시작시 메인에서 전달받은 MunuID (본 값으로 하여 [기본], [후드], [LH] 상태를 변경한다)
+	 */
+	@SuppressLint("HandlerLeak")
+	public VentiMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode, int nMenuId) {
+		super(context, layout);
+
+		Log.i(TAG, "[START - Screen] --------------------------------------------");
+
+		// 1. Data Create
+		DebugLogOutput("[Create] - Step1 : Data Create");
+		OPERATION_MODE = operationMode;
+		mFanAnimImg = mFanDefaultAnimImg;
+		mData = new Data(nMenuId);
+
+		bEasyModeUse = ((MainActivity) context).GetEasyModeUXUse();
+		DebugLogOutput("[Create] - bEasyModeUse [" + bEasyModeUse + "]");
+
+		// 2. Device API Load & Update
+		DebugLogOutput("[Create] - Step2 : Device API Load & Update");
+		if (OPERATION_MODE == Common.MODE_NOMAL) {
+			DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
+			if (Device_ApiLoad(wpapi) >= 0) Device_Update(false);
+		}
+		else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+			DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
+		}
+		else {
+			DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
+			OPERATION_MODE = Common.MODE_NOMAL;
+		}
+
+		// 3. Common - Image & Button Create
+		DebugLogOutput("[Create] - Step3 : Common - Image & Button Create");
+		Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.VentiMainScreenID.image.BACKGROUND);
+		ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
+
+		BackgroundSub = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, 629, 382, R.drawable.control_venti_fan_bgr, 0, ID.VentiMainScreenID.image.BACKGROUND_SUB);
+		ViewRegistration(layout, BackgroundSub, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
+
+		BackgroundBox = new WpadImageView(context, TOUCH_KIND.NONE, 419, 382, R.drawable.control_venti_fan_bgbox, 0, ID.VentiMainScreenID.image.BACKGROUND_BOX);
+		ViewRegistration(layout, BackgroundBox, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(110));
+
+		FanImg = new WpadImageView(context, TOUCH_KIND.NONE, 472, 78, R.drawable.control_venti_wind_4_b_r, 0, ID.VentiMainScreenID.image.FAN);
+		ViewRegistration(layout, FanImg, Common.ImgPosion.GetX(172), Common.ImgPosion.GetY(312));
+
+		ReservationStatus = new WpadImageView(context, TOUCH_KIND.NONE, 419, 48, R.drawable.control_venti_box_alarm_booking, 0, ID.VentiMainScreenID.image.RESERVATION);
+		ViewRegistration(layout, ReservationStatus, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(112));
+
+		/** 환기 케어 서비스 버튼 추가 : SBS */
+		WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
+		if (wpdds.Get_VentiServiceQRUse()) {
+			FilterService = new WpadImageView(context, TOUCH_KIND.BUTTON, 130, 54,
+					new int[] { R.drawable.btn_venti_inqu_normal, R.drawable.btn_venti_inqu_pressed },
+					new int[] { R.drawable.btn_venti_inqu_normal, R.drawable.btn_venti_inqu_pressed },
+					ID.VentiMainScreenID.button.FILLTER_SERVICE);
+			ViewRegistration(layout, FilterService, Common.ImgPosion.GetX(572), Common.ImgPosion.GetY(418));
+		}
+		/** 환기 케어 서비스 버튼 추가 end : SBS */
+
+		Log.e("SBS", " mData.Status.Support.FilterReset : " + mData.Status.Support.FilterReset);
+
+		if (mData.Status.Support.FilterReset) {
+			FillterChange = new WpadImageView(context, TOUCH_KIND.BUTTON, 254, 54,
+					new int[] { R.drawable.control_venti_btn_filter_normal, R.drawable.control_venti_btn_filter_pressed },
+					new int[] { R.drawable.control_venti_btn_filter_normal, R.drawable.control_venti_btn_filter_pressed },
+					ID.VentiMainScreenID.button.FILLTER_CHANGE);
+			ViewRegistration(layout, FillterChange, Common.ImgPosion.GetX(848), Common.ImgPosion.GetY(418));
+			FillterChange.setVisibility(View.INVISIBLE);
+		}
+		else {
+			FillterChange = new WpadImageView(context, TOUCH_KIND.NONE, 419, 48, R.drawable.control_venti_box_alarm_filter, 0, ID.VentiMainScreenID.image.FILLTER_CHANGE);
+			ViewRegistration(layout, FillterChange, Common.ImgPosion.GetX(766), Common.ImgPosion.GetY(441));
+			FillterChange.setVisibility(View.INVISIBLE);
+		}
+
+		boolean BathRoomUse = false;
+		if (wpapi != null) {
+			if (ventiAPI != null) {
+				BathRoomUse = ventiAPI.data.Support.BathRoom;
+			}
+		}
+
+
+		if (UI_CHANGE_2016_01) {
+			if (BathRoomUse == false) {
+                OnOffTitle = new WpadTextView(context, false, 129, 54, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.ONOFF_TITLE);
+                ViewRegistration(layout, OnOffTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(228));
+				OnOffTitle.setText("전원");
+
+                ReservationTitle = new WpadTextView(context, false, 150, 50, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.RESERV_TITLE);
+                ViewRegistration(layout, ReservationTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(325));
+				ReservationTitle.setText("예약");
+
+				ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
+                ViewRegistration(layout, ReservationBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(325));
+				ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+
+				OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
+						new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
+						new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
+						ID.VentiMainScreenID.button.ONOFF);
+                ViewRegistration(layout, OnOffBtn, Common.ImgPosion.GetX(976), Common.ImgPosion.GetY(231));
+				OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			}
+			else {
+                OnOffTitle = new WpadTextView(context, false, 129, 54, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.ONOFF_TITLE);
+                ViewRegistration(layout, OnOffTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(186));
+				OnOffTitle.setText("전원");
+
+                ReservationTitle = new WpadTextView(context, false, 150, 50, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.RESERV_TITLE);
+                ViewRegistration(layout, ReservationTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(267));
+				ReservationTitle.setText("예약");
+
+                ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
+                ViewRegistration(layout, ReservationBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(267));
+                ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+
+                OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
+                        new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
+                        new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
+                        ID.VentiMainScreenID.button.ONOFF);
+                ViewRegistration(layout, OnOffBtn, Common.ImgPosion.GetX(976), Common.ImgPosion.GetY(189));
+                OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+				//BathRoomTitle = new WpadImageView(context, TOUCH_KIND.NONE, 46, 24, R.drawable.control_venti_typo_exhaust, 0, ID.VentiMainScreenID.image.BATHROOM_TITLE); //전원
+				BathRoomTitle = new WpadTextView(context, false, 129, 54, Gravity.START, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.EXHAUSTION_TITLE);
+				ViewRegistration(layout, BathRoomTitle, Common.ImgPosion.GetX(844), Common.ImgPosion.GetY(348));
+
+				BathRoomBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 40, 42,
+						new int[] { R.drawable.but_check_default, R.drawable.but_check_checked },
+						new int[] { R.drawable.but_check_checked, R.drawable.but_check_default },
+						ID.VentiMainScreenID.button.BATHROOM);
+				ViewRegistration(layout, BathRoomBtn, Common.ImgPosion.GetX(993), Common.ImgPosion.GetY(342));
+				BathRoomBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+				WallpadStatusData wd = new WallpadStatusData(this.getContext());
+				String ret = wd.GetWallPADData(WallpadStatusData.VENTI_BATHROOM);
+				if (ret == null) {
+					wd.insertWallPADDB(WallpadStatusData.VENTI_BATHROOM, WallpadStatusData.VENTI_BATHROOM_VALUE_DEFAULT);
+					ret = WallpadStatusData.VENTI_BATHROOM_VALUE_DEFAULT;
+				}
+
+				if (ret.equalsIgnoreCase("true") == true) {
+					BathRoomBtn.setButtonRearImage();
+				}
+				else {
+					BathRoomBtn.setButtonFrontImage();
+				}
+				wd.closeDB();
+			}
+		}
+		else {
+//			ReservationBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 144, 50, R.drawable.control_venti_btn_set_normal, R.drawable.control_venti_btn_set_pressed, ID.VentiMainScreenID.button.RESERVATION_SET);
+//			ViewRegistration(layout, ReservationBtn, Common.CtrlMarginLEFT(731), Common.ImgPosion.GetY(195));
+//			ReservationBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+//
+//			OnOffBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 122, 48,
+//					new int[] { R.drawable.control_venti_btn_onoff_off, R.drawable.control_venti_btn_onoff_off },
+//					new int[] { R.drawable.control_venti_btn_onoff_on, R.drawable.control_venti_btn_onoff_on },
+//					ID.VentiMainScreenID.button.ONOFF);
+//			ViewRegistration(layout, OnOffBtn, Common.CtrlMarginLEFT(749), Common.ImgPosion.GetY(272));
+//			OnOffBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+		}
+
+		// 4. Other - Image & Button Create
+		DebugLogOutput("[Create] - Step4 : Other - Image & Button Create");
+		if (TEST_BUTTON) {
+			//mData.Status.Support.InnerCycle = true; 	// 테스트용 설정
+			//mData.Status.Support.OutAirClean = true;	// 테스트용 설정
+			mData.Status.Support.ByPass = true;
+			mData.Status.Support2.SleepMode = true;
+			mData.Status.Support.AutoDriving = true;
+		}
+
+		if (SAMPLE_MODE_TEST) {
+//			nVentiType = 4; // 테스트용 설정
+		}
+
+		if ((mData.Status.Support.InnerCycle && mData.Status.Support.OutAirClean) || SAMPLE_MODE_TEST) {
+			bVentiCycleEnable = true;
+			InnerCycleBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 98, 54,
+					new int[] { R.drawable.control_venti_btn_innercycle_normal, R.drawable.control_venti_btn_innercycle_pressed},
+					new int[] { R.drawable.control_venti_btn_innercycle_selected, R.drawable.control_venti_btn_innercycle_selected},
+					ID.VentiMainScreenID.button.INNERCYCLE);
+			ViewRegistration(layout, InnerCycleBtn, Common.ImgPosion.GetX(850), Common.ImgPosion.GetY(420));
+			InnerCycleBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+
+			OutAirCleanBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 98, 54,
+					new int[] { R.drawable.control_venti_btn_outairclean_normal, R.drawable.control_venti_btn_outairclean_pressed},
+					new int[] { R.drawable.control_venti_btn_outairclean_selected, R.drawable.control_venti_btn_outairclean_selected},
+					ID.VentiMainScreenID.button.OUTAIRCLEAN);
+			ViewRegistration(layout, OutAirCleanBtn, Common.ImgPosion.GetX(960), Common.ImgPosion.GetY(420));
+			OutAirCleanBtn.setTouchDelayMs(Common.BTN_DELAY_SHOWPOPUP);
+		}
+
+		if ((mData.Status.Support.ByPass && mData.Status.Support.Heater && !mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 0)) {
+			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
+			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
+
+			DebugLogOutput("[Create] - Step4 : ByPass , Heater");
+			VentiManual_Str = "ByPass:1/Heater:1"; // ByPass:0/Heater:0
+			nVentiType = 0;
+
+			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
+			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
+			WindTitle.setText("풍량");
+
+			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
+			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
+			TimerTitle.setText("타이머");
+
+			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
+			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
+			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
+			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
+			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
+			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
+			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
+			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
+			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
+			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
+			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
+			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
+
+			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
+			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(543));
+			ByPassTitle.setText("자연환기");
+
+			HeaterTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TITLE);
+			ViewRegistration(layout, HeaterTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
+			HeaterTitle.setText("히터");
+
+			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.BYPASS);
+			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(543));
+			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			HeaterBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed, ID.VentiMainScreenID.button.HEATER);
+			ViewRegistration(layout, HeaterBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
+			HeaterBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
+			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
+		}
+		else if ((mData.Status.Support.ByPass && mData.Status.Support.Heater && mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 1)) {
+			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
+			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
+
+			DebugLogOutput("[Create] - Step4 : ByPass , Heater, Auto");
+			VentiManual_Str = "ByPass:1/Heater:1/Auto:1"; // ByPass:0/Heater:0
+			nVentiType = 1;
+
+			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
+			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
+			WindTitle.setText("풍량");
+
+			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
+			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
+			TimerTitle.setText("타이머");
+
+			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
+			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
+			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
+			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
+			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
+			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
+			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
+			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
+			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
+			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
+			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
+			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
+
+			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
+			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(520));
+			ByPassTitle.setText("자연환기");
+
+			HeaterTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TITLE);
+			ViewRegistration(layout, HeaterTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
+			HeaterTitle.setText("히터");
+
+			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.BYPASS);
+			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(520));
+			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			HeaterBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54, R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed, ID.VentiMainScreenID.button.HEATER);
+			ViewRegistration(layout, HeaterBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
+			HeaterBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
+			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
+
+			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
+			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(580));
+			AutoDrivingTitle.setText("자동환기");
+
+			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.AUTODRIVING);
+			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(580));
+			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+		}
+		else if ((mData.Status.Support.ByPass && mData.Status.Support2.SleepMode && mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 2)) {
+			DebugLogOutput("[Create] - Step4 : ByPass, Auto, SleepMode");
+			VentiManual_Str = "ByPass:1/Sleep:1/Auto:1"; // ByPass:0/Heater:0
+			nVentiType = 2;
+
+			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
+			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
+			WindTitle.setText("풍량");
+
+			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
+			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
+			TimerTitle.setText("타이머");
+
+			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
+			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
+			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
+			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
+			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
+			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
+			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
+			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
+			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
+			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
+			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
+			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
+
+			ByPassTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.BYPASS_TITLE);
+			ViewRegistration(layout, ByPassTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(520));
+			ByPassTitle.setText("자연환기");
+
+			SleepTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.SLEEP_TITLE);
+			ViewRegistration(layout, SleepTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(697));
+			SleepTitle.setText("취침모드");
+
+			ByPassBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.BYPASS);
+			ViewRegistration(layout, ByPassBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(520));
+			ByPassBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			SleepModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.SLEEP);
+			ViewRegistration(layout, SleepModeBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(697));
+			SleepModeBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			HeaterTimeText = new WpadTextView(context, false, 84, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.HEATER_TIME);
+			ViewRegistration(layout, HeaterTimeText, Common.ImgPosion.GetX(1103), Common.ImgPosion.GetY(697));
+
+			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
+			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(605));
+			AutoDrivingTitle.setText("자동환기");
+
+			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.AUTODRIVING);
+			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(605));
+			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+		}
+		else if ((mData.Status.Support.AutoDriving) || (SAMPLE_MODE_TEST && nVentiType == 3)) {
+			Line1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line_2px, 0, ID.VentiMainScreenID.image.LINE1);
+			ViewRegistration(layout, Line1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
+
+			DebugLogOutput("[Create] - Step4 : AutoDriving");
+			VentiManual_Str = "ByPass:0/Heater:0/Auto:1"; // ByPass:0/Heater:0
+			nVentiType = 3;
+
+			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
+			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(543));
+			WindTitle.setText("풍량");
+
+			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
+			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(122), Common.ImgPosion.GetY(697));
+			TimerTitle.setText("타이머");
+
+			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
+			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(543));
+			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
+			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(412), Common.ImgPosion.GetY(543));
+			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
+			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(551), Common.ImgPosion.GetY(543));
+			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
+			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(273), Common.ImgPosion.GetY(697));
+			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
+			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(600), Common.ImgPosion.GetY(697));
+			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerText = new WpadTextView(context, false, 247, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
+			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(353), Common.ImgPosion.GetY(697));
+
+			AutoDrivingTitle = new WpadTextView(context, false, 188, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.AUTODRIVING_TITLE);
+			ViewRegistration(layout, AutoDrivingTitle, Common.ImgPosion.GetX(784), Common.ImgPosion.GetY(543));
+			AutoDrivingTitle.setText("자동환기");
+
+			AutoDrivingBtn = new WpadImageView(context, TOUCH_KIND.BUTTON,129, 54,
+					new int[] { R.drawable.control_venti_btn_off_normal, R.drawable.control_venti_btn_off_pressed },
+					new int[] { R.drawable.control_venti_btn_on_yellow_normal, R.drawable.control_venti_btn_on_yellow_pressed },
+					ID.VentiMainScreenID.button.AUTODRIVING);
+			ViewRegistration(layout, AutoDrivingBtn, Common.ImgPosion.GetX(973), Common.ImgPosion.GetY(543));
+			AutoDrivingBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+		}
+		else {
+			DebugLogOutput("[Create] - Step4 : Normal");
+			VentiManual_Str = "ByPass:0/Heater:0"; // ByPass:0/Heater:0
+			nVentiType = 4;
+
+			WindTitle = new WpadTextView(context, false, 150, 54, Gravity.START, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.WIND_POWER_TITLE);
+			ViewRegistration(layout, WindTitle, Common.ImgPosion.GetX(325), Common.ImgPosion.GetY(543));
+			WindTitle.setText("풍량");
+
+			TimerTitle = new WpadTextView(context, false, 150, 54, Gravity.LEFT, Color.rgb(0x96, 0x96, 0x96), Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TITLE);
+			ViewRegistration(layout, TimerTitle, Common.ImgPosion.GetX(325), Common.ImgPosion.GetY(697));
+			TimerTitle.setText("타이머");
+
+			Wind1Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind1_normal, R.drawable.control_venti_btn_wind1_pressed, ID.VentiMainScreenID.button.WIND_1);
+			ViewRegistration(layout, Wind1Btn, Common.ImgPosion.GetX(546), Common.ImgPosion.GetY(543));
+			Wind1Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind2Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind2_normal, R.drawable.control_venti_btn_wind2_pressed, ID.VentiMainScreenID.button.WIND_2);
+			ViewRegistration(layout, Wind2Btn, Common.ImgPosion.GetX(685), Common.ImgPosion.GetY(543));
+			Wind2Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			Wind3Btn = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 129, 54, R.drawable.control_venti_btn_wind3_normal, R.drawable.control_venti_btn_wind3_pressed, ID.VentiMainScreenID.button.WIND_3);
+			ViewRegistration(layout, Wind3Btn, Common.ImgPosion.GetX(824), Common.ImgPosion.GetY(543));
+			Wind3Btn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerLeftBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_back_normal, R.drawable.control_venti_btn_arrow_back_pressed, ID.VentiMainScreenID.button.TIMER_LEFT);
+			ViewRegistration(layout, TimerLeftBtn, Common.ImgPosion.GetX(546), Common.ImgPosion.GetY(697));
+			TimerLeftBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+			TimerRightBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.control_venti_btn_arrow_next_normal, R.drawable.control_venti_btn_arrow_next_pressed, ID.VentiMainScreenID.button.TIMER_RIGHT);
+			ViewRegistration(layout, TimerRightBtn, Common.ImgPosion.GetX(873), Common.ImgPosion.GetY(697));
+			TimerRightBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
+
+			TimerText = new WpadTextView(context, false, 232, 44, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.VentiMainScreenID.text.TIMER_TEXT);
+			ViewRegistration(layout, TimerText, Common.ImgPosion.GetX(626), Common.ImgPosion.GetY(697));
+		}
+		Log.d(TAG, "[Create] bVentiCycleEnable [ " + bVentiCycleEnable + "], nVentiType [" + nVentiType + "]");
+
+		// 5. Draw_Update
+		DebugLogOutput("[Create] - Step5 : Draw_Update");
+
+		//     6.1. 환기 에니메이션용 Handler
+		mFanAnimHandler = new Handler()
+		{
+			@SuppressLint("HandlerLeak")
+			@Override
+			public void handleMessage(Message msg)
+			{
+				//Log.d(TAG, "FanAnimHandler - msg.what = " + msg.what);
+
+				if (mData.Status.Support.ByPass && mData.Status.ByPass) {
+					// 자연환기 동작중 에니메이션 이미지 지정
+					mFanAnimImg = mFanByPassAnimImg;
+				}
+				else {
+					// 자연환기 아닐시 에니메이션 기본 이미지 지정
+					mFanAnimImg = mFanDefaultAnimImg;
+				}
+
+				if (msg.what == 1) {
+					if (mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
+					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
+					mFanAnimImgCutCount++;
+					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 400);
+				}
+				else if (msg.what == 2) {
+					if(mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
+					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
+					mFanAnimImgCutCount++;
+					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 300);
+				}
+				else if (msg.what == 3) {
+					if (mFanAnimImgCutCount >= mFanAnimImg.length) mFanAnimImgCutCount = 0;
+					FanImg.setImageResource(mFanAnimImg[mFanAnimImgCutCount]);
+					mFanAnimImgCutCount++;
+					mFanAnimHandler.sendEmptyMessageDelayed(msg.what, 200);
+				}
+			}
+		};
+
+		//      6.2. 필터교환 에니메이션용 Handler
+		mFilterChangeHandler = new Handler() {
+			@SuppressLint("HandlerLeak")
+			@Override
+			public void handleMessage(Message msg) {
+				//Log.d(TAG, "FanAnimHandler - msg.what = " + msg.what);
+				if (msg.what == 0) {
+					mFilterChangeHandlerRun = false;
+					FillterChange.setVisibility(View.INVISIBLE);
+				}
+				else if (msg.what == 1) {
+					mFilterChangeHandlerRun = true;
+					if (mData.Status.Support.FilterReset) {
+						if (FillterChange.getVisibility() == View.INVISIBLE) FillterChange.setVisibility(View.VISIBLE);
+						FillterChange.setButtonFrontImage();
+					}
+					else {
+						FillterChange.setVisibility(View.VISIBLE);
+					}
+					mFilterChangeHandler.sendEmptyMessageDelayed(2, 2000);
+				}
+				else if (msg.what == 2) {
+					mFilterChangeHandlerRun = true;
+					if (mData.Status.Support.FilterReset) {
+						FillterChange.setButtonRearImage();
+					}
+					else {
+						FillterChange.setVisibility(View.INVISIBLE);
+					}
+					mFilterChangeHandler.sendEmptyMessageDelayed(1, 1000);
+				}
+			}
+		};
+
+		Draw_Update();
+
+		if (ventiAPI != null) {
+			Device_BrRegistration(true);
+			if (MainActivity.getHideMenuOn()) transactionDisplay = new TransactionDisplay(true, (WallPadDevAPI) ventiAPI, (WpadScreen) this);
+		}
+
+		// 현산모델에서 안전모드일시 시작과 동시에 알람팝업을 띄움
+		if (Version.getGatewayUsage()) {
+			if (mData.Status.Fault.SafeMode) {
+				Handler PopupHandler = new Handler() {
+					@SuppressLint("HandlerLeak")
+					@Override
+					public void handleMessage(Message msg) {
+						if (msg.what == 0) {
+							// 안전모드 팝업
+							StartAlarmPopup(ID.VentiPopup_Alarm.kind.SafeMode);
+						}
+					}
+				};
+				PopupHandler.sendEmptyMessageDelayed(0, 300);
+			}
+		}
+	}
+
+	/**
+	 * 본 스크린 종료시 호출됨
+	 */
+	@Override
+	protected void onClose() {
+		super.onClose();
+
+		// 등록된 BR 을 해제 한다.
+		if (ventiAPI != null) {
+			Device_BrRegistration(false);
+			if (MainActivity.getHideMenuOn()) { if(transactionDisplay != null) transactionDisplay.Close(); }
+		}
+
+		Draw_FanAnim((byte)0x00);
+		mFanAnimHandler = null;
+
+		Log.i(TAG, "[END   - Screen] ********************************************");
+	}
+
+	// =================================================================================================
+	// [[ BroadcastReceiver ]] region
+	// =================================================================================================
+	/**
+	 * 부모 Activity 에서 BroadcastReceiver 을 수신받을시 호출됨
+	 */
+	@Override
+	protected void onBrReceive(Intent intent) {
+		super.onBrReceive(intent);
+
+		String ActionName = intent.getAction();
+
+		DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
+		if (ActionName.equals(ID.VentiMainScreenID.BR_VENTI)) {
+			DebugLogOutput("onBrReceive - BR_VENTI");
+			Device_Update(false);
+			Draw_Update();
+		}
+	}
+
+	/**
+	 * 팝업 Activity에서 Result 를 전달 받았을시 호출된다.
+	 */
+	@Override
+	protected void onPopupResult(Intent intent) {
+		super.onPopupResult(intent);
+
+		if (intent != null) {
+			int Screen = intent.getIntExtra("SCREEN", -1);
+			if (Screen == ID.screen.VentiPopupAlarmScreen) {
+				int kind = intent.getIntExtra("KIND", -1);
+				boolean ok = intent.getBooleanExtra("OK", false);
+
+				if (ok) {
+					if (kind == ID.VentiPopup_Alarm.kind.ReservationClear) {
+						if (OPERATION_MODE == Common.MODE_NOMAL) {
+							Device_ReserveCont(false);
+						}
+						else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+							Sample_ReservationOnOff(false);
+						}
+					}
+					else if (kind == ID.VentiPopup_Alarm.kind.HeaterOn) {
+						if (OPERATION_MODE == Common.MODE_NOMAL) {
+							Device_SetHeater(true);
+						}
+					}
+					else if (kind == ID.VentiPopup_Alarm.kind.FilterReset) {
+						if (OPERATION_MODE == Common.MODE_NOMAL) {
+							Device_SetFilterReset();
+						}
+					}
+					else if (kind == ID.VentiPopup_Alarm.kind.SafeMode) {
+
+					}
+					else if (kind == ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn) {
+						if (OPERATION_MODE == Common.MODE_NOMAL) {
+							Device_SetAutoDriving(true);
+						}
+					}
+				}
+			}
+			else if (Screen == ID.screen.VentiPopupReservationScreen) {
+				if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					boolean Reservation = intent.getBooleanExtra("Reservation", false);
+					Sample_ReservationOnOff(Reservation);
+				}
+			}
+		}
+	}
+
+	// =================================================================================================
+	// [[ Touch & Key Event ]] region
+	// =================================================================================================
+	/**
+	 * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
+	 */
+	@Override
+	protected void onTouchEvent(View v, MotionEvent event) {
+		super.onTouchEvent(v, event);
+
+		int TargetId = v.getId();
+		int MoveEvent = event.getAction();
+
+		Log.e(TAG, "[onTouchEvent] MoveEvent [" + MoveEvent + "], TargetId [" + TargetId + "]");
+
+		if (MoveEvent == MotionEvent.ACTION_UP) {
+			if (TargetId == ID.VentiMainScreenID.button.RESERVATION_SET) {
+				// 예약
+				DebugLogOutput("onTouchEvent [RESERVATION_SET] BUTTON !!!");
+
+				Sound().Play(SND.effect.TOUCH_LATCHED);
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupReservationScreen);
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Intent intent = new Intent();
+					intent.putExtra("Reservation", mData.Status.Reservation);
+					((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupReservationScreen, intent);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.ONOFF) {
+				// ON/OFF
+				DebugLogOutput("onTouchEvent [ONOFF] BUTTON !!!");
+
+				if (Version.getGatewayUsage()) {
+					if (mData.Status.Fault.SafeMode) {
+						// 안전모드 팝업
+						StartAlarmPopup(ID.VentiPopup_Alarm.kind.SafeMode);
+						return;
+					}
+				}
+
+				if (mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					boolean OnOff = false;
+					if (!mData.Status.OnOff) OnOff = true;
+
+					int ret = Device_SetOnOff(OnOff);
+					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Sample_PowerOnOff();
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			else if ((TargetId >= ID.VentiMainScreenID.button.WIND_1) && (TargetId <= ID.VentiMainScreenID.button.WIND_3)) {
+				// 풍량변경 [약풍 , 미풍 , 강풍]
+				int index = TargetId - ID.VentiMainScreenID.button.WIND_1;
+				DebugLogOutput("onTouchEvent [WIND_" + (index+1) + "] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) {
+					return;
+				}
+
+				// 예약중 체크
+				if (mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				// 동일한 풍량을 눌렀을 경우
+				if (mData.Status.Wind == (byte)(index + 1)) {
+					return;
+				}
+
+				byte Wind = (byte)(index + 1);
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					int ret = Device_WindCont(Wind);
+					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Sample_WindCont(Wind);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			else if ((TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) || (TargetId == ID.VentiMainScreenID.button.TIMER_RIGHT)) {
+				// 타이머 변경 [좌 , 우]
+				if (TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) DebugLogOutput("onTouchEvent [TIMER_LEFT] BUTTON !!!");
+				else DebugLogOutput("onTouchEvent [TIMER_RIGHT] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) return;
+
+				// 예약중 체크
+				if (mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					mData.Status.Timer = getNextTimerValue(TargetId);
+					int ret = Device_TimerCont(mData.Status.Timer);
+					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Sample_TimerCont(TargetId);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.BYPASS) {
+				// 자연환기
+				DebugLogOutput("onTouchEvent [BYPASS] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) return;
+
+				if (mData.Status.Support2.WindowVenti && mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				boolean OnOff = false;
+				if (!mData.Status.ByPass) OnOff = true;
+
+				int ret = Device_SetByPass(OnOff);
+				if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+				else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.HEATER) {
+				// 히터
+				DebugLogOutput("onTouchEvent [HEATER] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) return;
+
+				if (mData.Status.HeaterStatus == Venti.HEATER.OFF) {
+					// 히터알람 팝업
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.HeaterOn);
+				}
+				else {
+					int ret = Device_SetHeater(false);
+					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.FILLTER_CHANGE) {
+				DebugLogOutput("onTouchEvent [FILLTER_CHANGE] BUTTON !!!");
+
+				if (mData.Status.Support.FilterReset) {
+					// 필터교환 팝업
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.AUTODRIVING) {
+				// 자동환기
+				DebugLogOutput("onTouchEvent [AUTODRIVING] BUTTON !!!");
+
+				// 예약운전 OFF, 타이머 OFF  체크
+				if (mData.Status.Reservation) {
+					if (mData.Status.Support2.WindowVenti) {
+						// 예약중입니다 팝업 알람
+						StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+						return;
+					}
+					else {
+						return;
+					}
+				}
+
+				if (mData.Status.Timer != 0) return;
+
+				if (mData.Status.AutoDriving == false) {
+					// 자동운전 알림 팝업
+					if (mData.Status.Support2.WindowVenti) {
+						// 창호 환기 - 자동모드(하이브리드)
+						// 자동모드 설정 팝업 생성 안하고 바로 제어
+						int ret = Device_SetAutoDriving(true);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+					else {
+						// 일반 전열교환기(일반 환기장비)
+						StartAlarmPopup(ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn);
+					}
+				}
+				else {
+					int ret = Device_SetAutoDriving(false);
+					if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+					else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.BATHROOM) {
+				//욕실 배기
+				DebugLogOutput("onTouchEvent [BATHROOM] BUTTON !!!");
+
+				// 9. 욕실 배기
+				if (mData.Status.Support.BathRoom) {
+					WallpadStatusData wd = new WallpadStatusData(this.getContext());
+					String ret = wd.GetWallPADData(WallpadStatusData.VENTI_BATHROOM);
+
+					if (ret.equalsIgnoreCase("true") == true) {
+						wd.UpdateWallPADData(WallpadStatusData.VENTI_BATHROOM, "false");
+						BathRoomBtn.setButtonFrontImage();
+					}
+					else {
+						wd.UpdateWallPADData(WallpadStatusData.VENTI_BATHROOM, "true");
+						BathRoomBtn.setButtonRearImage();
+					}
+					wd.closeDB();
+
+					if (mData.Status.OnOff == true) {
+						//제어
+						int ret2 = Device_SetOnOff(mData.Status.OnOff);
+						if (ret2 >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+					else {
+						Sound().Play(SND.effect.TOUCH_LATCHED);
+					}
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.INNERCYCLE) {
+				// 내부순환
+				DebugLogOutput("onTouchEvent [INNERCYCLE] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) {
+					return;
+				}
+
+				// 예약중 체크
+				if (mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					if (mData.Status.InnerCycle) {
+						// 사용중일때 눌림 : On -> Off
+						int ret = Device_SetInnerCycle(false);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+					else {
+						// Off -> On
+						int ret = Device_SetInnerCycle(true);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Sample_InnerCycle(!mData.Status.InnerCycle);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.OUTAIRCLEAN) {
+				// 내부순환
+				DebugLogOutput("onTouchEvent [OUTAIRCLEAN] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) {
+					return;
+				}
+
+				// 예약중 체크
+				if (mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					if (mData.Status.OutAirClean) {
+						// 사용중일때 눌림 : On -> Off
+						int ret = Device_SetOutAirClean(false);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+					else {
+						// Off -> On
+						int ret = Device_SetOutAirClean(true);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					Sample_OutAirClean(!mData.Status.OutAirClean);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			else if (TargetId == ID.VentiMainScreenID.button.SLEEP) {
+				// 취침 모드
+				DebugLogOutput("onTouchEvent [SLEEP] BUTTON !!!");
+
+				// 전원 OFF 체크
+				if (!mData.Status.OnOff) {
+					return;
+				}
+
+				if (mData.Status.Support2.WindowVenti && mData.Status.Reservation) {
+					// 예약중입니다 팝업 알람
+					StartAlarmPopup(ID.VentiPopup_Alarm.kind.ReservationClear);
+					return;
+				}
+
+				if (OPERATION_MODE == Common.MODE_NOMAL) {
+					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) {
+						// 사용중일때 눌림 : On -> Off
+						int ret = Device_SetSleepMode(false);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+					else {
+						// Off -> On
+						int ret = Device_SetSleepMode(true);
+						if (ret >= 0) Sound().Play(SND.effect.TOUCH_LATCHED);
+						else Sound().Play(SND.effect.TOUCH_UNLATCHED);
+					}
+				}
+				else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+					boolean onoff = false;
+					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) onoff = true;
+					Sample_SleepMode(onoff);
+					Sound().Play(SND.effect.TOUCH_LATCHED);
+				}
+			}
+			/**
+			* 환기케어서비스 버튼
+			* @author 신범식
+			* @since
+			**/
+			else if (TargetId == ID.VentiMainScreenID.button.FILLTER_SERVICE) {
+				//StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterService);
+
+				// 환기 케어 서비스
+				DebugLogOutput("onTouchEvent [FILLTER_SERVICE] BUTTON !!!");
+
+				Sound().Play(SND.effect.TOUCH_LATCHED);
+
+				((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupServiceScreen);
+			}
+		}
+		else if (MoveEvent == MotionEvent.ACTION_POINTER_DOWN) {
+			Log.e(TAG, "[onTouchEvent] ===== jeff 1 =====");
+			if (TargetId == ID.VentiMainScreenID.image.BACKGROUND_SUB) {
+				Log.e(TAG, "[onTouchEvent] mData.Status.Support.FilterReset = " + mData.Status.Support.FilterReset);
+				// 필터교환 팝업 히든 버튼 (환기케어 서비스 담당자용)
+				StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
+//				if (mData.Status.Support.FilterReset) {
+//					// 필터교환 팝업
+//					StartAlarmPopup(ID.VentiPopup_Alarm.kind.FilterReset);
+//				}
+			}
+		}
+	}
+
+	/**
+	 * 알람팝업을 실행시킨다.
+	 *
+	 * @param kind - (int) 팝업 종류 : 예약중       ID.VentiPopup_Alarm.kind.ReservationClear<br>
+	 *                                히터 알람  ID.VentiPopup_Alarm.kind.HeaterOn<br>
+	 *                                필터교환   ID.VentiPopup_Alarm.kind.FilterReset<br>
+	 *                                안전모드   ID.VentiPopup_Alarm.kind.SafeMode<br>
+	 *
+	 * @return (boolean) true : 성공, false : 실패
+	 */
+	private boolean StartAlarmPopup(int kind) {
+		boolean bRet = false;
+		Intent data = null;
+		if (kind == ID.VentiPopup_Alarm.kind.ReservationClear) {
+			// 예약중입니다 팝업 알람
+			data = new Intent();
+			data.putExtra("KIND", kind);
+			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
+			data.putExtra("TEXT1", "예약기능이 동작중입니다.");
+			data.putExtra("TEXT2", "환기예약을 정지 하시겠습니까?");
+			data.putExtra("BTN_COUNT", 2);
+		}
+		else if (kind == ID.VentiPopup_Alarm.kind.HeaterOn) {
+			// 히터알람 팝업
+			data = new Intent();
+			data.putExtra("KIND", kind);
+			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
+			data.putExtra("TEXT1", "히터 기능 선택시 시간당 약 400Wh 의");
+			data.putExtra("TEXT2", "전기 요금이 추가 됩니다.");
+			data.putExtra("BTN_COUNT", 2);
+		}
+		else if (kind == ID.VentiPopup_Alarm.kind.FilterReset) {
+			// 필터교환 팝업
+			WallpadDeviceSet wpdds = new WallpadDeviceSet(getContext());
+			if (wpdds.Get_VentiServiceQRUse()) {
+				// 신규
+				data = new Intent();
+				data.putExtra("KIND", kind);
+				data.putExtra("IMAGE_ID", R.drawable.control_venti_popup_qr);
+				data.putExtra("TEXT1", "필터교체 시기가 되었습니다.");
+				data.putExtra("TEXT2", "이를 초기화 시키겠습니까?");
+				data.putExtra("TEXT3", "환기 케어 서비스(필터교환)");
+				data.putExtra("TEXT4", "1811-2770");
+				data.putExtra("BTN_COUNT", 2);
+				data.putExtra("EXTEND_TYPE", "Y");
+			}
+			else {
+				// 기존
+				data = new Intent();
+				data.putExtra("KIND", kind);
+				data.putExtra("IMAGE_ID", R.drawable.control_venti_popup_image);
+				data.putExtra("TEXT1", "필터교체 시기가 되었습니다.");
+				data.putExtra("TEXT2", "이를 초기화 시키겠습니까?");
+				data.putExtra("BTN_COUNT", 2);
+			}
+		}
+		else if (kind == ID.VentiPopup_Alarm.kind.SafeMode) {
+			// 안전모드 팝업
+			data = new Intent();
+			data.putExtra("KIND", kind);
+			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
+			data.putExtra("TEXT1", "영하 -10℃ 이하에서는 장비 손상의");
+			data.putExtra("TEXT2", "우려가 있어 구동을 멈춥니다.");
+			data.putExtra("BTN_COUNT", 1);
+		}
+		else if (kind == ID.VentiPopup_Alarm.kind.HDCAutoAirCleanOn) {
+			// 자동운전 팝업 (ON)
+			data = new Intent();
+			data.putExtra("KIND", kind);
+			data.putExtra("IMAGE_ID", R.drawable.ventipopup_alarm);
+			data.putExtra("TEXT1", "실내의 공기오염정도에 따라 자동운전되며");
+			data.putExtra("TEXT2", "24시간후 자동 OFF 됩니다.");
+			data.putExtra("BTN_COUNT", 2);
+		}
+		else {
+			Log.w(TAG, "[StartAlarmPopup] Param : kind - Out Of Range !!! (kind:" + kind + ")");
+			return false;
+		}
+
+		if (data != null) {
+			bRet = ((MainActivity)(getContext())).StartPopup(ID.screen.VentiPopupAlarmScreen, data);
+			if (bRet) Sound().Play(SND.effect.WARNING005);
+			else Log.w(TAG, "[StartAlarmPopup] StartPopup return false !!!");
+		}
+		return bRet;
+	}
+
+	// =================================================================================================
+	// [[ Draw ]] region
+	// =================================================================================================
+	/**
+	 * 변경되는 이미지를 다시 그린다.
+	 */
+	private void Draw_Update() {
+		try {
+			// 1. 예약중 표시
+			if (mData.Status.Reservation) Draw_Reservation(true);
+			else Draw_Reservation(false);
+
+			// 2. 전원 ON/OFF
+			if (mData.Status.OnOff) Draw_Power(true);
+			else Draw_Power(false);
+
+			// 3. 풍량
+			if (mData.Status.OnOff) {
+				Draw_Wind(mData.Status.Wind);
+				Draw_FanAnim(mData.Status.Wind);
+			}
+			else {
+				Draw_Wind((byte)0x00);
+				Draw_FanAnim((byte)0x00);
+			}
+
+			// 4. 타이머
+			Draw_Timer(mData.Status.Timer);
+
+			// 5. 필터교환
+			if (mData.Status.Fault.FilterChangeMedium || mData.Status.Fault.FilterChangeFree) {
+				if (!mFilterChangeHandlerRun) {
+					mFilterChangeHandler.sendEmptyMessage(1);
+				}
+			}
+			else {
+				if (mFilterChangeHandlerRun) {
+					mFilterChangeHandler.removeMessages(1);
+					mFilterChangeHandler.removeMessages(2);
+					mFilterChangeHandler.sendEmptyMessage(0);
+				}
+			}
+
+			// 6. 자연환기
+			if (mData.Status.Support.ByPass && ByPassBtn!=null) {
+				if (mData.Status.OnOff) {
+					ByPassBtn.setButtonEventOffDisable();
+					if (mData.Status.ByPass) {
+						ByPassBtn.setButtonRearImage();
+					}
+					else {
+						ByPassBtn.setButtonFrontImage();
+					}
+				}
+				else {
+					ByPassBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
+				}
+			}
+
+			// 7. 히터
+			if (mData.Status.Support.Heater) {
+				if (mData.Status.ByPass) {
+					if(HeaterBtn!=null)
+						HeaterBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_disable);    // Disable
+					if(HeaterTimeText!=null)
+						HeaterTimeText.setText("");
+				}
+				else {
+					if (mData.Status.OnOff) {
+						if(HeaterBtn!=null)
+							HeaterBtn.setButtonEventOffDisable();
+
+						int nDefaultImageID = 0;
+						int nPressedImageID = 0;
+						if (mData.Status.HeaterStatus == Venti.HEATER.OFF) {
+							nDefaultImageID = R.drawable.control_venti_btn_off_normal;
+							nPressedImageID = R.drawable.control_venti_btn_off_pressed;
+							if(HeaterTimeText!=null)
+								HeaterTimeText.setText("");
+						}
+						else if (mData.Status.HeaterStatus == Venti.HEATER.STAND_BY) {
+							nDefaultImageID = R.drawable.control_venti_btn_prepare_normal;
+							nPressedImageID = R.drawable.control_venti_btn_prepare_pressed;
+							if(HeaterTimeText!=null)
+								HeaterTimeText.setText("");
+						}
+						else if (mData.Status.HeaterStatus == Venti.HEATER.ON) {
+							nDefaultImageID = R.drawable.control_venti_btn_on_red_normal;
+							nPressedImageID = R.drawable.control_venti_btn_on_red_pressed;
+							if(HeaterTimeText!=null)
+								HeaterTimeText.setText(mData.Status.HeaterTimeRemaining + "분");
+						}
+						if(HeaterBtn!=null)
+							HeaterBtn.setImageChange(nDefaultImageID, nPressedImageID);
+					}
+					else {
+						if(HeaterBtn!=null)
+							HeaterBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
+						if(HeaterTimeText!=null)
+							HeaterTimeText.setText("");
+					}
+				}
+			}
+
+			// 8. 자동운전
+			if (mData.Status.Support.AutoDriving && AutoDrivingBtn!=null) {
+				// [예약운전 & 창호환기 아닌경우] 또는 [타이머운전] 또는 [운전OFF중에 자동운전OFF일시] 자동운전 비활성화
+				if ((mData.Status.Reservation && !mData.Status.Support2.WindowVenti) || (mData.Status.Timer != 0) || (!mData.Status.OnOff && !mData.Status.AutoDriving)) {
+					AutoDrivingBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
+				}
+
+				// 아닐시
+				// [타이머:OFF] [예약운전:OFF] [운전:ON]  [자동운전:OFF] - 켜기 활성화
+				//
+				// [타이머:OFF] [예약운전:OFF] [운전:OFF] [자동운전:ON ] - 끄기 활성화
+				// [타이머:OFF] [예약운전:OFF] [운전:ON ] [자동운전:ON ] - 끄기 활성화
+				else {
+					AutoDrivingBtn.setButtonEventOffDisable();
+					if (mData.Status.AutoDriving) {
+						// 끄기 활성화
+						AutoDrivingBtn.setButtonRearImage();
+					}
+					else {
+						// 켜기 활성화
+						AutoDrivingBtn.setButtonFrontImage();
+					}
+				}
+			}
+
+			// 9. 내부순환
+			if (mData.Status.Support.InnerCycle && InnerCycleBtn!=null) {
+				if (mData.Status.OnOff) {
+					InnerCycleBtn.setButtonEventOffDisable();
+					if (mData.Status.InnerCycle) {
+						InnerCycleBtn.setButtonRearImage();
+					}
+					else {
+						InnerCycleBtn.setButtonFrontImage();
+					}
+				}
+				else {
+					InnerCycleBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_innercycle_disabled);    // Disable
+				}
+				Log.d(TAG, "[Draw_Update] InnerCycle [" + mData.Status.InnerCycle + "]");
+			}
+
+			// 10. 외기청정
+			if (mData.Status.Support.OutAirClean && OutAirCleanBtn!=null) {
+				if (mData.Status.OnOff) {
+					OutAirCleanBtn.setButtonEventOffDisable();
+					if (mData.Status.OutAirClean) {
+						OutAirCleanBtn.setButtonRearImage();
+					}
+					else {
+						OutAirCleanBtn.setButtonFrontImage();
+					}
+				}
+				else {
+					OutAirCleanBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_outairclean_disabled);    // Disable
+				}
+				Log.d(TAG, "[Draw_Update] OutAirClean [" + mData.Status.OutAirClean + "]");
+			}
+
+			// 11. 취침 모드
+			if (mData.Status.Support2.SleepMode && SleepModeBtn!=null) {
+				if (mData.Status.OnOff) {
+					SleepModeBtn.setButtonEventOffDisable();
+					if (mData.Status.Sleep == Venti.SLEEP.SLEEP_ON) {
+						SleepModeBtn.setButtonRearImage();
+					}
+					else {
+						SleepModeBtn.setButtonFrontImage();
+					}
+				}
+				else {
+					SleepModeBtn.setButtonEventOffEnable(R.drawable.control_venti_btn_off_normal);    // Disable
+				}
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception ex) {
+			Log.e(TAG, "[Draw_Update] Exception !!!");
+			//ex.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, ex);
+		}
+	}
+
+	/**
+	 * 풍량에 따른 환기 에니메이션 효과 적용
+	 *
+	 * @param nWind - 변경할 풍량 (VentiAPI.WIND.LOW, VentiAPI.WIND.MID, VentiAPI.WIND.HI)
+	 */
+	private void Draw_FanAnim(byte nWind) {
+		if (mFanAnimStatus == nWind) return;
+
+		if ((nWind == VentiAPI.WIND.LOW) || (nWind == VentiAPI.WIND.MID) || (nWind == VentiAPI.WIND.HI)) {
+			if (mFanAnimHandler == null) return;
+			mFanAnimStatus = nWind;
+			mFanAnimHandler.removeMessages(1);
+			mFanAnimHandler.removeMessages(2);
+			mFanAnimHandler.removeMessages(3);
+			mFanAnimImgCutCount = 0;
+			mFanAnimHandler.sendEmptyMessage(nWind);
+		}
+		else {
+			mFanAnimStatus = 0x00;
+			mFanAnimHandler.removeMessages(1);
+			mFanAnimHandler.removeMessages(2);
+			mFanAnimHandler.removeMessages(3);
+			mFanAnimImg = mFanDefaultAnimImg;
+			if(FanImg!=null)
+				FanImg.setImageResource(mFanAnimImg[4]);
+		}
+	}
+
+	/**
+	 * 예약중 표시 활성화 / 비활성화
+	 *
+	 * @param OnOff - true : [예약중] 보이기, false : [예약중] 숨기기
+	 */
+	private void Draw_Reservation(boolean OnOff) {
+		if(ReservationStatus!=null)
+		{
+			if (OnOff) ReservationStatus.setVisibility(View.VISIBLE);
+			else ReservationStatus.setVisibility(View.INVISIBLE);
+		}
+
+	}
+
+	/**
+	 * 전원버튼 ON/OFF 이미지 교체
+	 *
+	 * @param OnOff - true : ON, false : OFF
+	 */
+	private void Draw_Power(boolean OnOff) {
+		if(OnOffBtn!=null)
+		{
+			if (OnOff) OnOffBtn.setButtonRearImage();
+			else OnOffBtn.setButtonFrontImage();
+		}
+
+	}
+
+	/**
+	 * 풍량버튼 이미지 교체
+	 *
+	 * @param nWind - 변경할 풍량 (VentiAPI.WIND.LOW, VentiAPI.WIND.MID, VentiAPI.WIND.HI)
+	 */
+	private void Draw_Wind(byte nWind) {
+		if (nWind == VentiAPI.WIND.LOW) {
+			if(Wind1Btn!=null)
+				Wind1Btn.setImageResource(Wind1Btn.getPressedImageID());
+			if(Wind2Btn!=null)
+				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
+			if(Wind3Btn!=null)
+				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
+		}
+		else if (nWind == VentiAPI.WIND.MID) {
+			if(Wind1Btn!=null)
+				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
+			if(Wind2Btn!=null)
+				Wind2Btn.setImageResource(Wind2Btn.getPressedImageID());
+			if(Wind3Btn!=null)
+				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
+		}
+		else if (nWind == VentiAPI.WIND.HI) {
+			if(Wind1Btn!=null)
+				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
+			if(Wind2Btn!=null)
+				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
+			if(Wind3Btn!=null)
+				Wind3Btn.setImageResource(Wind3Btn.getPressedImageID());
+		}
+		else {
+			if(Wind1Btn!=null)
+				Wind1Btn.setImageResource(Wind1Btn.getDefaultImageID());
+			if(Wind2Btn!=null)
+				Wind2Btn.setImageResource(Wind2Btn.getDefaultImageID());
+			if(Wind3Btn!=null)
+				Wind3Btn.setImageResource(Wind3Btn.getDefaultImageID());
+		}
+	}
+
+	/**
+	 * 타이머 시간 표시 변경
+	 *
+	 * @param nTimer - 변경할 시간값
+	 */
+	private void Draw_Timer(int nTimer) {
+		String TimerStr = new String();
+		if (!mData.Status.OnOff) {
+
+		}
+		else if (nTimer == 0x00) {
+			TimerStr = "계속";
+		}
+		else {
+			int timer = nTimer;
+			int Hour = timer / 60;
+			if (Hour == 0) TimerStr = timer + " 분";
+			else {
+				int Minute = timer - (Hour * 60);
+				if (Minute == 0) TimerStr = Hour + " 시간";
+				else TimerStr = Hour + " 시간" + "   " + Minute + " 분";
+			}
+		}
+		if(TimerText!=null)
+			TimerText.setText(TimerStr);
+	}
+
+	/**
+	 * 타이머설정 버튼 좌우가 눌렸을 경우 타이머 값을 가져온다.
+	 *
+	 * @param TargetId - 눌린버튼 LEFT or RIGHT (ID.ventimain.button.TIMER_LEFT, ID.ventimain.button.TIMER_RIGHT)
+	 * @return (int) 타이머값
+	 */
+	private int getNextTimerValue(int TargetId) {
+		if (mData.TimerTable == null) return 0;
+		int retTimer = mData.Status.Timer;
+		if (TargetId == ID.VentiMainScreenID.button.TIMER_LEFT) {
+			int FindIndex = mData.TimerTable.length-1;
+			if (retTimer != mData.TimerTable[0]) {
+				for (int i = 0; i < mData.TimerTable.length; i--) {
+					if (retTimer > mData.TimerTable[FindIndex]) break;
+					FindIndex--;
+				}
+			}
+			retTimer = mData.TimerTable[FindIndex];
+		}
+		else if (TargetId == ID.VentiMainScreenID.button.TIMER_RIGHT) {
+			int FindIndex = 0;
+			if (retTimer < mData.TimerTable[mData.TimerTable.length-1]) {
+				for (int i=0; i < mData.TimerTable.length; i++) {
+					if (retTimer < mData.TimerTable[FindIndex]) break;
+					FindIndex++;
+				}
+			}
+			retTimer = mData.TimerTable[FindIndex];
+		}
+		return retTimer;
+	}
+
+
+	// =================================================================================================
+	// [[ Device ]] region
+	// =================================================================================================
+	/**
+	 * 디바이스 API 를 Load 한다.
+	 *
+	 * @param wpapi - 생성시 전달받은 WallPadAPI
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_ApiLoad(WallPadAPI wpapi) {
+		// 1. Mode Check
+		if (OPERATION_MODE != Common.MODE_NOMAL) return -1;
+
+		DebugLogOutput("[Device_ApiLoad] - Start");
+
+		// 2. wpapi Check
+		if (wpapi == null) {
+			Log.e(TAG, "[Device_ApiLoad] - wpapi is null");
+			return -2;
+		}
+
+		// 3. Load API
+		DebugLogOutput("[Device_ApiLoad] - Step1 : Vanti API Load...");
+		try {
+			ventiAPI = wpapi.Get_VentiController();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_VentiController");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_ApiLoad] - ventiAPI is null");
+			return -4;
+		}
+
+		DebugLogOutput("[Device_ApiLoad] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 디바이스에 알림 BR 을 등록한다. (에너지미터)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_BrRegistration(boolean OnOff) {
+		DebugLogOutput("[Device_BrRegistration] - Start (OnOff:" + OnOff + ")");
+		String BR_NAME = ID.VentiMainScreenID.BR_VENTI;
+
+		// 1. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_BrRegistration] - ventiAPI unload !!!");
+			return -1;
+		}
+
+		if (OnOff) {
+			try {
+				//DebugLogOutput("[Device_BrRegistration] - regChangedBR START");
+				ventiAPI.regChangedBR(BR_NAME);
+				//DebugLogOutput("[Device_BrRegistration] - regChangedBR END");
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return -101;
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] ventiAPI.regChangedBR");
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
+				return -101;
+			}
+			super.addBrActionFilter(BR_NAME);
+		}
+		else {
+			try {
+				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR START");
+				ventiAPI.unregChangedBR(BR_NAME);
+				//DebugLogOutput("[Device_BrRegistration] - unregChangedBR END");
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return -102;
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Device_BrRegistration] - [Exception Error] ventiAPI.unregChangedBR");
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
+				return -102;
+			}
+			super.removeBrActionFilter(BR_NAME);
+		}
+		return 0;
+	}
+
+	/**
+	 * 제어기 상태를 가져온다.
+	 *
+	 * @param real - (boolean) true : 실시간 , false : 가장최근
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_Update(boolean real) {
+		DebugLogOutput("[Device_Update] - Start   (real : " + real + ")");
+
+		// 1. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_Update] - ventiAPI unload !!!");
+			return -1;
+		}
+
+		// 2. reflash
+		try {
+			int ret = ventiAPI.Refresh(real);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_Update] refresh - ret (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -2;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_Update] - [Exception Error] ventiAPI.Refresh(" + real + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		// 3. Data Copy
+		mData.Status = ventiAPI.data;
+
+
+//		mData.Status.Fault.FaultByte |= (byte) 0x01;
+//		mData.Status.Fault.FilterChangeFree = true;
+
+//		mData.Status.Fault.FaultByte |= (byte) 0x02;
+//		mData.Status.Fault.FilterChangeMedium = true;
+//
+//		mData.Status.Fault.FaultByte |= (byte) 0x04;
+//		mData.Status.Fault.MotorError = true;
+//
+//		mData.Status.Fault.FaultByte |= (byte) 0x08;
+//		mData.Status.Fault.MotorError = true;
+//
+//		mData.Status.Fault.FaultByte |= (byte) 0x10;
+//		mData.Status.Fault.SafeMode = true;
+//
+//		mData.Status.Fault.FaultByte |= (byte) 0x20;
+//		mData.Status.Fault.SupplyFanError = true;
+//
+//		mData.Status.Fault.FaultByte |= (byte) 0x40;
+//		mData.Status.Fault.TempSensorError = true;
+
+//		mData.Status.Fault.FilterChangeFree = true;
+//		mData.Status.Fault.FilterChangeMedium = true;
+//		mData.Status.Fault.MotorError = true;
+//		mData.Status.Fault.TempSensorError = true;
+//		mData.Status.Fault.SafeMode = true;
+//		mData.Status.Fault.SupplyFanError = true;
+//		mData.Status.Fault.TempSensorError = true;
+
+		// 4. Debug Msg
+		DebugLogOutput(mData.Status.ToDebugString());
+
+		DebugLogOutput("[Device_Update] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 운전모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetOnOff(boolean OnOff) {
+		DebugLogOutput("[Device_SetOnOff] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetOnOff] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetOnOff(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetOnOff] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetOnOff] - [Exception Error] ventiAPI.SetOnOff(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetOnOff] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환풍기 예약 운전 동작을 제어한다.
+	 *
+	 * @param OnOff - 변경할 예약상태 (true : 시작, false : 정지)
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_ReserveCont(boolean OnOff) {
+		DebugLogOutput("[Device_ReserveCont] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_ReserveCont] - ventilationApi unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetReservationOnOff(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_ReserveCont] SetReservationOnOff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_ReserveCont] - [Exception Error] ventiAPI.SetReservationOnOff(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_ReserveCont] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 풍량을 변경한다.
+	 *
+	 * @param Wind - 변경할 풍량 (VentiAPI.WIND.LOW , VentiAPI.WIND.MID, VentiAPI.WIND.HI)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_WindCont(byte Wind) {
+		DebugLogOutput("[Device_WindCont] - Start   (Wind : " + String.format("[%02x]", Wind) + ")");
+
+		// 1. Param Check
+		if (!DataClasses.Venti.WIND.CheckRange(Wind)) {
+			Log.e(TAG, "[Device_WindCont] - Wind Param  Out of range!!! (" + String.format("[%02x]", Wind) + ")");
+			return -2;
+		}
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_WindCont] - ventiAPI unload !!!");
+			return -3;
+		}
+
+		// 3. Control
+		try {
+			int ret = ventiAPI.SetWind(Wind);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_WindCont] SetWind - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -4;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_WindCont] - [Exception Error] ventiAPI.SetWind");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_WindChange] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 타이머를 변경한다.
+	 *
+	 * @param Timer - 변경할 타이머값
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_TimerCont(int Timer) {
+		DebugLogOutput("[Device_TimerCont] - Start   (Timer : " + Timer + ")");
+
+		// 1. Param Check
+		if ((Timer < 0) || (Timer > 240)) {
+			Log.e(TAG, "[Device_TimerCont] - Timer Param  Out of range!!! (" + Timer + ")");
+			return -1;
+		}
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_TimerCont] - ventiAPI unload !!!");
+			return -3;
+		}
+
+		// 3. Control
+		try {
+			int ret = ventiAPI.SetTimer(Timer);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_TimerCont] SetTimer - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -4;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_TimerCont] - [Exception Error] ventiAPI.SetTimer");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_TimerCont] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 자연환기 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetByPass(boolean OnOff) {
+		DebugLogOutput("[Device_SetByPass] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetByPass] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetByPass(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetByPass] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetByPass] - [Exception Error] ventiAPI.SetByPass(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetByPass] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 히터 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetHeater(boolean OnOff) {
+		DebugLogOutput("[Device_SetHeater] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetHeater] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetHeater(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetHeater] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetHeater] - [Exception Error] ventiAPI.SetHeater(" + OnOff + ")");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetHeater] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 필터교환을 리셋한다.
+	 *
+	 * param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetFilterReset() {
+		DebugLogOutput("[Device_SetFilterReset] - Start");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetFilterReset] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetFilterReset();
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetFilterReset] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetFilterReset] - [Exception Error] ventiAPI.SetFilterReset()");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetFilterReset] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 자동환기 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetAutoDriving(boolean OnOff) {
+		DebugLogOutput("[Device_SetAutoDriving] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetAutoDriving] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetAutoDriving(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetAutoDriving] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetAutoDriving] - [Exception Error] ventiAPI.SetAutoDriving(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetAutoDriving] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 내부순환 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetInnerCycle(boolean OnOff) {
+		DebugLogOutput("[Device_SetInnerCycle] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetInnerCycle] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetInnerCycle(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetInnerCycle] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetInnerCycle] - [Exception Error] ventiAPI.SetInnerCycle(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetInnerCycle] - OK");
+
+		return 0;
+	}
+
+	/**
+	 * 환기의 외기청정 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetOutAirClean(boolean OnOff) {
+		DebugLogOutput("[Device_SetOutAirClean] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetOutAirClean] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetOutAirClean(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetOutAirClean] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetOutAirClean] - [Exception Error] ventiAPI.SetOutAirClean(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetOutAirClean] - OK");
+
+		return 0;
+	}
+	/**
+	 * 환기의 취침 모드를 변경한다.
+	 *
+	 * @param OnOff - (boolean) 변경할 운전모드 (true:ON , false:OFF)
+	 *
+	 * @return (int) - >=0 : 성공, <0 : 실패
+	 */
+	private int Device_SetSleepMode(boolean OnOff) {
+		DebugLogOutput("[Device_SetSleepMode] - Start   (OnOff : " + OnOff + ")");
+
+		// 1. Param Check
+
+		// 2. Api Load Check
+		if (ventiAPI == null) {
+			Log.e(TAG, "[Device_SetSleepMode] - ventiAPI unload !!!");
+			return -2;
+		}
+
+		// 2. Control
+		try {
+			int ret = ventiAPI.SetSleepMode(OnOff);
+			if (ret < 0) {
+				Log.e(TAG, "[Device_SetSleepMode] Onoff - Error (" + ret + ")   ErrorCode = " + ventiAPI.ErrorCode.ErrStr());
+				return -3;
+			}
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
+			Log.e(TAG, "[Device_SetSleepMode] - [Exception Error] ventiAPI.SetSleepMode(" + OnOff + ")");
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+			return -100;
+		}
+
+		DebugLogOutput("[Device_SetSleepMode] - OK");
+
+		return 0;
+	}
+
+	// =================================================================================================
+	// [[ Sample ]] region
+	// =================================================================================================
+	/**
+	 * (영업샘플모드) 가상으로 환기의 전원을 ON/OFF 한다.
+	 */
+	private void Sample_PowerOnOff() {
+		if (mData.Status.OnOff) {
+			mData.Status.OnOff = false;
+			mData.Status.Timer = 0;
+		}
+		else {
+			mData.Status.OnOff = true;
+			mData.Status.Wind = VentiAPI.WIND.LOW;
+		}
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 예약운전을 ON/OFF 한다.
+	 */
+	private void Sample_ReservationOnOff(boolean OnOff) {
+		if (OnOff) mData.Status.Reservation = true;
+		else mData.Status.Reservation = false;
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 풍량을 제어한다.
+	 *
+	 * @param Wind - 변경할 풍량 상태
+	 */
+	private void Sample_WindCont(byte Wind) {
+		mData.Status.Wind = Wind;
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 타이머를 변경한다.
+	 *
+	 * @param TargetId - 눌린 버튼
+	 */
+	private void Sample_TimerCont(int TargetId) {
+		mData.Status.Timer = getNextTimerValue(TargetId);
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 내부순환을 제어한다.
+	 *
+	 * @param OnOff - 변경할 상태
+	 */
+	private void Sample_InnerCycle(boolean OnOff) {
+        if (OnOff) mData.Status.OutAirClean = false;
+		mData.Status.InnerCycle = OnOff;
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 외기청정을 제어한다.
+	 *
+	 * @param OnOff - 변경할 상태
+	 */
+	private void Sample_OutAirClean(boolean OnOff) {
+        if (OnOff) mData.Status.InnerCycle = false;
+		mData.Status.OutAirClean = OnOff;
+
+		Draw_Update();
+	}
+
+	/**
+	 * (영업샘플모드) 가상으로 환기의 외기청정을 제어한다.
+	 *
+	 * @param OnOff - 변경할 상태
+	 */
+	private void Sample_SleepMode(boolean OnOff) {
+		byte bOnOff = (byte)0x00;
+		if (OnOff) bOnOff = (byte)0x01;
+
+		mData.Status.Sleep = bOnOff;
+
+		Draw_Update();
+	}
+
+}