设置中添加系统视图
author罗正yun <1732036298@qq.com>
Mon, 22 Jan 2024 08:00:03 +0000 (16:00 +0800)
committer罗正yun <1732036298@qq.com>
Mon, 22 Jan 2024 08:00:03 +0000 (16:00 +0800)
51 files changed:
code/sdk/application/wearable/nativeapp/CMakeLists.txt
code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h
code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h
code/sdk/application/wearable/nativeapp/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/nativeapp/nativeui/blood/src/BloodView.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassControlView.cpp
code/sdk/application/wearable/nativeapp/nativeui/dial/src/Digital_clockView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguagePresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguageView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSupervisePresenter.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSuperviseView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemView.h [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguagePresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguageView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSupervisePresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSuperviseView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemView.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/nativeui/traing/src/TraingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/weather/src/WeatherControlView.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_ABOUT_THE_WATCH.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_FACTORY_RESET.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SUPERVISE.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SYSTEM_LANGUAGE.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/factoryreset.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin [new file with mode: 0644]

index ac1109e..55aa829 100755 (executable)
@@ -212,6 +212,23 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/WeatherControlView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/WeatherView.cpp
 
+    #系统
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemPresenter.cpp                       
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemView.cpp                          
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemAboutPresenter.cpp                  
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemAboutView.cpp                     
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemSupervisePresenter.cpp    
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemSuperviseView.cpp         
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemLanguagePresenter.cpp       
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemLanguageView.cpp     
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemRebootPresenter.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemRebootView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemShoutDownPresenter.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemShoutDownView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemFactoryResetPresenter.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemFactoryResetView.cpp
+
+
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/compass/src/CompassControlView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/compass/src/CompassCalibrationView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/compass/src/CompassModel.cpp
index 9beb592..8cdaf6c 100755 (executable)
@@ -44,6 +44,13 @@ typedef enum : uint16_t
     VIEW_WEATHER_REPORT,         // 气象报告
     VIEW_FUTURE_WEATHER,         // 未来天气
     VIEW_GET_WEATHER_DATA_ERROR, // 获取天气数据失败
+    VIEW_SYSTEM,                 // 系统
+    VIEW_SYSTEM_ABOUT_WATCH,     // 系统:关于手表
+    VIEW_SYSTEM_SUPERVISE,       // 系统:监管
+    VIEW_SYSTEM_SYSTEM_LANGUAGE, // 系统:系统语言
+    VIEW_SYSTEM_REBOOT,          // 系统:重新启动
+    VIEW_SYSTEM_SHOUTDOWN,       // 系统:关机
+    VIEW_SYSTEM_FACTORY_RESET,   // 系统:恢复出厂设置
     /* -------------------------------------------------------------------------- */
     VIEW_MAIN_TEMP,              // 体温界面(暂时不用)
     VIEW_OFFLINEVOICE,           // 语音助手界面(暂时不用)
index e5bc634..cda7567 100755 (executable)
@@ -47,6 +47,13 @@ namespace OHOS
         void InitFutureWeatherSlice(void);  
         void InitGetWeatherDataErrorSlice(void);
         /* -------------------------------------------------------------------------- */
+        void InitSystemSlice(void);                  
+        void InitSystemAboutWatchSlice(void);       
+        void InitSystemSuperviseSlice(void);        
+        void InitSystemLanguageSlice(void);         
+        void InitSystemRebootSlice(void);           
+        void InitSystemShoutDownSlice(void);        
+        void InitSystemFactoryResetSlice(void);      
     private:
         void InitAllNativeSlices(void);
 
index b275a69..e347034 100755 (executable)
@@ -206,6 +206,8 @@ namespace OHOS
     static constexpr const char *PNG_SETTING_NEXT_IMAGE = APP_RES_PATH "/SETTING_NEXT.bin";             //  箭头图片
     static constexpr const char *PNG_SETTING_BACKGROUND_IMAGE = APP_RES_PATH "/SETTING_BACKGROUND.bin"; //  按钮的背景图片
     static constexpr const char *PNG_VOLUME_CONTROL_VECTOR = APP_RES_PATH "/VolumeControlVector.bin";   //  调节音量图片
+    static constexpr const char *PNG_SYSTEM_CHECK_ON_IMAGE = APP_RES_PATH "/SYSTEM_CheckOn.bin";        // 勾
+    static constexpr const char *PNG_SYSTEM_CHECK_OFF_IMAGE = APP_RES_PATH "/SYSTEM_CheckOff.bin";      // 叉
     static constexpr const char *PNG_ANIMATOR1_IMAGE = APP_RES_PATH "/Record/animator1.bin";
     static constexpr const char *PNG_ANIMATOR2_IMAGE = APP_RES_PATH "/Record/animator2.bin";
     /* -------------------------------- 已删除的不必要图片 ------------------------------- */
index d90ee3c..7763c66 100755 (executable)
 #include "weather/include/GetWeatherDataErrorPresenter.h"
 #include "weather/include/GetWeatherDataErrorView.h"
 
+#include "system/include/SystemPresenter.h"
+#include "system/include/SystemView.h"
+#include "system/include/SystemAboutPresenter.h"
+#include "system/include/SystemAboutView.h"
+#include "system/include/SystemSupervisePresenter.h"
+#include "system/include/SystemSuperviseView.h"
+#include "system/include/SystemLanguagePresenter.h"
+#include "system/include/SystemLanguageView.h"
+#include "system/include/SystemRebootPresenter.h"
+#include "system/include/SystemRebootView.h"
+#include "system/include/SystemShoutDownPresenter.h"
+#include "system/include/SystemShoutDownView.h"
+#include "system/include/SystemFactoryResetPresenter.h"
+#include "system/include/SystemFactoryResetView.h"
+
 #include "BluetoothHeadsetEvent.h"
 #include "graphic_hardware_config.h"
 #include "graphic_service.h"
@@ -103,15 +118,22 @@ namespace OHOS
         {VIEW_INDOORWALK, &NativeLauncher::InitIndoorWalkSlice},
         {VIEW_SHUTDOWN_OR_REBOOT, &NativeLauncher::InitRebootSlice},
         {VIEW_DIAL, &NativeLauncher::InitDialSlice},
-        {VIEW_WEATHER,&NativeLauncher::InitWeatherSlice},                                            //天气
-        {VIEW_WEATHER_REPORT,&NativeLauncher::InitWeatherReportSlice},                               //气象报告
-        {VIEW_FUTURE_WEATHER,&NativeLauncher::InitFutureWeatherSlice},                               //未来天气
-        {VIEW_GET_WEATHER_DATA_ERROR,&NativeLauncher::InitGetWeatherDataErrorSlice},                 //获取天气数据失败
+        {VIEW_WEATHER, &NativeLauncher::InitWeatherSlice},                            // 天气
+        {VIEW_WEATHER_REPORT, &NativeLauncher::InitWeatherReportSlice},               // 气象报告
+        {VIEW_FUTURE_WEATHER, &NativeLauncher::InitFutureWeatherSlice},               // 未来天气
+        {VIEW_GET_WEATHER_DATA_ERROR, &NativeLauncher::InitGetWeatherDataErrorSlice}, // 获取天气数据失败
+        {VIEW_SYSTEM, &NativeLauncher::InitSystemSlice},                              // 系统实例化地址
+        {VIEW_SYSTEM_ABOUT_WATCH, &NativeLauncher::InitSystemAboutWatchSlice},        // 系统:关于手表实例化地址
+        {VIEW_SYSTEM_SUPERVISE, &NativeLauncher::InitSystemSuperviseSlice},           // 系统:监管实例化地址
+        {VIEW_SYSTEM_SYSTEM_LANGUAGE, &NativeLauncher::InitSystemLanguageSlice},      // 系统:系统语言实例化地址
+        {VIEW_SYSTEM_REBOOT, &NativeLauncher::InitSystemRebootSlice},                 // 系统:重启实例化地址
+        {VIEW_SYSTEM_SHOUTDOWN, &NativeLauncher::InitSystemShoutDownSlice},           // 系统:关机实例化地址
+        {VIEW_SYSTEM_FACTORY_RESET, &NativeLauncher::InitSystemFactoryResetSlice},    // 系统:恢复出厂设置实例化地址
         //{VIEW_MAIN_ACTIVITY, &NativeLauncher::InitActivitySlice},
         //{VIEW_OFFLINEVOICE, &NativeLauncher::InitOfflineVoice},
         //{VIEW_MAIN_TEMP, &NativeLauncher::InitMainTempSlice},
         //{VIEW_UISAMPLE, &NativeLauncher::InitUISampleSlice}
-        };
+    };
 
     static const ViewIdToString VIEW_MAPPER[] = {
         {VIEW_MAIN, "mainView"},
@@ -127,7 +149,7 @@ namespace OHOS
         {VIEW_CONNECT_PHONE, "ConnectPhoneView"},
         {VIEW_INDOORWALK, "IndoorWalkView"},
         {VIEW_SHUTDOWN_OR_REBOOT, "RebootView"}};
-    
+
     NativeLauncher::NativeLauncher() {}
     NativeLauncher::~NativeLauncher() {}
 
@@ -430,4 +452,69 @@ namespace OHOS
         NativeAbility::GetInstance().AddSliceProxy(VIEW_GET_WEATHER_DATA_ERROR, getweatherdataerror);
     }
 
+    void NativeLauncher::InitSystemSlice(void) // 系统
+    {
+        SliceProxy *system = new AbilitySliceProxy<SystemView, SystemPresenter>;
+        if (system == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM, system);
+    }
+    void NativeLauncher::InitSystemAboutWatchSlice(void) // 系统:关于手表
+    {
+        SliceProxy *systemaboutwatch = new AbilitySliceProxy<SystemAboutView, SystemAboutPresenter>;
+        if (systemaboutwatch == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_ABOUT_WATCH, systemaboutwatch);
+    }
+
+    void NativeLauncher::InitSystemSuperviseSlice(void) // 系统:监管
+    {
+        SliceProxy *systemsupervise = new AbilitySliceProxy<SystemSuperviseView, SystemSupervisePresenter>;
+        if (systemsupervise == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_SUPERVISE, systemsupervise);
+    }
+
+    void NativeLauncher::InitSystemLanguageSlice(void) // 系统:系统语言
+    {
+        SliceProxy *systemlanguage = new AbilitySliceProxy<SystemLanguageView, SystemLanguagePresenter>;
+        if (systemlanguage == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_SYSTEM_LANGUAGE, systemlanguage);
+    }
+    void NativeLauncher::InitSystemRebootSlice(void) // 系统:重新启动
+    {
+        SliceProxy *systemreboot = new AbilitySliceProxy<SystemRebootView, SystemRebootPresenter>;
+        if (systemreboot == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_REBOOT, systemreboot);
+    }
+    void NativeLauncher::InitSystemShoutDownSlice(void) // 系统:关机
+    {
+        SliceProxy *systemshoutdown = new AbilitySliceProxy<SystemShoutDownView, SystemShoutDownPresenter>;
+        if (systemshoutdown == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_SHOUTDOWN, systemshoutdown);
+    }
+    void NativeLauncher::InitSystemFactoryResetSlice(void) // 系统:恢复出厂设置
+    {
+        SliceProxy *systemfactoryreset = new AbilitySliceProxy<SystemFactoryResetView, SystemFactoryResetPresenter>;
+        if (systemfactoryreset == nullptr)
+        {
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_FACTORY_RESET, systemfactoryreset);
+    }
 }
index 74a2360..34b69c6 100644 (file)
@@ -25,13 +25,14 @@ namespace OHOS
 \r
     BloodView::BloodView()\r
     {\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodView::BloodView");\r
         SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
         g_pBloodView = this;\r
     }\r
 \r
     BloodView::~BloodView()\r
     {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodView::~BloodView()");\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodView::~BloodView");\r
         RemoveAll();\r
         DeInit();\r
         g_pBloodView = nullptr;\r
@@ -242,7 +243,6 @@ namespace OHOS
     }\r
     void BloodView::PreLoad(void)\r
     {\r
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "void BloodView::PreLoad(void)");\r
         if (!viewiInitStatus)\r
         {\r
             InitView();\r
index 4559f8a..2651ea9 100755 (executable)
@@ -6,6 +6,7 @@
  */
 #include "CompassControlView.h"
 #include "CompassModel.h"
+#include "wearable_log.h"
 
 namespace OHOS {
 CompassControlView::CompassControlView()
@@ -69,7 +70,6 @@ bool CompassControlView::InitView(void)
 
 void CompassControlView::PreLoad(void)
 {
-    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "void CompassControlView::PreLoad(void)");
     if (!viewiInitStatus) {
         InitView();
         viewiInitStatus = true;
index 85936f9..80a8d11 100644 (file)
@@ -101,11 +101,13 @@ namespace OHOS
     static Digital_clockView *g_pDigital_clockView{nullptr};
     Digital_clockView::Digital_clockView()
     {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Digital_clockView::Digital_clockView");
         SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
         g_pDigital_clockView = this;
     }
     Digital_clockView::~Digital_clockView()
     {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Digital_clockView::~Digital_clockView");
         RemoveAll();
         DeInit();
         g_pDigital_clockView = nullptr;
@@ -798,7 +800,6 @@ namespace OHOS
      */
     void Digital_clockView::PreLoad(void)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " void Digital_clockView::PreLoad(void)");
         if (!viewiInitStatus)
         {
             InitView();
index 2d4a462..25af5b8 100755 (executable)
@@ -20,7 +20,7 @@
 #include "ModelListenerSample.h"
 #include "ScreenModels.h"
 #include "ActivityWeekView.h"
-#include "CompassControlView.h"
+#include "compass/include/CompassControlView.h"
 #include "MainClockView.h"
 #include "PlayersView.h"
 #include "MainPresenterSample.h"
index b19bcc4..411c6ec 100755 (executable)
@@ -54,6 +54,7 @@ namespace OHOS
             recordCard[i] = nullptr;
             pageStatus[i] = false;
         }
+       mainSwipeGroup->RemoveAll();
 /* -------------------------------------------------------------------------- */
 #if 0
         UIView *view = static_cast<UICrossView *>(MainViewSample::mainSwipeGroup)->GetChildrenHead();
@@ -111,7 +112,7 @@ namespace OHOS
         /* -------------------------------------------------------------------------- */
         if (mainClockView != nullptr)
         {
-            mainClockView->RemoveAll();
+            //mainClockView->RemoveAll();
             delete mainClockView;
             mainClockView = nullptr;
         }
@@ -122,13 +123,13 @@ namespace OHOS
         }
         if (bloodView != nullptr)
         {
-            bloodView->RemoveAll();
+            //bloodView->RemoveAll();
             delete bloodView;
             bloodView = nullptr;
         }
         if (traingView != nullptr)
         {
-            traingView->RemoveAll();
+            //traingView->RemoveAll();
             delete traingView;
             traingView = nullptr;
         }
@@ -346,7 +347,7 @@ namespace OHOS
         }
         return playersView;
     }
-
+    //主界面指南针卡片
     UICardPage *MainViewSample::InitCompassPage(void)
     {
         compassControlView = new CompassControlView();
index 76cdd00..73d0eb7 100755 (executable)
@@ -827,7 +827,6 @@ bool PlayersView::InitView(void)
 \r
 void PlayersView::PreLoad(void)\r
 {\r
-    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersView::PreLoad(void)");\r
     if (!viewiInitStatus) {\r
         if (InitView()) {\r
             viewiInitStatus = true;\r
index 4f21374..ee54b72 100755 (executable)
@@ -29,9 +29,9 @@ namespace OHOS
         settings[4] = {SETTING_ITEM_FOUR, PNG_SETTINGS_SYSTEM, "系统", true};
         settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ZERO, VIEW_SHUTDOWN_OR_REBOOT));
         settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ONE, VIEW_BLUETOOTH_EARPHONE));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_TWO, VIEW_SHUTDOWN_OR_REBOOT));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_THREE, VIEW_SHUTDOWN_OR_REBOOT));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FOUR, VIEW_SHUTDOWN_OR_REBOOT));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_TWO, VIEW_SYSTEM));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_THREE, VIEW_SYSTEM));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FOUR, VIEW_SYSTEM));
     }
 
     const SettingItem *SettingModel::GetSettinglistItems() const
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutPresenter.h
new file mode 100644 (file)
index 0000000..4938e28
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef SYSTEM_ABOUT_PRESENTER_H\r
+#define SYSTEM_ABOUT_PRESENTER_H\r
+ \r
+#include "Presenter.h"\r
+ \r
+#include "SystemAboutView.h"\r
+ \r
+namespace OHOS\r
+{\r
+    class SystemAboutView;\r
+       \r
+    class SystemAboutPresenter : public Presenter<SystemAboutView>,\r
+                                 public UIView::OnClickListener,\r
+                                 public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemAboutPresenter();\r
+        virtual ~SystemAboutPresenter();\r
+ \r
+        void OnStart() override;  \r
+        void OnPause() override;  \r
+        void OnResume() override; \r
+        void OnStop() override;   \r
+ \r
+        static SystemAboutPresenter *GetInstance();     \r
+ \r
+    private:\r
+        //因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override; \r
+        bool OnDrag(UIView &view, const DragEvent &event) override;   \r
+    };\r
+} //namespace OHOS\r
+ \r
+ \r
+#endif  //SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutView.h
new file mode 100644 (file)
index 0000000..6a68123
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef SYSTEM_ABOUT_VIEW_H\r
+#define SYSTEM_ABOUT_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_label.h"\r
+#include "components/ui_image_view.h"\r
+namespace OHOS\r
+{\r
+    class SystemAboutPresenter;\r
+    class SystemAboutView : public View<SystemAboutPresenter>\r
+    {\r
+\r
+    public:\r
+        SystemAboutView();\r
+        virtual ~SystemAboutView();\r
+        static SystemAboutView *GetInstance(void);\r
+\r
+        UILabel *InitLabel(int left, int top, int width, int height, const char *text, const char *viewId, int fontSize, int fontlineHeigh, uint16_t speed);\r
+\r
+    public:\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+        void SystemAboutInitIView(void);\r
+        void DeSystemAboutInitIView(void);\r
+\r
+    private:\r
+        UIViewGroup *container_ = nullptr;\r
+        UIScrollView *scrollView1_ = nullptr;\r
+        UILabel *label1_ = nullptr;\r
+        UILabel *label2_ = nullptr;\r
+        UILabel *label3_ = nullptr;\r
+        UILabel *label4_ = nullptr;\r
+        UILabel *label5_ = nullptr;\r
+        UILabel *label6_ = nullptr;\r
+        UILabel *label7_ = nullptr;\r
+        UILabel *label8_ = nullptr;\r
+        UILabel *label9_ = nullptr;\r
+        UILabel *label10_ = nullptr;\r
+        UILabel *label11_ = nullptr;\r
+        UILabel *label12_ = nullptr;\r
+        UILabel *label13_ = nullptr;\r
+\r
+        UIImageView *image = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetPresenter.h
new file mode 100644 (file)
index 0000000..f23356d
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef SYSTEM_FACTORYRESET_PRESENTER_H\r
+#define SYSTEM_FACTORYRESET_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+\r
+#include "SystemFactoryResetView.h"\r
+\r
+namespace OHOS\r
+{\r
+    class SystemFactoryResetView;\r
+\r
+    class SystemFactoryResetPresenter : public Presenter<SystemFactoryResetView>,\r
+                                  public UIView::OnClickListener,\r
+                                  public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemFactoryResetPresenter();\r
+        virtual ~SystemFactoryResetPresenter();\r
+\r
+        void OnStart() override;\r
+        void OnPause() override;\r
+        void OnResume() override;\r
+        void OnStop() override;\r
+\r
+        static SystemFactoryResetPresenter *GetInstance();\r
+\r
+    private:\r
+        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override;\r
+        bool OnDrag(UIView &view, const DragEvent &event) override;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemFactoryResetView.h
new file mode 100644 (file)
index 0000000..c848700
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef SYSTEM_FACTORYRESET_VIEW_H\r
+#define SYSTEM_FACTORYRESET_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_button.h"\r
+namespace OHOS\r
+{\r
+    static const char *FACTORYRESET_CHECKON  = "ShoutDownButtonCheckOn";//确认\r
+    static const char *FACTORYRESET_CHECKOFF = "ShoutDownButtonCheckOff";//取消\r
+    class SystemFactoryResetPresenter;\r
+    class SystemFactoryResetView : public View<SystemFactoryResetPresenter>\r
+    {\r
+\r
+    public:\r
+        SystemFactoryResetView();\r
+        virtual ~SystemFactoryResetView();\r
+        static SystemFactoryResetView *GetInstance(void);\r
+\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+\r
+        void InitView(void);\r
+        void DeInitView(void);\r
+\r
+        UIViewGroup *container_ = nullptr;\r
+        UIImageView *FactoryResetImage = nullptr;\r
+        UIButton *FactoryResetButtonCheckOn = nullptr;\r
+        UIButton *FactoryResetButtonCheckOff = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguagePresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguagePresenter.h
new file mode 100644 (file)
index 0000000..f4406d4
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef SYSTEM_LANGUAGE_PRESENTER_H\r
+#define SYSTEM_LANGUAGE_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+#include "SystemLanguageView.h"\r
+#include "components/ui_checkbox.h"\r
+namespace OHOS\r
+{\r
+    class SystemLanguageView;\r
+\r
+    class SystemLanguagePresenter : public Presenter<SystemLanguageView>,\r
+                                    public UIView::OnClickListener,\r
+                                    public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemLanguagePresenter();\r
+        SystemLanguagePresenter(UICheckBox *checkbox1, UICheckBox *checkbox2) : m_checkbox1(checkbox1), m_checkbox2(checkbox2) {}\r
+        virtual ~SystemLanguagePresenter();\r
+\r
+        void UpdateCheckBoxState(UICheckBox &checkbox, bool isSelected);\r
+        //void ToggleCheckBoxState(UICheckBox &checkbox);\r
+\r
+    public:\r
+        void OnStart() override;\r
+        void OnPause() override;\r
+        void OnResume() override;\r
+        void OnStop() override;\r
+\r
+        static SystemLanguagePresenter *GetInstance();\r
+\r
+    private:\r
+        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override;\r
+        bool OnDrag(UIView &view, const DragEvent &event) override;\r
+\r
+    private:\r
+        UICheckBox *m_checkbox1 = nullptr;\r
+        UICheckBox *m_checkbox2 = nullptr;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguageView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguageView.h
new file mode 100644 (file)
index 0000000..7e251b5
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef SYSTEM_LANGUAGE_VIEW_H\r
+#define SYSTEM_LANGUAGE_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_label.h"\r
+#include "components/ui_checkbox.h"\r
+#include "components/ui_image_view.h"\r
+namespace OHOS\r
+{\r
+    static const char *SIMPLIFIED_CHINESE_BUTTON = "SimplifiedChineseButton";     // 简体中文 button\r
+    static const char *ENGLISH_BUTTON = "EnglishButton";                          // English button\r
+    static const char *SIMPLIFIED_CHINESE_CHECKBOX = "SimplifiedChineseCheckBox"; // 简体中文 checkbox\r
+    static const char *ENGLISH_CHECKBOX = "EnglishCheckBox";                      // English checkbox\r
+\r
+    class SystemLanguagePresenter;\r
+    class SystemLanguageView : public View<SystemLanguagePresenter>\r
+    {\r
+\r
+    public:\r
+        SystemLanguageView();\r
+        virtual ~SystemLanguageView();\r
+        static SystemLanguageView *GetInstance(void);\r
+\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+        void InitView(void);\r
+        void DeInitView(void);\r
+\r
+        void init(void);\r
+\r
+    private:\r
+        UIViewGroup *container_ = nullptr;\r
+        UIScrollView *scrollView = nullptr;\r
+        UILabel *LanguageLabel = nullptr;\r
+        UIImageView *SimplifiedChineseImage = nullptr;\r
+        UICheckBox *SimplifiedChineseCheckBox = nullptr;\r
+        UIImageView *EnglishImage = nullptr;\r
+        UILabel *SimplifiedChineseLabel = nullptr;\r
+        UILabel *EnglishLabel = nullptr;\r
+        UICheckBox *EnglishCheckBox = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemPresenter.h
new file mode 100644 (file)
index 0000000..2a84cd2
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef SYSTEM_PRESENTER_H\r
+#define SYSTEM_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+ \r
+#include "SystemView.h"\r
+ \r
+namespace OHOS\r
+{\r
+    class SystemView;\r
+       \r
+    class SystemPresenter : public Presenter<SystemView>,\r
+                                 public UIView::OnClickListener,\r
+                                 public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemPresenter();\r
+        virtual ~SystemPresenter();\r
+ \r
+        void OnStart() override;  \r
+        void OnPause() override;  \r
+        void OnResume() override; \r
+        void OnStop() override;   \r
+ \r
+        static SystemPresenter *GetInstance();     \r
+ \r
+    private:\r
+        //因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override; \r
+        bool OnDrag(UIView &view, const DragEvent &event) override;   \r
+    };\r
+} //namespace OHOS\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootPresenter.h
new file mode 100644 (file)
index 0000000..9970612
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef SYSTEM_REBOOT_PRESENTER_H\r
+#define SYSTEM_REBOOT_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+\r
+#include "SystemRebootView.h"\r
+\r
+namespace OHOS\r
+{\r
+    class SystemRebootView;\r
+\r
+    class SystemRebootPresenter : public Presenter<SystemRebootView>,\r
+                                  public UIView::OnClickListener,\r
+                                  public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemRebootPresenter();\r
+        virtual ~SystemRebootPresenter();\r
+\r
+        void OnStart() override;\r
+        void OnPause() override;\r
+        void OnResume() override;\r
+        void OnStop() override;\r
+\r
+        static SystemRebootPresenter *GetInstance();\r
+\r
+    private:\r
+        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override;\r
+        bool OnDrag(UIView &view, const DragEvent &event) override;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemRebootView.h
new file mode 100644 (file)
index 0000000..5b25a88
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef SYSTEM_REBOOT_VIEW_H\r
+#define SYSTEM_REBOOT_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_button.h"\r
+namespace OHOS\r
+{\r
+    static const char *REBOOT_CHECKON  = "ShoutDownButtonCheckOn";//确认\r
+    static const char *REBOOT_CHECKOFF = "ShoutDownButtonCheckOff";//取消\r
+    class SystemRebootPresenter;\r
+    class SystemRebootView : public View<SystemRebootPresenter>\r
+    {\r
+\r
+    public:\r
+        SystemRebootView();\r
+        virtual ~SystemRebootView();\r
+        static SystemRebootView *GetInstance(void);\r
+\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+\r
+        void InitView(void);\r
+        void DeInitView(void);\r
+\r
+        UIViewGroup *container_ = nullptr;\r
+        UIImageView *RebootImage = nullptr;\r
+        UIButton *RebootButtonCheckOn = nullptr;\r
+        UIButton *RebootButtonCheckOff = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownPresenter.h
new file mode 100644 (file)
index 0000000..c18289e
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef SYSTEM_SHOUTDOWN_PRESENTER_H\r
+#define SYSTEM_SHOUTDOWN_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+\r
+#include "SystemShoutDownView.h"\r
+\r
+namespace OHOS\r
+{\r
+    class SystemShoutDownView;\r
+\r
+    class SystemShoutDownPresenter : public Presenter<SystemShoutDownView>,\r
+                                     public UIView::OnClickListener,\r
+                                     public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemShoutDownPresenter();\r
+        virtual ~SystemShoutDownPresenter();\r
+\r
+        void OnStart() override;\r
+        void OnPause() override;\r
+        void OnResume() override;\r
+        void OnStop() override;\r
+\r
+        static SystemShoutDownPresenter *GetInstance();\r
+\r
+    private:\r
+        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override;\r
+        bool OnDrag(UIView &view, const DragEvent &event) override;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemShoutDownView.h
new file mode 100644 (file)
index 0000000..d361513
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef SYSTEM_SHOUTDOWN_VIEW_H\r
+#define SYSTEM_SHOUTDOWN_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_button.h"\r
+namespace OHOS\r
+{\r
+    static const char *SHOUTDOWN_BUTTON_CHECKON  = "ShoutDownButtonCheckOn";//确认\r
+    static const char *SHOUTDOWN_BUTTON_CHECKOFF = "ShoutDownButtonCheckOff";//取消\r
+    class SystemShoutDownPresenter;\r
+    class SystemShoutDownView : public View<SystemShoutDownPresenter>\r
+    {\r
+\r
+    public:\r
+        SystemShoutDownView();\r
+        virtual ~SystemShoutDownView();\r
+        static SystemShoutDownView *GetInstance(void);\r
+\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+\r
+        void InitView(void);\r
+        void DeInitView(void);\r
+\r
+        UIViewGroup *container_ = nullptr;\r
+        UIImageView *ShoutDownImage = nullptr;\r
+        UIButton *ShoutDownButtonCheckOn = nullptr;\r
+        UIButton *ShoutDownButtonCheckOff = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSupervisePresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSupervisePresenter.h
new file mode 100644 (file)
index 0000000..df8183c
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef SYSTEM_SUPERVISE_PRESENTER_H\r
+#define SYSTEM_SUPERVISE_PRESENTER_H\r
+\r
+#include "Presenter.h"\r
+\r
+#include "SystemSuperviseView.h"\r
+\r
+namespace OHOS\r
+{\r
+    class SystemSuperviseView;\r
+\r
+    class SystemSupervisePresenter : public Presenter<SystemSuperviseView>,\r
+                                     public UIView::OnClickListener,\r
+                                     public UIView::OnDragListener\r
+    {\r
+    public:\r
+        SystemSupervisePresenter();\r
+        virtual ~SystemSupervisePresenter();\r
+\r
+        void OnStart() override;\r
+        void OnPause() override;\r
+        void OnResume() override;\r
+        void OnStop() override;\r
+\r
+        static SystemSupervisePresenter *GetInstance();\r
+\r
+    private:\r
+        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;\r
+        bool OnClick(UIView &view, const ClickEvent &event) override;\r
+        bool OnDrag(UIView &view, const DragEvent &event) override;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSuperviseView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSuperviseView.h
new file mode 100644 (file)
index 0000000..ba426fb
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef SYSTEM_SUPERVISE_VIEW_H\r
+#define SYSTEM_SUPERVISE_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_label.h"\r
+namespace OHOS\r
+{\r
+    class SystemSupervisePresenter;\r
+    class SystemSuperviseView : public View<SystemSupervisePresenter>\r
+    {\r
+\r
+    public:\r
+        SystemSuperviseView();\r
+        virtual ~SystemSuperviseView();\r
+        static SystemSuperviseView *GetInstance(void);\r
+        UILabel *InitLabel(int left, int top, int width, int height, const char *text, const char *viewId, int fontSize, int fontlineHeigh, uint16_t speed);\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+        void InitView(void);\r
+        void DeInitView(void);\r
+\r
+    private:\r
+        UIViewGroup *container_ = nullptr;\r
+        UIScrollView *scrollView1_ = nullptr;\r
+        UILabel *label1_ = nullptr;\r
+        UILabel *label2_ = nullptr;\r
+        UILabel *label3_ = nullptr;\r
+        UILabel *label4_ = nullptr;\r
+        UILabel *label5_ = nullptr;\r
+    };\r
+} // namespace OHOS\r
+#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemView.h b/code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemView.h
new file mode 100644 (file)
index 0000000..a135aec
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef SYSTEM_VIEW_H\r
+#define SYSTEM_VIEW_H\r
+\r
+#include "BaseView.h"\r
+#include "View.h"\r
+\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_label.h"\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_button.h"\r
+\r
+namespace OHOS\r
+{\r
+    static const char *ABOUT_THE_WATCH = "AboutTheWatchButton";  // 关于手表\r
+    static const char *SUPERVISE = "SuperviseButton";            // 监管\r
+    static const char *SYSTEM_LANGUAGE = "SystemLanguageButton"; // 系统语言\r
+    static const char *REBOOT = "RebootButton";                  // 重启\r
+    static const char *SHOUTDOWM = "ShoutdownButton";            // 关机\r
+    static const char *FACTORY_RESET = "FactoryResetButton";     // 恢复出厂设置\r
+    class SystemPresenter;\r
+    class SystemView : public View<SystemPresenter>\r
+    {\r
+\r
+    public:\r
+        SystemView();\r
+        virtual ~SystemView();\r
+        static SystemView *GetInstance(void);\r
+\r
+        void OnStart() override;\r
+        void OnSetUpView() override;\r
+        void OnTearDownView() override;\r
+        void OnStop() override;\r
+\r
+    private:\r
+        UIView::OnDragListener *draglistener{nullptr};\r
+\r
+        void InitIView(void);\r
+        void DeInitView(void);\r
+\r
+    private:\r
+        UIViewGroup *container_ = nullptr;\r
+        UIScrollView *SystemScrollView = nullptr;\r
+        UILabel *SystemLabel = nullptr;\r
+        UIImageView *image2_ = nullptr;\r
+        UIImageView *image1_ = nullptr;\r
+        UIButton *FactoryResetButton = nullptr;\r
+        UIButton *ShoutdownButton = nullptr;\r
+        UIButton *RebootButton = nullptr;\r
+        UIButton *AboutTheWatchButton = nullptr;\r
+        UIButton *SuperviseButton = nullptr;\r
+        UIButton *SystemLanguageButton = nullptr;\r
+    };\r
+} // namespace OHOS\r
+\r
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutPresenter.cpp
new file mode 100644 (file)
index 0000000..c302d4c
--- /dev/null
@@ -0,0 +1,73 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemAboutPresenter.h"\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemAboutPresenter *g_pSystemAboutPresenter = nullptr;\r
+\r
+    SystemAboutPresenter::SystemAboutPresenter()\r
+    {\r
+\r
+        g_pSystemAboutPresenter = this;\r
+    }\r
+\r
+    SystemAboutPresenter::~SystemAboutPresenter()\r
+    {\r
+\r
+        g_pSystemAboutPresenter = nullptr;\r
+    }\r
+\r
+    SystemAboutPresenter *SystemAboutPresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemAboutPresenter;\r
+    }\r
+\r
+    void SystemAboutPresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemAboutView>::OnStart();\r
+    }\r
+\r
+    void SystemAboutPresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemAboutView>::OnPause();\r
+    }\r
+\r
+    void SystemAboutPresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemAboutView>::OnResume();\r
+    }\r
+\r
+    void SystemAboutPresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemAboutView>::OnStop();\r
+    }\r
+\r
+    bool SystemAboutPresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+\r
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT &&\r
+            (event.GetDeltaX() > 20) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY()))))\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    bool SystemAboutPresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        // if (strcmp(view.GetViewId(), 控件ID) == 0)\r
+        return true;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutView.cpp
new file mode 100644 (file)
index 0000000..514016d
--- /dev/null
@@ -0,0 +1,299 @@
+#include "system/include/SystemAboutView.h"\r
+#include "system/include/SystemAboutPresenter.h"\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemAboutView *g_pSystemAboutView{nullptr};\r
+\r
+    SystemAboutView::SystemAboutView()\r
+    {\r
+\r
+        g_pSystemAboutView = this;\r
+    }\r
+\r
+    SystemAboutView::~SystemAboutView()\r
+    {\r
+\r
+        g_pSystemAboutView = nullptr;\r
+    }\r
+\r
+    SystemAboutView *SystemAboutView::GetInstance()\r
+    {\r
+\r
+        return g_pSystemAboutView;\r
+    }\r
+    UILabel *SystemAboutView::InitLabel(int left, int top, int width, int height, const char *text, const char *viewId, int fontSize, int fontlineHeigh, uint16_t speed)\r
+    {\r
+        UILabel *label = new UILabel();\r
+        label->SetPosition(left, top);                     // 位置\r
+        label->Resize(width, height);                      // 大小\r
+        label->SetViewId(viewId);                          // id\r
+        label->SetStyle(STYLE_TEXT_FONT, fontSize);        // 字体大小\r
+        label->SetStyle(STYLE_LINE_HEIGHT, fontlineHeigh); // 字体行高\r
+        label->SetText(text);                              // 内容\r
+        label->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        label->SetRollSpeed(speed);\r
+        label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, fontSize);\r
+\r
+        return label;\r
+    }\r
+\r
+    void SystemAboutView::SystemAboutInitIView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemAboutPresenter::GetInstance());\r
+            if (draglistener == nullptr)\r
+            {\r
+                return;\r
+            }\r
+            container_->SetOnDragListener(draglistener);\r
+            container_->SetTouchable(true);\r
+            container_->SetDraggable(true);\r
+        }\r
+        \r
+        if (scrollView1_ == nullptr)\r
+        {\r
+            scrollView1_ = new UIScrollView();\r
+        }\r
+        scrollView1_->SetPosition(0, 0);      \r
+        scrollView1_->Resize(466, 466);        \r
+        scrollView1_->SetViewId("scrollView"); \r
+        scrollView1_->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        scrollView1_->SetStyle(STYLE_BORDER_RADIUS, 1294);\r
+        container_->Add(scrollView1_);\r
+        scrollView1_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label1_ == nullptr)\r
+        {\r
+            label1_ = InitLabel(203, 52, 60, 35, "关于", "label1", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label1_);\r
+        label1_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label2_ == nullptr)\r
+        {\r
+            label2_ = InitLabel(173, 160, 120, 35, "手表名称", "label2", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label2_);\r
+        label2_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label3_ == nullptr)\r
+        {\r
+            label3_ = InitLabel(97, 217, 263, 30, "周冰鸿的 Smart Watch", "label3", 26, 30, 6);\r
+        }\r
+        label3_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label3_);\r
+        label3_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Label to App\r
+        if (label4_ == nullptr)\r
+        {\r
+            label4_ = InitLabel(173, 305, 120, 35, "固件版本", "label4", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label4_);\r
+        label4_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Label to App\r
+        if (label5_ == nullptr)\r
+        {\r
+            label5_ = InitLabel(174, 361, 119, 30, "V02.03.01", "label5", 26, 30, 6);\r
+        }\r
+        label5_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label5_);\r
+        label5_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label6_ == nullptr)\r
+        {\r
+            label6_ = InitLabel(173, 450, 120, 35, "算法版本", "label6", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label6_);\r
+        label6_->SetVisible(true);\r
+        RootView::GetInstance()->Add(container_);\r
+        /***********************************************************************************************************/\r
+        if (label7_ == nullptr)\r
+        {\r
+            label7_ = InitLabel(131, 506, 204, 30, "V02.03.01 OTA88", "label7", 26, 30, 6);\r
+        }\r
+        label7_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label7_);\r
+        label7_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label8_ == nullptr)\r
+        {\r
+            label8_ = InitLabel(173, 595, 120, 35, "蓝牙地址", "label8", 30, 35, 6);\r
+        }\r
+\r
+        scrollView1_->Add(label8_);\r
+        label8_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label9_ == nullptr)\r
+        {\r
+            label9_ = InitLabel(123, 651, 220, 30, "D4:FF:E3:12:00:A4", "label9", 26, 30, 6);\r
+        }\r
+\r
+        label9_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label9_);\r
+        label9_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label10_ == nullptr)\r
+        {\r
+            label10_ = InitLabel(158, 740, 120, 35, "局域网地址", "label10", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label10_);\r
+        label10_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label11_ == nullptr)\r
+        {\r
+            label11_ = InitLabel(123, 796, 220, 30, "D4:FF:E3:12:00:A4", "label11", 26, 30, 6);\r
+        }\r
+        label11_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label11_);\r
+        label11_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label12_ == nullptr)\r
+        {\r
+            label12_ = InitLabel(185, 885, 97, 35, "FONTS", "label12", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label12_);\r
+        label12_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label13_ == nullptr)\r
+        {\r
+            label13_ = InitLabel(130, 941, 207, 30, "HarmonyOS Sans", "label13", 26, 30, 6);\r
+        }\r
+        label13_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label13_);\r
+        label13_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add ImageView to App\r
+        if (image == nullptr)\r
+        {\r
+            image = new UIImageView();\r
+        }\r
+        image->SetPosition(183, 941);\r
+        image->Resize(100, 100);      \r
+        image->SetViewId("image");   \r
+\r
+        scrollView1_->Add(image);\r
+        image->SetVisible(true);\r
+    }\r
+    void SystemAboutView::DeSystemAboutInitIView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (scrollView1_ != nullptr)\r
+        {\r
+            delete scrollView1_;\r
+            scrollView1_ = nullptr;\r
+        }\r
+        if (label1_ != nullptr)\r
+        {\r
+            delete label1_;\r
+            label1_ = nullptr;\r
+        }\r
+        if (label2_ != nullptr)\r
+        {\r
+            delete label2_;\r
+            label2_ = nullptr;\r
+        }\r
+        if (label3_ != nullptr)\r
+        {\r
+            delete label3_;\r
+            label3_ = nullptr;\r
+        }\r
+        if (label4_ != nullptr)\r
+        {\r
+            delete label4_;\r
+            label4_ = nullptr;\r
+        }\r
+        if (label5_ != nullptr)\r
+        {\r
+            delete label5_;\r
+            label5_ = nullptr;\r
+        }\r
+        if (label6_ != nullptr)\r
+        {\r
+            delete label6_;\r
+            label6_ = nullptr;\r
+        }\r
+        if (label7_ != nullptr)\r
+        {\r
+            delete label7_;\r
+            label7_ = nullptr;\r
+        }\r
+        if (label8_ != nullptr)\r
+        {\r
+            delete label8_;\r
+            label8_ = nullptr;\r
+        }\r
+        if (label9_ != nullptr)\r
+        {\r
+            delete label9_;\r
+            label9_ = nullptr;\r
+        }\r
+        if (label10_ != nullptr)\r
+        {\r
+            delete label10_;\r
+            label10_ = nullptr;\r
+        }\r
+        if (label11_ != nullptr)\r
+        {\r
+            delete label11_;\r
+            label11_ = nullptr;\r
+        }\r
+        if (label12_ != nullptr)\r
+        {\r
+            delete label12_;\r
+            label12_ = nullptr;\r
+        }\r
+        if (label13_ != nullptr)\r
+        {\r
+            delete label13_;\r
+            label13_ = nullptr;\r
+        }\r
+        if (image != nullptr)\r
+        {\r
+            delete image;\r
+            image = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemAboutView::OnStart()\r
+    {\r
+        SystemAboutInitIView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemAboutView::OnSetUpView()\r
+    {\r
+\r
+        View<SystemAboutPresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemAboutView::OnTearDownView()\r
+    {\r
+\r
+        View<SystemAboutPresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemAboutView::OnStop()\r
+    {\r
+\r
+        View<SystemAboutPresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetPresenter.cpp
new file mode 100644 (file)
index 0000000..1f49d36
--- /dev/null
@@ -0,0 +1,79 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemFactoryResetPresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemFactoryResetPresenter *g_pSystemFactoryResetPresenter = nullptr;\r
+\r
+    SystemFactoryResetPresenter::SystemFactoryResetPresenter()\r
+    {\r
+\r
+        g_pSystemFactoryResetPresenter = this;\r
+    }\r
+\r
+    SystemFactoryResetPresenter::~SystemFactoryResetPresenter()\r
+    {\r
+\r
+        g_pSystemFactoryResetPresenter = nullptr;\r
+    }\r
+\r
+    SystemFactoryResetPresenter *SystemFactoryResetPresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemFactoryResetPresenter;\r
+    }\r
+\r
+    void SystemFactoryResetPresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemFactoryResetView>::OnStart();\r
+    }\r
+\r
+    void SystemFactoryResetPresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemFactoryResetView>::OnPause();\r
+    }\r
+\r
+    void SystemFactoryResetPresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemFactoryResetView>::OnResume();\r
+    }\r
+\r
+    void SystemFactoryResetPresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemFactoryResetView>::OnStop();\r
+    }\r
+\r
+    bool SystemFactoryResetPresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+\r
+        UNUSED(view);\r
+        UNUSED(event);\r
+        return true;\r
+    }\r
+\r
+    bool SystemFactoryResetPresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0)\r
+        {\r
+            printf("file:%s line:%d\n shoutdown button check on being clicked\n", __FILE__, __LINE__);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKOFF) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetView.cpp
new file mode 100644 (file)
index 0000000..b63e39e
--- /dev/null
@@ -0,0 +1,138 @@
+#include "system/include/SystemFactoryResetView.h"\r
+#include "system/include/SystemFactoryResetPresenter.h"\r
+\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemFactoryResetView *g_pSystemFactoryResetView{nullptr};\r
+\r
+    SystemFactoryResetView::SystemFactoryResetView()\r
+    {\r
+        g_pSystemFactoryResetView = this;\r
+    }\r
+\r
+    SystemFactoryResetView::~SystemFactoryResetView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemFactoryResetView = nullptr;\r
+    }\r
+\r
+    SystemFactoryResetView *SystemFactoryResetView::GetInstance()\r
+    {\r
+        return g_pSystemFactoryResetView;\r
+    }\r
+\r
+    void SystemFactoryResetView::InitView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+        }\r
+        // Add ImageView to App\r
+        if (FactoryResetImage == nullptr)\r
+        {\r
+            FactoryResetImage = new UIImageView();\r
+        }\r
+        FactoryResetImage->SetPosition(0, 0);   // widget's left position and top position\r
+        FactoryResetImage->Resize(466, 466);    // widget's width and height\r
+        FactoryResetImage->SetViewId("FactoryResetImage"); // Set style\r
+        FactoryResetImage->SetStyle(STYLE_BORDER_RADIUS, 300);\r
+        FactoryResetImage->SetSrc("/user/res/system/factoryreset.bin"); //恢复出厂设置\r
+        // Add to rootView\r
+        container_->Add(FactoryResetImage);\r
+        FactoryResetImage->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (FactoryResetButtonCheckOn == nullptr)\r
+        {\r
+            FactoryResetButtonCheckOn = new UIButton();\r
+        }\r
+        FactoryResetButtonCheckOn->SetPosition(256, 336); // widget's left position and top position\r
+        FactoryResetButtonCheckOn->Resize(100, 100);      // widget's width and height\r
+        FactoryResetButtonCheckOn->SetViewId(FACTORYRESET_CHECKON); // Set style\r
+        FactoryResetButtonCheckOn->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        FactoryResetButtonCheckOn->SetImageSrc(PNG_SYSTEM_CHECK_ON_IMAGE, nullptr);\r
+        FactoryResetButtonCheckOn->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        FactoryResetButtonCheckOn->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *FactoryResetButtonCheckOnClick = static_cast<UIView::OnClickListener *>(SystemFactoryResetPresenter::GetInstance());\r
+        FactoryResetButtonCheckOn->SetOnClickListener(FactoryResetButtonCheckOnClick);\r
+        // Add to rootView\r
+        container_->Add(FactoryResetButtonCheckOn);\r
+        FactoryResetButtonCheckOn->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (FactoryResetButtonCheckOff == nullptr)\r
+        {\r
+            FactoryResetButtonCheckOff = new UIButton();\r
+        }\r
+        FactoryResetButtonCheckOff->SetPosition(111, 336); // widget's left position and top position\r
+        FactoryResetButtonCheckOff->Resize(100, 100);      // widget's width and height\r
+        FactoryResetButtonCheckOff->SetViewId(FACTORYRESET_CHECKOFF); // Set style\r
+        FactoryResetButtonCheckOff->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        FactoryResetButtonCheckOff->SetImageSrc(PNG_SYSTEM_CHECK_OFF_IMAGE, nullptr);\r
+        FactoryResetButtonCheckOff->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        FactoryResetButtonCheckOff->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *FactoryResetButtonCheckOffClick = static_cast<UIView::OnClickListener *>(SystemFactoryResetPresenter::GetInstance());\r
+        FactoryResetButtonCheckOff->SetOnClickListener(FactoryResetButtonCheckOffClick);\r
+        // Add to rootView\r
+        container_->Add(FactoryResetButtonCheckOff);\r
+        FactoryResetButtonCheckOff->SetVisible(true);\r
+    }\r
+\r
+    void SystemFactoryResetView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (FactoryResetImage != nullptr)\r
+        {\r
+            delete FactoryResetImage;\r
+            FactoryResetImage = nullptr;\r
+        }\r
+        if (FactoryResetButtonCheckOn != nullptr)\r
+        {\r
+            delete FactoryResetButtonCheckOn;\r
+            FactoryResetButtonCheckOn = nullptr;\r
+        }\r
+        if (FactoryResetButtonCheckOff != nullptr)\r
+        {\r
+            delete FactoryResetButtonCheckOff;\r
+            FactoryResetButtonCheckOff = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemFactoryResetView::OnStart()\r
+    {\r
+        View<SystemFactoryResetPresenter>::OnStart();\r
+        InitView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemFactoryResetView::OnSetUpView()\r
+    {\r
+        View<SystemFactoryResetPresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemFactoryResetView::OnTearDownView()\r
+    {\r
+        View<SystemFactoryResetPresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemFactoryResetView::OnStop()\r
+    {\r
+        View<SystemFactoryResetPresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguagePresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguagePresenter.cpp
new file mode 100644 (file)
index 0000000..7fb76a6
--- /dev/null
@@ -0,0 +1,90 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemLanguagePresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemLanguagePresenter *g_pSystemLanguagePresenter = nullptr;\r
+    int count = 1;\r
+    SystemLanguagePresenter::SystemLanguagePresenter()\r
+    {\r
+\r
+        g_pSystemLanguagePresenter = this;\r
+    }\r
+\r
+    SystemLanguagePresenter::~SystemLanguagePresenter()\r
+    {\r
+\r
+        g_pSystemLanguagePresenter = nullptr;\r
+    }\r
+\r
+    SystemLanguagePresenter *SystemLanguagePresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemLanguagePresenter;\r
+    }\r
+\r
+    void SystemLanguagePresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemLanguageView>::OnStart();\r
+    }\r
+\r
+    void SystemLanguagePresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemLanguageView>::OnPause();\r
+    }\r
+\r
+    void SystemLanguagePresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemLanguageView>::OnResume();\r
+    }\r
+\r
+    void SystemLanguagePresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemLanguageView>::OnStop();\r
+    }\r
+    bool SystemLanguagePresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+        UNUSED(view);\r
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT &&\r
+            (event.GetDeltaX() > 20) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY()))))\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    bool SystemLanguagePresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+        if (strcmp(view.GetViewId(), SIMPLIFIED_CHINESE_CHECKBOX) == 0)\r
+        {\r
+\r
+            m_checkbox1->SetState(UICheckBox::SELECTED);\r
+            UpdateCheckBoxState(*m_checkbox2, false);\r
+\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), ENGLISH_CHECKBOX) == 0)\r
+        {\r
+            m_checkbox2->SetState(UICheckBox::SELECTED);\r
+            UpdateCheckBoxState(*m_checkbox1, false);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    // 根据传入的选中状态更新复选框的状态\r
+    void SystemLanguagePresenter::UpdateCheckBoxState(UICheckBox &checkbox, bool isSelected)\r
+    {\r
+        checkbox.SetState(isSelected ? UICheckBox::SELECTED : UICheckBox::UNSELECTED);\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguageView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguageView.cpp
new file mode 100644 (file)
index 0000000..035f377
--- /dev/null
@@ -0,0 +1,270 @@
+#include "system/include/SystemLanguageView.h"\r
+#include "system/include/SystemLanguagePresenter.h"\r
+#include "string.h"\r
+#include "UiConfig.h"\r
+#include "ui_view.h"\r
+namespace OHOS\r
+{\r
+\r
+    static SystemLanguageView *g_pSystemLanguageView{nullptr};\r
+\r
+    SystemLanguageView::SystemLanguageView()\r
+    {\r
+\r
+        g_pSystemLanguageView = this;\r
+    }\r
+\r
+    SystemLanguageView::~SystemLanguageView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemLanguageView = nullptr;\r
+    }\r
+\r
+    SystemLanguageView *SystemLanguageView::GetInstance()\r
+    {\r
+\r
+        return g_pSystemLanguageView;\r
+    }\r
+\r
+    void SystemLanguageView::InitView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemLanguagePresenter::GetInstance());\r
+            if (draglistener == nullptr)\r
+            {\r
+                return;\r
+            }\r
+            container_->SetOnDragListener(draglistener);\r
+            container_->SetTouchable(true);\r
+            container_->SetDraggable(true);\r
+        }\r
+        /***********************************************************************************************************/\r
+        if (scrollView == nullptr)\r
+        {\r
+            scrollView = new UIScrollView();\r
+        }\r
+        scrollView->SetPosition(0, 0);\r
+        scrollView->Resize(466, 466);\r
+        scrollView->SetViewId("scrollView");\r
+        scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        scrollView->SetStyle(STYLE_BORDER_RADIUS, 1294);\r
+        container_->Add(scrollView);\r
+        scrollView->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Label to App\r
+        if (LanguageLabel == nullptr)\r
+        {\r
+            LanguageLabel = new UILabel();\r
+        }\r
+        LanguageLabel->SetPosition(203, 52);       // widget's left position and top position\r
+        LanguageLabel->Resize(200, 60);            // widget's width and height\r
+        LanguageLabel->SetViewId("LanguageLabel"); // Set style\r
+        LanguageLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
+        LanguageLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        // Set additional property\r
+        LanguageLabel->SetText("语言");\r
+        LanguageLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        LanguageLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        LanguageLabel->SetRollSpeed(0);\r
+        LanguageLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        scrollView->Add(LanguageLabel);\r
+        LanguageLabel->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (SimplifiedChineseImage == nullptr)\r
+        {\r
+            SimplifiedChineseImage = new UIImageView();\r
+        }\r
+        SimplifiedChineseImage->SetPosition(43, 120);                 \r
+        SimplifiedChineseImage->Resize(380, 100);                     \r
+        SimplifiedChineseImage->SetViewId(SIMPLIFIED_CHINESE_BUTTON);\r
+        SimplifiedChineseImage->SetStyle(STYLE_BORDER_RADIUS, 50);\r
+        SimplifiedChineseImage->SetSrc(PNG_SETTING_BACKGROUND_IMAGE);\r
+        // Add to scrollView1\r
+        scrollView->Add(SimplifiedChineseImage);\r
+        SimplifiedChineseImage->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (SimplifiedChineseLabel == nullptr)\r
+        {\r
+            SimplifiedChineseLabel = new UILabel();\r
+        }\r
+        SimplifiedChineseLabel->SetPosition(90, 153);                \r
+        SimplifiedChineseLabel->Resize(120, 35);                     \r
+        SimplifiedChineseLabel->SetViewId("SimplifiedChineseLabel");\r
+        SimplifiedChineseLabel->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        SimplifiedChineseLabel->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        SimplifiedChineseLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
+        SimplifiedChineseLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        // Set additional property\r
+        SimplifiedChineseLabel->SetText("简体中文");\r
+        SimplifiedChineseLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        SimplifiedChineseLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        SimplifiedChineseLabel->SetRollSpeed(0);\r
+        SimplifiedChineseLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        // Add to scrollView1\r
+        scrollView->Add(SimplifiedChineseLabel);\r
+        SimplifiedChineseLabel->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add CheckBox to App\r
+        if (SimplifiedChineseCheckBox == nullptr)\r
+        {\r
+            SimplifiedChineseCheckBox = new UICheckBox();\r
+        }\r
+        SimplifiedChineseCheckBox->SetState(UICheckBox::SELECTED);\r
+        SimplifiedChineseCheckBox->SetPosition(300, 130);                  // widget's left position and top position\r
+        SimplifiedChineseCheckBox->Resize(80, 80);                         // widget's width and height\r
+        SimplifiedChineseCheckBox->SetViewId(SIMPLIFIED_CHINESE_CHECKBOX); // Set style\r
+        SimplifiedChineseCheckBox->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        SimplifiedChineseCheckBox->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        SimplifiedChineseCheckBox->SetImages(PNG_CHECKBOX_ON_IMAGE, PNG_CHECKBOX_OFF_IMAGE);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *SimplifiedChineseCheckBoxClick = static_cast<UIView::OnClickListener *>(SystemLanguagePresenter::GetInstance());\r
+        SimplifiedChineseCheckBox->SetOnClickListener(SimplifiedChineseCheckBoxClick);\r
+        // Add to scrollView1\r
+        scrollView->Add(SimplifiedChineseCheckBox);\r
+        SimplifiedChineseCheckBox->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (EnglishImage == nullptr)\r
+        {\r
+            EnglishImage = new UIImageView();\r
+        }\r
+        EnglishImage->SetPosition(43, 240);     \r
+        EnglishImage->Resize(380, 100);          \r
+        EnglishImage->SetViewId(ENGLISH_BUTTON);\r
+        EnglishImage->SetStyle(STYLE_BORDER_RADIUS, 50);\r
+        EnglishImage->SetSrc(PNG_SETTING_BACKGROUND_IMAGE);\r
+        scrollView->Add(EnglishImage);\r
+        EnglishImage->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (EnglishLabel == nullptr)\r
+        {\r
+            EnglishLabel = new UILabel();\r
+        }\r
+        EnglishLabel->SetPosition(90, 273);      // widget's left position and top position\r
+        EnglishLabel->Resize(126, 35);           // widget's width and height\r
+        EnglishLabel->SetViewId("EnglishLabel"); // Set style\r
+        EnglishLabel->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        EnglishLabel->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        EnglishLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
+        EnglishLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+\r
+        // Set additional property\r
+        EnglishLabel->SetText("ENGLISH");\r
+        EnglishLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        EnglishLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        EnglishLabel->SetRollSpeed(0);\r
+        EnglishLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+\r
+        // Add to scrollView1\r
+        scrollView->Add(EnglishLabel);\r
+        EnglishLabel->SetVisible(true);\r
+\r
+        // Add CheckBox to App\r
+        if (EnglishCheckBox == nullptr)\r
+        {\r
+            EnglishCheckBox = new UICheckBox();\r
+        }\r
+        EnglishCheckBox->SetPosition(300, 250);      \r
+        EnglishCheckBox->Resize(80, 80);             \r
+        EnglishCheckBox->SetViewId(ENGLISH_CHECKBOX);\r
+        EnglishCheckBox->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        EnglishCheckBox->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        EnglishCheckBox->SetImages(PNG_CHECKBOX_ON_IMAGE, PNG_CHECKBOX_OFF_IMAGE);\r
+\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *EnglishCheckBoxClick = static_cast<UIView::OnClickListener *>(SystemLanguagePresenter::GetInstance());\r
+        EnglishCheckBox->SetOnClickListener(EnglishCheckBoxClick);\r
+        // Add to scrollView1\r
+        scrollView->Add(EnglishCheckBox);\r
+        EnglishCheckBox->SetVisible(true);\r
+\r
+        /***********************************************************************************************************/\r
+        // Add the CallBack about SimplifiedChineseImage sevents\r
+        UIView::OnClickListener *ButtonClick = static_cast<UIView::OnClickListener *>(new SystemLanguagePresenter(SimplifiedChineseCheckBox, EnglishCheckBox));\r
+        SimplifiedChineseCheckBox->SetOnClickListener(ButtonClick);\r
+        EnglishCheckBox->SetOnClickListener(ButtonClick);\r
+    }\r
+\r
+    void SystemLanguageView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (scrollView != nullptr)\r
+        {\r
+            delete scrollView;\r
+            scrollView = nullptr;\r
+        }\r
+        if (LanguageLabel != nullptr)\r
+        {\r
+            delete LanguageLabel;\r
+            LanguageLabel = nullptr;\r
+        }\r
+        if (SimplifiedChineseImage != nullptr)\r
+        {\r
+            delete SimplifiedChineseImage;\r
+            SimplifiedChineseImage = nullptr;\r
+        }\r
+        if (SimplifiedChineseCheckBox != nullptr)\r
+        {\r
+            delete SimplifiedChineseCheckBox;\r
+            SimplifiedChineseCheckBox = nullptr;\r
+        }\r
+        if (EnglishImage != nullptr)\r
+        {\r
+            delete EnglishImage;\r
+            EnglishImage = nullptr;\r
+        }\r
+        if (SimplifiedChineseLabel != nullptr)\r
+        {\r
+            delete SimplifiedChineseLabel;\r
+            SimplifiedChineseLabel = nullptr;\r
+        }\r
+        if (EnglishLabel != nullptr)\r
+        {\r
+            delete EnglishLabel;\r
+            EnglishLabel = nullptr;\r
+        }\r
+        if (EnglishCheckBox != nullptr)\r
+        {\r
+            delete EnglishCheckBox;\r
+            EnglishCheckBox = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemLanguageView::OnStart()\r
+    {\r
+        View<SystemLanguagePresenter>::OnStart();\r
+        InitView();\r
+        // container_容器属性 add\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemLanguageView::OnSetUpView()\r
+    {\r
+\r
+        View<SystemLanguagePresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemLanguageView::OnTearDownView()\r
+    {\r
+\r
+        View<SystemLanguagePresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemLanguageView::OnStop()\r
+    {\r
+\r
+        View<SystemLanguagePresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemPresenter.cpp
new file mode 100644 (file)
index 0000000..db72039
--- /dev/null
@@ -0,0 +1,102 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemPresenter.h"\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemPresenter *g_pSystemPresenter = nullptr;\r
+\r
+    SystemPresenter::SystemPresenter()\r
+    {\r
+\r
+        g_pSystemPresenter = this;\r
+    }\r
+\r
+    SystemPresenter::~SystemPresenter()\r
+    {\r
+\r
+        g_pSystemPresenter = nullptr;\r
+    }\r
+\r
+    SystemPresenter *SystemPresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemPresenter;\r
+    }\r
+\r
+    void SystemPresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemView>::OnStart();\r
+    }\r
+\r
+    void SystemPresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemView>::OnPause();\r
+    }\r
+\r
+    void SystemPresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemView>::OnResume();\r
+    }\r
+\r
+    void SystemPresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemView>::OnStop();\r
+    }\r
+\r
+    bool SystemPresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+\r
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT &&\r
+            (event.GetDeltaX() > 20) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY()))))\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    bool SystemPresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        if (strcmp(view.GetViewId(), ABOUT_THE_WATCH) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_ABOUT_WATCH);\r
+            return true;    \r
+        }\r
+        else if (strcmp(view.GetViewId(), SUPERVISE) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_SUPERVISE);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), SYSTEM_LANGUAGE) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_SYSTEM_LANGUAGE);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), REBOOT) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_REBOOT);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), SHOUTDOWM) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_SHOUTDOWN);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), FACTORY_RESET) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM_FACTORY_RESET);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootPresenter.cpp
new file mode 100644 (file)
index 0000000..ffe0072
--- /dev/null
@@ -0,0 +1,83 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemRebootPresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemRebootPresenter *g_pSystemRebootPresenter = nullptr;\r
+\r
+    SystemRebootPresenter::SystemRebootPresenter()\r
+    {\r
+\r
+        g_pSystemRebootPresenter = this;\r
+    }\r
+\r
+    SystemRebootPresenter::~SystemRebootPresenter()\r
+    {\r
+\r
+        g_pSystemRebootPresenter = nullptr;\r
+    }\r
+\r
+    SystemRebootPresenter *SystemRebootPresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemRebootPresenter;\r
+    }\r
+\r
+    void SystemRebootPresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemRebootView>::OnStart();\r
+    }\r
+\r
+    void SystemRebootPresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemRebootView>::OnPause();\r
+    }\r
+\r
+    void SystemRebootPresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemRebootView>::OnResume();\r
+    }\r
+\r
+    void SystemRebootPresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemRebootView>::OnStop();\r
+    }\r
+\r
+    bool SystemRebootPresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+\r
+        UNUSED(view);\r
+        UNUSED(event);\r
+        return true;\r
+    }\r
+    extern "C"\r
+    {\r
+        //重启\r
+        uint32_t mcu_os_sys_reset(uint8_t *para, uint32_t para_len); \r
+    }\r
+    bool SystemRebootPresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        if (strcmp(view.GetViewId(), REBOOT_CHECKON) == 0)\r
+        {\r
+            mcu_os_sys_reset(NULL,NULL);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), REBOOT_CHECKOFF) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemRebootView.cpp
new file mode 100644 (file)
index 0000000..79e337f
--- /dev/null
@@ -0,0 +1,138 @@
+#include "system/include/SystemRebootView.h"\r
+#include "system/include/SystemRebootPresenter.h"\r
+\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemRebootView *g_pSystemRebootView{nullptr};\r
+\r
+    SystemRebootView::SystemRebootView()\r
+    {\r
+        g_pSystemRebootView = this;\r
+    }\r
+\r
+    SystemRebootView::~SystemRebootView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemRebootView = nullptr;\r
+    }\r
+\r
+    SystemRebootView *SystemRebootView::GetInstance()\r
+    {\r
+        return g_pSystemRebootView;\r
+    }\r
+\r
+    void SystemRebootView::InitView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+        }\r
+        // Add ImageView to App\r
+        if (RebootImage == nullptr)\r
+        {\r
+            RebootImage = new UIImageView();\r
+        }\r
+        RebootImage->SetPosition(0, 0);   // widget's left position and top position\r
+        RebootImage->Resize(466, 466);    // widget's width and height\r
+        RebootImage->SetViewId("RebootImage"); // Set style\r
+        RebootImage->SetStyle(STYLE_BORDER_RADIUS, 300);\r
+        RebootImage->SetSrc("/user/res/system/reboot.bin"); //重新启动\r
+        // Add to rootView\r
+        container_->Add(RebootImage);\r
+        RebootImage->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (RebootButtonCheckOn == nullptr)\r
+        {\r
+            RebootButtonCheckOn = new UIButton();\r
+        }\r
+        RebootButtonCheckOn->SetPosition(256, 299); // widget's left position and top position\r
+        RebootButtonCheckOn->Resize(100, 100);      // widget's width and height\r
+        RebootButtonCheckOn->SetViewId(REBOOT_CHECKON); // Set style\r
+        RebootButtonCheckOn->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        RebootButtonCheckOn->SetImageSrc(PNG_SYSTEM_CHECK_ON_IMAGE, nullptr);\r
+        RebootButtonCheckOn->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        RebootButtonCheckOn->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *RebootButtonCheckOnClick = static_cast<UIView::OnClickListener *>(SystemRebootPresenter::GetInstance());\r
+        RebootButtonCheckOn->SetOnClickListener(RebootButtonCheckOnClick);\r
+        // Add to rootView\r
+        container_->Add(RebootButtonCheckOn);\r
+        RebootButtonCheckOn->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (RebootButtonCheckOff == nullptr)\r
+        {\r
+            RebootButtonCheckOff = new UIButton();\r
+        }\r
+        RebootButtonCheckOff->SetPosition(111, 299); // widget's left position and top position\r
+        RebootButtonCheckOff->Resize(100, 100);      // widget's width and height\r
+        RebootButtonCheckOff->SetViewId(REBOOT_CHECKOFF); // Set style\r
+        RebootButtonCheckOff->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        RebootButtonCheckOff->SetImageSrc(PNG_SYSTEM_CHECK_OFF_IMAGE, nullptr);\r
+        RebootButtonCheckOff->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        RebootButtonCheckOff->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *RebootButtonCheckOffClick = static_cast<UIView::OnClickListener *>(SystemRebootPresenter::GetInstance());\r
+        RebootButtonCheckOff->SetOnClickListener(RebootButtonCheckOffClick);\r
+        // Add to rootView\r
+        container_->Add(RebootButtonCheckOff);\r
+        RebootButtonCheckOff->SetVisible(true);\r
+    }\r
+\r
+    void SystemRebootView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (RebootImage != nullptr)\r
+        {\r
+            delete RebootImage;\r
+            RebootImage = nullptr;\r
+        }\r
+        if (RebootButtonCheckOn != nullptr)\r
+        {\r
+            delete RebootButtonCheckOn;\r
+            RebootButtonCheckOn = nullptr;\r
+        }\r
+        if (RebootButtonCheckOff != nullptr)\r
+        {\r
+            delete RebootButtonCheckOff;\r
+            RebootButtonCheckOff = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemRebootView::OnStart()\r
+    {\r
+        View<SystemRebootPresenter>::OnStart();\r
+        InitView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemRebootView::OnSetUpView()\r
+    {\r
+        View<SystemRebootPresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemRebootView::OnTearDownView()\r
+    {\r
+        View<SystemRebootPresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemRebootView::OnStop()\r
+    {\r
+        View<SystemRebootPresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownPresenter.cpp
new file mode 100644 (file)
index 0000000..b4f0ec3
--- /dev/null
@@ -0,0 +1,81 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemShoutDownPresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemShoutDownPresenter *g_pSystemShoutDownPresenter = nullptr;\r
+\r
+    SystemShoutDownPresenter::SystemShoutDownPresenter()\r
+    {\r
+\r
+        g_pSystemShoutDownPresenter = this;\r
+    }\r
+\r
+    SystemShoutDownPresenter::~SystemShoutDownPresenter()\r
+    {\r
+\r
+        g_pSystemShoutDownPresenter = nullptr;\r
+    }\r
+\r
+    SystemShoutDownPresenter *SystemShoutDownPresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemShoutDownPresenter;\r
+    }\r
+\r
+    void SystemShoutDownPresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemShoutDownView>::OnStart();\r
+    }\r
+\r
+    void SystemShoutDownPresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemShoutDownView>::OnPause();\r
+    }\r
+\r
+    void SystemShoutDownPresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemShoutDownView>::OnResume();\r
+    }\r
+\r
+    void SystemShoutDownPresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemShoutDownView>::OnStop();\r
+    }\r
+\r
+    bool SystemShoutDownPresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+        UNUSED(view);\r
+        UNUSED(event);\r
+        return true;\r
+    }\r
+    extern "C" {\r
+    //关机\r
+    void uapi_sys_shipmode(uint32_t arg); \r
+    }\r
+    bool SystemShoutDownPresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        if (strcmp(view.GetViewId(), SHOUTDOWN_BUTTON_CHECKON) == 0)\r
+        { \r
+            uapi_sys_shipmode(0);\r
+            return true;\r
+        }\r
+        else if (strcmp(view.GetViewId(), SHOUTDOWN_BUTTON_CHECKOFF) == 0)\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemShoutDownView.cpp
new file mode 100644 (file)
index 0000000..0336354
--- /dev/null
@@ -0,0 +1,138 @@
+#include "system/include/SystemShoutDownView.h"\r
+#include "system/include/SystemShoutDownPresenter.h"\r
+\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemShoutDownView *g_pSystemShoutDownView{nullptr};\r
+\r
+    SystemShoutDownView::SystemShoutDownView()\r
+    {\r
+        g_pSystemShoutDownView = this;\r
+    }\r
+\r
+    SystemShoutDownView::~SystemShoutDownView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemShoutDownView = nullptr;\r
+    }\r
+\r
+    SystemShoutDownView *SystemShoutDownView::GetInstance()\r
+    {\r
+        return g_pSystemShoutDownView;\r
+    }\r
+\r
+    void SystemShoutDownView::InitView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+        }\r
+        // Add ImageView to App\r
+        if (ShoutDownImage == nullptr)\r
+        {\r
+            ShoutDownImage = new UIImageView();\r
+        }\r
+        ShoutDownImage->SetPosition(0, 0);   // widget's left position and top position\r
+        ShoutDownImage->Resize(466, 466);    // widget's width and height\r
+        ShoutDownImage->SetViewId("ShoutDownImage"); // Set style\r
+        ShoutDownImage->SetStyle(STYLE_BORDER_RADIUS, 300);\r
+        ShoutDownImage->SetSrc("/user/res/system/shoutdown.bin");\r
+        // Add to rootView\r
+        container_->Add(ShoutDownImage);\r
+        ShoutDownImage->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (ShoutDownButtonCheckOn == nullptr)\r
+        {\r
+            ShoutDownButtonCheckOn = new UIButton();\r
+        }\r
+        ShoutDownButtonCheckOn->SetPosition(256, 299); // widget's left position and top position\r
+        ShoutDownButtonCheckOn->Resize(100, 100);      // widget's width and height\r
+        ShoutDownButtonCheckOn->SetViewId(SHOUTDOWN_BUTTON_CHECKON); // Set style\r
+        ShoutDownButtonCheckOn->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        ShoutDownButtonCheckOn->SetImageSrc(PNG_SYSTEM_CHECK_ON_IMAGE, nullptr);\r
+        ShoutDownButtonCheckOn->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        ShoutDownButtonCheckOn->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *ShoutDownButtonCheckOnClick = static_cast<UIView::OnClickListener *>(SystemShoutDownPresenter::GetInstance());\r
+        ShoutDownButtonCheckOn->SetOnClickListener(ShoutDownButtonCheckOnClick);\r
+        // Add to rootView\r
+        container_->Add(ShoutDownButtonCheckOn);\r
+        ShoutDownButtonCheckOn->SetVisible(true);\r
+\r
+        // Add Button to App\r
+        if (ShoutDownButtonCheckOff == nullptr)\r
+        {\r
+            ShoutDownButtonCheckOff = new UIButton();\r
+        }\r
+        ShoutDownButtonCheckOff->SetPosition(111, 299); // widget's left position and top position\r
+        ShoutDownButtonCheckOff->Resize(100, 100);      // widget's width and height\r
+        ShoutDownButtonCheckOff->SetViewId(SHOUTDOWN_BUTTON_CHECKOFF); // Set style\r
+        ShoutDownButtonCheckOff->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
+        ShoutDownButtonCheckOff->SetImageSrc(PNG_SYSTEM_CHECK_OFF_IMAGE, nullptr);\r
+        ShoutDownButtonCheckOff->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
+        ShoutDownButtonCheckOff->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *ShoutDownButtonCheckOffClick = static_cast<UIView::OnClickListener *>(SystemShoutDownPresenter::GetInstance());\r
+        ShoutDownButtonCheckOff->SetOnClickListener(ShoutDownButtonCheckOffClick);\r
+        // Add to rootView\r
+        container_->Add(ShoutDownButtonCheckOff);\r
+        ShoutDownButtonCheckOff->SetVisible(true);\r
+    }\r
+\r
+    void SystemShoutDownView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (ShoutDownImage != nullptr)\r
+        {\r
+            delete ShoutDownImage;\r
+            ShoutDownImage = nullptr;\r
+        }\r
+        if (ShoutDownButtonCheckOn != nullptr)\r
+        {\r
+            delete ShoutDownButtonCheckOn;\r
+            ShoutDownButtonCheckOn = nullptr;\r
+        }\r
+        if (ShoutDownButtonCheckOff != nullptr)\r
+        {\r
+            delete ShoutDownButtonCheckOff;\r
+            ShoutDownButtonCheckOff = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemShoutDownView::OnStart()\r
+    {\r
+        View<SystemShoutDownPresenter>::OnStart();\r
+        InitView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemShoutDownView::OnSetUpView()\r
+    {\r
+        View<SystemShoutDownPresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemShoutDownView::OnTearDownView()\r
+    {\r
+        View<SystemShoutDownPresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemShoutDownView::OnStop()\r
+    {\r
+        View<SystemShoutDownPresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSupervisePresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSupervisePresenter.cpp
new file mode 100644 (file)
index 0000000..54050ed
--- /dev/null
@@ -0,0 +1,74 @@
+#include "AppViewIDs.h"\r
+#include "NativeAbility.h"\r
+#include "graphic_math.h"\r
+#include "string.h"\r
+#include "system/include/SystemSupervisePresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    // 当前Presenter属性实例化的内存指针\r
+    static SystemSupervisePresenter *g_pSystemSupervisePresenter = nullptr;\r
+\r
+    SystemSupervisePresenter::SystemSupervisePresenter()\r
+    {\r
+\r
+        g_pSystemSupervisePresenter = this;\r
+    }\r
+\r
+    SystemSupervisePresenter::~SystemSupervisePresenter()\r
+    {\r
+\r
+        g_pSystemSupervisePresenter = nullptr;\r
+    }\r
+\r
+    SystemSupervisePresenter *SystemSupervisePresenter::GetInstance()\r
+    {\r
+\r
+        return g_pSystemSupervisePresenter;\r
+    }\r
+\r
+    void SystemSupervisePresenter::OnStart()\r
+    {\r
+\r
+        Presenter<SystemSuperviseView>::OnStart();\r
+    }\r
+\r
+    void SystemSupervisePresenter::OnPause(void)\r
+    {\r
+\r
+        Presenter<SystemSuperviseView>::OnPause();\r
+    }\r
+\r
+    void SystemSupervisePresenter::OnResume(void)\r
+    {\r
+\r
+        Presenter<SystemSuperviseView>::OnResume();\r
+    }\r
+\r
+    void SystemSupervisePresenter::OnStop(void)\r
+    {\r
+\r
+        Presenter<SystemSuperviseView>::OnStop();\r
+    }\r
+\r
+    bool SystemSupervisePresenter::OnDrag(UIView &view, const DragEvent &event)\r
+    {\r
+\r
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT &&\r
+            (event.GetDeltaX() > 20) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY()))))\r
+        {\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    bool SystemSupervisePresenter::OnClick(UIView &view, const ClickEvent &event)\r
+    {\r
+\r
+        // 根据控件id查找是哪个控件触发了点击回调\r
+        // if (strcmp(view.GetViewId(), 控件ID) == 0)\r
+        return true;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSuperviseView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSuperviseView.cpp
new file mode 100644 (file)
index 0000000..d410eab
--- /dev/null
@@ -0,0 +1,176 @@
+#include "system/include/SystemSuperviseView.h"\r
+#include "system/include/SystemSupervisePresenter.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemSuperviseView *g_pSystemSuperviseView{nullptr};\r
+\r
+    SystemSuperviseView::SystemSuperviseView()\r
+    {\r
+\r
+        g_pSystemSuperviseView = this;\r
+    }\r
+\r
+    SystemSuperviseView::~SystemSuperviseView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemSuperviseView = nullptr;\r
+    }\r
+\r
+    SystemSuperviseView *SystemSuperviseView::GetInstance()\r
+    {\r
+\r
+        return g_pSystemSuperviseView;\r
+    }\r
+    UILabel *SystemSuperviseView::InitLabel(int left, int top, int width, int height, const char *text, const char *viewId, int fontSize, int fontlineHeigh, uint16_t speed)\r
+    {\r
+        UILabel *label = new UILabel();\r
+        label->SetPosition(left, top);                     // 位置\r
+        label->Resize(width, height);                      // 大小\r
+        label->SetViewId(viewId);                          // id\r
+        label->SetStyle(STYLE_TEXT_FONT, fontSize);        // 字体大小\r
+        label->SetStyle(STYLE_LINE_HEIGHT, fontlineHeigh); // 字体行高\r
+        label->SetText(text);                              // 内容\r
+        label->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        label->SetRollSpeed(speed);\r
+        label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, fontSize);\r
+\r
+        return label;\r
+    }\r
+\r
+    void SystemSuperviseView::InitView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemSupervisePresenter::GetInstance());\r
+            if (draglistener == nullptr)\r
+            {\r
+                return;\r
+            }\r
+            container_->SetOnDragListener(draglistener);\r
+            container_->SetTouchable(true);\r
+            container_->SetDraggable(true);\r
+        }\r
+        if (scrollView1_ == nullptr)\r
+        {\r
+            scrollView1_ = new UIScrollView();\r
+        }\r
+        scrollView1_->SetPosition(0, 0);       // widget's left position and top position\r
+        scrollView1_->Resize(466, 466);        // widget's width and height\r
+        scrollView1_->SetViewId("scrollView"); // Set style\r
+        scrollView1_->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        scrollView1_->SetStyle(STYLE_BORDER_RADIUS, 1294);\r
+\r
+        container_->Add(scrollView1_);\r
+        scrollView1_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label1_ == nullptr)\r
+        {\r
+            label1_ = InitLabel(203, 52, 60, 35, "监管", "label1", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label1_);\r
+        label1_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label2_ == nullptr)\r
+        {\r
+            label2_ = InitLabel(203, 164, 60, 35, "型号", "label2", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label2_);\r
+        label2_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label3_ == nullptr)\r
+        {\r
+            label3_ = InitLabel(102, 221, 263, 30, "周冰鸿的 Smart Watch", "label3", 26, 30, 6);\r
+        }\r
+        label3_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label3_);\r
+        label3_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label4_ == nullptr)\r
+        {\r
+            label4_ = InitLabel(198, 310, 71, 35, "CMIT", "label4", 30, 35, 6);\r
+        }\r
+        scrollView1_->Add(label4_);\r
+        label4_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        if (label5_ == nullptr)\r
+        {\r
+            label5_ = InitLabel(175, 367, 119, 30, "V02.03.01", "label5", 26, 30, 6);\r
+        }\r
+        label5_->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
+        scrollView1_->Add(label5_);\r
+        label5_->SetVisible(true);\r
+    }\r
+\r
+    void SystemSuperviseView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (scrollView1_ != nullptr)\r
+        {\r
+            delete scrollView1_;\r
+            scrollView1_ = nullptr;\r
+        }\r
+        if (label1_ != nullptr)\r
+        {\r
+            delete label1_;\r
+            label1_ = nullptr;\r
+        }\r
+        if (label2_ != nullptr)\r
+        {\r
+            delete label2_;\r
+            label2_ = nullptr;\r
+        }\r
+        if (label3_ != nullptr)\r
+        {\r
+            delete label3_;\r
+            label3_ = nullptr;\r
+        }\r
+        if (label4_ != nullptr)\r
+        {\r
+            delete label4_;\r
+            label4_ = nullptr;\r
+        }\r
+        if (label5_ != nullptr)\r
+        {\r
+            delete label5_;\r
+            label5_ = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemSuperviseView::OnStart()\r
+    {\r
+        InitView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemSuperviseView::OnSetUpView()\r
+    {\r
+        View<SystemSupervisePresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemSuperviseView::OnTearDownView()\r
+    {\r
+\r
+        View<SystemSupervisePresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemSuperviseView::OnStop()\r
+    {\r
+\r
+        View<SystemSupervisePresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemView.cpp
new file mode 100644 (file)
index 0000000..0292720
--- /dev/null
@@ -0,0 +1,319 @@
+#include "system/include/SystemView.h"\r
+#include "system/include/SystemPresenter.h"\r
+\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS\r
+{\r
+\r
+    static SystemView *g_pSystemView{nullptr};\r
+\r
+    SystemView::SystemView()\r
+    {\r
+        g_pSystemView = this;\r
+    }\r
+\r
+    SystemView::~SystemView()\r
+    {\r
+        DeInitView();\r
+        g_pSystemView = nullptr;\r
+    }\r
+\r
+    SystemView *SystemView::GetInstance()\r
+    {\r
+\r
+        return g_pSystemView;\r
+    }\r
+\r
+    void SystemView::InitIView()\r
+    {\r
+        if (container_ == nullptr)\r
+        {\r
+            container_ = new UIViewGroup();\r
+            container_->SetPosition(0, 0, 466, 466);\r
+            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
+            if (draglistener == nullptr)\r
+            {\r
+                return;\r
+            }\r
+            container_->SetOnDragListener(draglistener);\r
+            container_->SetTouchable(true);\r
+            container_->SetDraggable(true);\r
+        }\r
+        /***********************************************************************************************************/\r
+        // Add ScrollView to App\r
+        if (SystemScrollView == nullptr)\r
+        {\r
+            SystemScrollView = new UIScrollView();\r
+        }\r
+        SystemScrollView->SetPosition(0, 0);             // widget's left position and top position\r
+        SystemScrollView->Resize(466, 466);              // widget's width and height\r
+        SystemScrollView->SetViewId("SystemScrollView"); // Set style\r
+        SystemScrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        container_->Add(SystemScrollView);\r
+        SystemScrollView->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Label to App\r
+        if (SystemLabel == nullptr)\r
+        {\r
+            SystemLabel = new UILabel();\r
+        }\r
+        SystemLabel->SetPosition(203, 52);     // widget's left position and top position\r
+        SystemLabel->Resize(200, 60);          // widget's width and height\r
+        SystemLabel->SetViewId("SystemLabel"); // Set style\r
+        SystemLabel->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
+        SystemLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
+        SystemLabel->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        // Set additional property\r
+        SystemLabel->SetText("系统");\r
+        SystemLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);\r
+        SystemLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        SystemLabel->SetRollSpeed(6);\r
+        SystemLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(SystemLabel);\r
+        SystemLabel->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (AboutTheWatchButton == nullptr)\r
+        {\r
+            AboutTheWatchButton = new UIButton();\r
+        }\r
+        AboutTheWatchButton->SetPosition(43, 120);       // widget's left position and top position\r
+        AboutTheWatchButton->Resize(380, 100);           // widget's width and height\r
+        AboutTheWatchButton->SetViewId(ABOUT_THE_WATCH); // Set style                 //关于手表\r
+        AboutTheWatchButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        AboutTheWatchButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+\r
+        AboutTheWatchButton->SetImageSrc("/user/res/system/SYSTEM_ABOUT_THE_WATCH.bin", nullptr);\r
+        AboutTheWatchButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *AboutTheWatchButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        AboutTheWatchButton->SetOnClickListener(AboutTheWatchButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(AboutTheWatchButton);\r
+        AboutTheWatchButton->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (SuperviseButton == nullptr)\r
+        {\r
+            SuperviseButton = new UIButton();\r
+        }\r
+        SuperviseButton->SetPosition(43, 240); // widget's left position and top position\r
+        SuperviseButton->Resize(380, 100);     // widget's width and height\r
+        SuperviseButton->SetViewId(SUPERVISE); // Set style                //监管\r
+        SuperviseButton->SetStyle(STYLE_BORDER_RADIUS, 50);\r
+        SuperviseButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        SuperviseButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+\r
+        SuperviseButton->SetImageSrc("/user/res/system/SYSTEM_SUPERVISE.bin", nullptr);\r
+        SuperviseButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        SuperviseButton->SetStyleForState(STYLE_BORDER_RADIUS, 50, UIButton::PRESSED);\r
+\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *SuperviseButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        SuperviseButton->SetOnClickListener(SuperviseButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(SuperviseButton);\r
+        SuperviseButton->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (SystemLanguageButton == nullptr)\r
+        {\r
+            SystemLanguageButton = new UIButton();\r
+        }\r
+        SystemLanguageButton->SetPosition(43, 360);       // widget's left position and top position\r
+        SystemLanguageButton->Resize(380, 100);           // widget's width and height\r
+        SystemLanguageButton->SetViewId(SYSTEM_LANGUAGE); // Set style               //系统语言\r
+        SystemLanguageButton->SetStyle(STYLE_BORDER_RADIUS, 50);\r
+        SystemLanguageButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        SystemLanguageButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+\r
+        SystemLanguageButton->SetImageSrc("/user/res/system/SYSTEM_SYSTEM_LANGUAGE.bin", nullptr);\r
+        SystemLanguageButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        SystemLanguageButton->SetStyleForState(STYLE_BORDER_RADIUS, 50, UIButton::PRESSED);\r
+\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *SystemLanguageButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        SystemLanguageButton->SetOnClickListener(SystemLanguageButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(SystemLanguageButton);\r
+        SystemLanguageButton->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (RebootButton == nullptr)\r
+        {\r
+            RebootButton = new UIButton();\r
+        }\r
+        RebootButton->SetPosition(43, 480); // widget's left position and top position\r
+        RebootButton->Resize(380, 100);     // widget's width and height\r
+        RebootButton->SetViewId(REBOOT);    // Set style                            //重启\r
+        RebootButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        RebootButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+        RebootButton->SetImageSrc("/user/res/system/SYSTEM_REBOOT.bin", nullptr);\r
+        RebootButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *RebootButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        RebootButton->SetOnClickListener(RebootButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(RebootButton);\r
+        RebootButton->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (ShoutdownButton == nullptr)\r
+        {\r
+            ShoutdownButton = new UIButton();\r
+        }\r
+        ShoutdownButton->SetPosition(43, 600); // widget's left position and top position\r
+        ShoutdownButton->Resize(380, 100);     // widget's width and height\r
+        ShoutdownButton->SetViewId(SHOUTDOWM); // Set style                        //关机\r
+        ShoutdownButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        ShoutdownButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+        // Set additional property\r
+        char *button5triggeredImgSrc = nullptr;\r
+        ShoutdownButton->SetImageSrc("/user/res/system/SYSTEM_SHOUTDOWM.bin", nullptr);\r
+        ShoutdownButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *ShoutdownButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        ShoutdownButton->SetOnClickListener(ShoutdownButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(ShoutdownButton);\r
+        ShoutdownButton->SetVisible(true);\r
+\r
+        /***********************************************************************************************************/\r
+        // Add Button to App\r
+        if (FactoryResetButton == nullptr)\r
+        {\r
+            FactoryResetButton = new UIButton();\r
+        }\r
+        FactoryResetButton->SetPosition(43, 720);     // widget's left position and top position\r
+        FactoryResetButton->Resize(380, 100);         // widget's width and height\r
+        FactoryResetButton->SetViewId(FACTORY_RESET); // Set style                   //恢复出厂设置\r
+        FactoryResetButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);\r
+        FactoryResetButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
+        FactoryResetButton->SetImageSrc("/user/res/system/SYSTEM_FACTORY_RESET.bin", nullptr);\r
+        FactoryResetButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+\r
+        // Add the CallBack about events\r
+        UIView::OnClickListener *FactoryResetButtonClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
+        FactoryResetButton->SetOnClickListener(FactoryResetButtonClick);\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(FactoryResetButton);\r
+        FactoryResetButton->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add ImageView to App\r
+        if (image1_ == nullptr)\r
+        {\r
+            image1_ = new UIImageView();\r
+        }\r
+        image1_->SetPosition(171, 801); // widget's left position and top position\r
+        image1_->Resize(100, 100);      // widget's width and height\r
+        image1_->SetViewId("image1");   // Set style\r
+\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(image1_);\r
+        image1_->SetVisible(true);\r
+        /***********************************************************************************************************/\r
+        // Add ImageView to App\r
+        if (image2_ == nullptr)\r
+        {\r
+            image2_ = new UIImageView();\r
+        }\r
+        image2_->SetPosition(183, 21); // widget's left position and top position\r
+        image2_->Resize(100, 100);     // widget's width and height\r
+        image2_->SetViewId("image2");  // Set style\r
+        // Add to scrollView3\r
+        SystemScrollView->Add(image2_);\r
+        image2_->SetVisible(true);\r
+    }\r
+\r
+    void SystemView::DeInitView()\r
+    {\r
+        if (container_ != nullptr)\r
+        {\r
+            container_->RemoveAll();\r
+            delete container_;\r
+            container_ = nullptr;\r
+        }\r
+        if (SystemScrollView != nullptr)\r
+        {\r
+            delete SystemScrollView;\r
+            SystemScrollView = nullptr;\r
+        }\r
+        if (SystemLabel != nullptr)\r
+        {\r
+            delete SystemLabel;\r
+            SystemLabel = nullptr;\r
+        }\r
+        if (image2_ != nullptr)\r
+        {\r
+            delete image2_;\r
+            image2_ = nullptr;\r
+        }\r
+        if (image1_ != nullptr)\r
+        {\r
+            delete image1_;\r
+            image1_ = nullptr;\r
+        }\r
+        if (FactoryResetButton != nullptr)\r
+        {\r
+            delete FactoryResetButton;\r
+            FactoryResetButton = nullptr;\r
+        }\r
+        if (ShoutdownButton != nullptr)\r
+        {\r
+            delete ShoutdownButton;\r
+            ShoutdownButton = nullptr;\r
+        }\r
+        if (RebootButton != nullptr)\r
+        {\r
+            delete RebootButton;\r
+            RebootButton = nullptr;\r
+        }\r
+        if (AboutTheWatchButton != nullptr)\r
+        {\r
+            delete AboutTheWatchButton;\r
+            AboutTheWatchButton = nullptr;\r
+        }\r
+        if (SuperviseButton != nullptr)\r
+        {\r
+            delete SuperviseButton;\r
+            SuperviseButton = nullptr;\r
+        }\r
+        if (SystemLanguageButton != nullptr)\r
+        {\r
+            delete SystemLanguageButton;\r
+            SystemLanguageButton = nullptr;\r
+        }\r
+    }\r
+\r
+    void SystemView::OnStart()\r
+    {\r
+        View<SystemPresenter>::OnStart();\r
+        InitIView();\r
+        RootView::GetInstance()->Add(container_);\r
+    }\r
+\r
+    void SystemView::OnSetUpView()\r
+    {\r
+        View<SystemPresenter>::OnSetUpView();\r
+        Draw();\r
+    }\r
+\r
+    void SystemView::OnTearDownView()\r
+    {\r
+\r
+        View<SystemPresenter>::OnTearDownView();\r
+        return;\r
+    }\r
+\r
+    void SystemView::OnStop()\r
+    {\r
+\r
+        View<SystemPresenter>::OnStop();\r
+        RootView::GetInstance()->RemoveAll();\r
+        return;\r
+    }\r
+}
\ No newline at end of file
index 0db223d..7a8bce2 100644 (file)
@@ -14,13 +14,14 @@ namespace OHOS
 \r
     TraingView::TraingView()\r
     {\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingView::TraingView");\r
         SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
         g_pTraingView = this;\r
     }\r
 \r
     TraingView::~TraingView()\r
     {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingView::~TraingView()");\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingView::~TraingView");\r
         RemoveAll();\r
         DeInit();\r
         g_pTraingView = nullptr;\r
@@ -273,7 +274,6 @@ namespace OHOS
     }\r
     void TraingView::PreLoad(void)\r
     {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingView::PreLoad(void)");\r
         if (!viewiInitStatus)\r
         {\r
             InitView();\r
index 43affeb..280d9da 100644 (file)
@@ -4,13 +4,13 @@ namespace OHOS
 {
     WeatherControlView::WeatherControlView()
     {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherControlView::WeatherControlView()");
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherControlView::WeatherControlView");
         SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
     }
 
     WeatherControlView::~WeatherControlView()
     {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherControlView::~WeatherControlView()");
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherControlView::~WeatherControlView");
         ClearAll();
     }
 
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_ABOUT_THE_WATCH.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_ABOUT_THE_WATCH.bin
new file mode 100644 (file)
index 0000000..80d4c93
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_ABOUT_THE_WATCH.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_FACTORY_RESET.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_FACTORY_RESET.bin
new file mode 100644 (file)
index 0000000..8f86557
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_FACTORY_RESET.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin
new file mode 100644 (file)
index 0000000..ac88ca2
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin
new file mode 100644 (file)
index 0000000..5fb1c58
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SUPERVISE.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SUPERVISE.bin
new file mode 100644 (file)
index 0000000..af74f08
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SUPERVISE.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SYSTEM_LANGUAGE.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SYSTEM_LANGUAGE.bin
new file mode 100644 (file)
index 0000000..1ebc74b
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SYSTEM_LANGUAGE.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/factoryreset.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/factoryreset.bin
new file mode 100644 (file)
index 0000000..803e434
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/factoryreset.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin
new file mode 100644 (file)
index 0000000..fb50225
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin
new file mode 100644 (file)
index 0000000..8ee51a2
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin differ