系统视图修改,删除掉不必要图片
author罗正yun <1732036298@qq.com>
Thu, 25 Jan 2024 08:58:30 +0000 (16:58 +0800)
committer罗正yun <1732036298@qq.com>
Thu, 25 Jan 2024 08:58:30 +0000 (16:58 +0800)
17 files changed:
code/sdk/application/wearable/nativeapp/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/nativeapp/nativeui/secondaryfunction/src/FastTrainingAttentionView.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemAboutTheWatchView.h
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemLanguageView.h
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/system/include/SystemSuperviseView.h
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemAboutTheWatchView.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemFactoryResetPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemLanguageView.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemSuperviseView.cpp
code/sdk/application/wearable/nativeapp/nativeui/system/src/SystemView.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OrangeAttentionVector.bin [moved from code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/FastTrainingAttentionVector.bin with 100% similarity]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin [deleted file]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin [deleted file]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin [deleted file]
code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin [deleted file]

index f261847..06c4d1b 100755 (executable)
@@ -207,20 +207,20 @@ namespace OHOS
     static constexpr const char *PNG_Message_Wechat = APP_RES_PATH "/message/WeChat-icon.bin"; // 微信消息
     static constexpr const char *PNG_Message_QQ = APP_RES_PATH "/message/QQ-icon.bin";         // QQ消息
     /* ---------------------------------- 通用图片 ---------------------------------- */
-    static constexpr const char *PNG_CHECKBOX_OFF_IMAGE = APP_RES_PATH "/CHECKBOX_OFF.bin";                           // checkbox未选中图片
-    static constexpr const char *PNG_CHECKBOX_ON_IMAGE = APP_RES_PATH "/CHECKBOX_ON.bin";                             // checkbox选中图片
-    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_BRIGHTNESS_CONTROL_VECTOR = APP_RES_PATH "/BringhtnessContuolVector.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_TOGGLEBUTTON_OFF_IMAGE = APP_RES_PATH "/TOGGLEBUTTON_OFF.bin";                   // togglebuttton未选中图片
-    static constexpr const char *PNG_TOGGLEBUTTON_ON_IMAGE = APP_RES_PATH "/TOGGLEBUTTON_ON.bin";                     // togglebuttton选中图片
-    static constexpr const char *PNG_SYSTEM_VOLUME_IMAGE = APP_RES_PATH "/SYSTEM_VOLUME.bin";                         // 系统音量
-    static constexpr const char *PNG_CALL_VOLUME_IMAGE = APP_RES_PATH "/CALL_VOLUME.bin";                             // 通话音量
-    static constexpr const char *PNG_MEDIA_VOLUME_IMAGE = APP_RES_PATH "/MEDIA_VOLUME.bin";                           // 媒体音量
-    static constexpr const char *PNG_FAST_TRAINING_ATTENTION_IMAGE = APP_RES_PATH "/FastTrainingAttentionVector.bin"; // 快速训练选中操过三个后出现
+    static constexpr const char *PNG_CHECKBOX_OFF_IMAGE = APP_RES_PATH "/CHECKBOX_OFF.bin";                     // checkbox未选中图片
+    static constexpr const char *PNG_CHECKBOX_ON_IMAGE = APP_RES_PATH "/CHECKBOX_ON.bin";                       // checkbox选中图片
+    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_BRIGHTNESS_CONTROL_VECTOR = APP_RES_PATH "/BringhtnessContuolVector.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_TOGGLEBUTTON_OFF_IMAGE = APP_RES_PATH "/TOGGLEBUTTON_OFF.bin";             // togglebuttton未选中图片
+    static constexpr const char *PNG_TOGGLEBUTTON_ON_IMAGE = APP_RES_PATH "/TOGGLEBUTTON_ON.bin";               // togglebuttton选中图片
+    static constexpr const char *PNG_SYSTEM_VOLUME_IMAGE = APP_RES_PATH "/SYSTEM_VOLUME.bin";                   // 系统音量
+    static constexpr const char *PNG_CALL_VOLUME_IMAGE = APP_RES_PATH "/CALL_VOLUME.bin";                       // 通话音量
+    static constexpr const char *PNG_MEDIA_VOLUME_IMAGE = APP_RES_PATH "/MEDIA_VOLUME.bin";                     // 媒体音量
+    static constexpr const char *PNG_ORANGE_ATTENTION_VECTOR_IMAGE = APP_RES_PATH "/OrangeAttentionVector.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 b636311..35d0b96 100644 (file)
@@ -77,7 +77,7 @@ namespace OHOS
         }\r
         image7_->SetPosition(193, 121);\r
         image7_->Resize(80, 80);\r
-        image7_->SetSrc(PNG_FAST_TRAINING_ATTENTION_IMAGE);\r
+        image7_->SetSrc(PNG_ORANGE_ATTENTION_VECTOR_IMAGE);\r
 \r
         // Add to scrollView1\r
         scrollView1_->Add(image7_);\r
index 916f3b5..03249d4 100644 (file)
@@ -47,9 +47,7 @@ namespace OHOS
         UILabel *LANAddress = nullptr;\r
         UILabel *FONTTitle = nullptr;\r
         UILabel *FONT = nullptr;\r
-\r
-        UIImageView *image = nullptr;\r
-        UIView::OnDragListener *draglistener{nullptr};\r
+        bool initViewStatus{false};\r
     };\r
 }\r
 #endif
\ No newline at end of file
index afb6b98..294bb2b 100644 (file)
@@ -9,10 +9,6 @@
 #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
     class SystemLanguageView\r
     {\r
 \r
index 7a82712..7d23daf 100644 (file)
@@ -2,40 +2,51 @@
 #define SYSTEM_PRESENTER_H\r
 \r
 #include "Presenter.h"\r
- \r
 #include "SystemView.h"\r
- \r
+#include "components/ui_radio_button.h"\r
 namespace OHOS\r
 {\r
+\r
+    static const char *SIMPLIFIED_CHINESE_CHECKBOX = "SimplifiedChineseCheckBox"; // 简体中文 \r
+    static const char *ENGLISH_CHECKBOX = "EnglishCheckBox";                      // English \r
+    class RadiobuttonOnChangeListener : public UICheckBox::OnChangeListener\r
+    {\r
+    public:\r
+        RadiobuttonOnChangeListener(UIRadioButton *uiView)\r
+        {\r
+            m_uiView = uiView;\r
+        }\r
+        ~RadiobuttonOnChangeListener() {}\r
+        bool isChineseRadioButtonSelected();\r
+        bool isEnglishRadioButtonSelected();\r
+        bool OnChange(UICheckBox::UICheckBoxState state) override;\r
+\r
+    private:\r
+        UIRadioButton *m_uiView{nullptr};\r
+    };\r
+\r
     class SystemView;\r
-       \r
     class SystemPresenter : public Presenter<SystemView>,\r
-                                 public UIView::OnClickListener,\r
-                                 public UIView::OnDragListener\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
-        bool OnDragEnd(UIView &view, const DragEvent &event) override;   \r
-    };\r
-} //namespace OHOS\r
-\r
-\r
-\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
+        bool OnDragEnd(UIView &view, const DragEvent &event) override;\r
+    };\r
+} // namespace OHOS\r
 \r
 #endif
\ No newline at end of file
index 2939f4e..3438a7a 100644 (file)
@@ -3,8 +3,6 @@
 \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
@@ -21,14 +19,13 @@ namespace OHOS
         void ClearAll(void);\r
 \r
     private:\r
-        UIViewGroup *container_ = nullptr;\r
         UIScrollView *SystemSuperviseViewScrollView = nullptr;\r
-        UIView::OnDragListener *draglistener{nullptr};\r
         UILabel *Title = nullptr;\r
         UILabel *ProductModel = nullptr;\r
         UILabel *ProductModelName = nullptr;\r
         UILabel *CMIT = nullptr;\r
         UILabel *CMITName = nullptr;\r
+        bool initViewStatus{false};\r
     };\r
 } // namespace OHOS\r
 #endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
index a961a87..7f9b49b 100644 (file)
@@ -25,6 +25,42 @@ namespace OHOS
         return g_pSystemAboutTheWatchView;\r
     }\r
 \r
+    void SystemAboutTheWatchView::ClearAll()\r
+    {\r
+        if (initViewStatus == true)\r
+        {\r
+            SystemAboutTheWatchScrollView->RemoveAll();\r
+            delete SystemAboutTheWatchTitle;\r
+            SystemAboutTheWatchTitle = nullptr;\r
+            delete WatchNameTitle;\r
+            WatchNameTitle = nullptr;\r
+            delete WatchName;\r
+            WatchName = nullptr;\r
+            delete FirmwareVersionTitle;\r
+            FirmwareVersionTitle = nullptr;\r
+            delete FirmwareVersion;\r
+            FirmwareVersion = nullptr;\r
+            delete AlgorithmVersionTitle;\r
+            AlgorithmVersionTitle = nullptr;\r
+            delete AlgorithmVersion;\r
+            AlgorithmVersion = nullptr;\r
+            delete BluetoothAddressTitle;\r
+            BluetoothAddressTitle = nullptr;\r
+            delete BluetoothAddress;\r
+            BluetoothAddress = nullptr;\r
+            delete LANAddressTitle;\r
+            LANAddressTitle = nullptr;\r
+            delete LANAddress;\r
+            LANAddress = nullptr;\r
+            delete FONTTitle;\r
+            FONTTitle = nullptr;\r
+            delete FONT;\r
+            FONT = nullptr;\r
+            delete SystemAboutTheWatchScrollView;\r
+            SystemAboutTheWatchScrollView = nullptr;\r
+        }\r
+    }\r
+\r
     UILabel *SystemAboutTheWatchView::InitLabel(LabelConfig &labelConfig)\r
     {\r
         UILabel *label = new UILabel();\r
@@ -56,7 +92,7 @@ namespace OHOS
         SystemAboutTheWatchScrollView->SetScrollBlankSize(35);\r
         SystemAboutTheWatchScrollView->SetReboundSize(50);\r
         SystemAboutTheWatchScrollView->SetDirection(1);\r
-        draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
+        UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
         if (draglistener == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::draglistener can not be nullptr!");\r
@@ -314,40 +350,7 @@ namespace OHOS
         }\r
         LANAddress->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
         SystemAboutTheWatchScrollView->Add(LANAddress);\r
-\r
+        initViewStatus = true;\r
         return SystemAboutTheWatchScrollView;\r
     }\r
-\r
-    void SystemAboutTheWatchView::ClearAll()\r
-    {\r
-        SystemAboutTheWatchScrollView->RemoveAll();\r
-        delete SystemAboutTheWatchTitle;\r
-        SystemAboutTheWatchTitle = nullptr;\r
-        delete WatchNameTitle;\r
-        WatchNameTitle = nullptr;\r
-        delete WatchName;\r
-        WatchName = nullptr;\r
-        delete FirmwareVersionTitle;\r
-        FirmwareVersionTitle = nullptr;\r
-        delete FirmwareVersion;\r
-        FirmwareVersion = nullptr;\r
-        delete AlgorithmVersionTitle;\r
-        AlgorithmVersionTitle = nullptr;\r
-        delete AlgorithmVersion;\r
-        AlgorithmVersion = nullptr;\r
-        delete BluetoothAddressTitle;\r
-        BluetoothAddressTitle = nullptr;\r
-        delete BluetoothAddress;\r
-        BluetoothAddress = nullptr;\r
-        delete LANAddressTitle;\r
-        LANAddressTitle = nullptr;\r
-        delete LANAddress;\r
-        LANAddress = nullptr;\r
-        delete FONTTitle;\r
-        FONTTitle = nullptr;\r
-        delete FONT;\r
-        FONT = nullptr;\r
-        delete SystemAboutTheWatchScrollView;\r
-        SystemAboutTheWatchScrollView = nullptr;\r
-    }\r
 }
\ No newline at end of file
index 1f49d36..358f022 100644 (file)
@@ -66,7 +66,6 @@ namespace OHOS
         // 根据控件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
index 5d11053..e0457ae 100644 (file)
@@ -215,6 +215,8 @@ namespace OHOS
             return nullptr;\r
         }\r
         SetRadioButtonSelectStatus(*SimplifiedChineseRadioButton, true);\r
+        UICheckBox::OnChangeListener* SimplifiedChineseRadioButtonChange = static_cast<UICheckBox::OnChangeListener*>(new RadiobuttonOnChangeListener(SimplifiedChineseRadioButton));\r
+        SimplifiedChineseRadioButton->SetOnChangeListener(SimplifiedChineseRadioButtonChange);\r
         scrollView->Add(SimplifiedChineseRadioButton);\r
         /* --------------------------- EnglishRadioButton --------------------------- */\r
         radioButtonConfig.left = 300;\r
@@ -226,6 +228,8 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemLanguageView::EnglishRadioButton new fail!");\r
             return nullptr;\r
         }\r
+        UICheckBox::OnChangeListener* EnglishRadioButtonChange = static_cast<UICheckBox::OnChangeListener*>(new RadiobuttonOnChangeListener(EnglishRadioButton));\r
+        EnglishRadioButton->SetOnChangeListener(EnglishRadioButtonChange);\r
         scrollView->Add(EnglishRadioButton);\r
         initViewStatus = true;\r
         return scrollView;\r
index 9a31522..617357c 100644 (file)
@@ -61,7 +61,7 @@ namespace OHOS
 \r
         if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)\r
         {\r
-            NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING);\r
+            NativeAbility::GetInstance().ChangeSlice(VIEW_SYSTEM);\r
             return true;\r
         }\r
         return false;\r
@@ -93,4 +93,55 @@ namespace OHOS
         }\r
         return false;\r
     }\r
+\r
+    /// @brief 简体中文单选按钮被选中\r
+    /// @param  void\r
+    /// @return true 表示选中 ,false 表示未选中\r
+    bool RadiobuttonOnChangeListener::isChineseRadioButtonSelected(void)\r
+    {\r
+        if (m_uiView->GetState() == UICheckBox::SELECTED && m_uiView->GetViewId() == SIMPLIFIED_CHINESE_CHECKBOX)\r
+        {\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /// @brief 英语单选按钮被选中\r
+    /// @param  void\r
+    /// @return true 表示选中 ,false 表示未选中\r
+    bool RadiobuttonOnChangeListener::isEnglishRadioButtonSelected(void)\r
+    {\r
+        if (m_uiView->GetState() == UICheckBox::SELECTED && m_uiView->GetViewId() == ENGLISH_CHECKBOX)\r
+        {\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    bool RadiobuttonOnChangeListener::OnChange(UICheckBox::UICheckBoxState state)\r
+    {\r
+        switch (state)\r
+        {\r
+        case UICheckBox::SELECTED:\r
+            if (isChineseRadioButtonSelected())\r
+            {\r
+                // loadChineseLanguageResource();//加载中文资源\r
+                // updateUIWithChineseText();//更新中文文本\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Switched to Chinese language");\r
+            }\r
+            else if (isEnglishRadioButtonSelected())\r
+            {\r
+                // loadEnglishLanguageResource(); //加载英语资源\r
+                // updateUIWithEnglishText(); //更新英语文本\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Switched to English language");\r
+            }\r
+            break;\r
+        case UICheckBox::UNSELECTED:\r
+            // Handle unselected state if needed\r
+            break;\r
+        default:\r
+            break;\r
+        }\r
+        return true;\r
+    }\r
 }
\ No newline at end of file
index 39a20c9..5e8fb5f 100644 (file)
@@ -8,13 +8,13 @@ namespace OHOS
 \r
     SystemSuperviseView::SystemSuperviseView()\r
     {\r
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemSuperviseView::SystemSuperviseView");\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperviseView::SystemSuperviseView");\r
         g_pSystemSuperviseView = this;\r
     }\r
 \r
     SystemSuperviseView::~SystemSuperviseView()\r
     {\r
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemSuperviseView::~SystemSuperviseView");\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemSuperviseView::~SystemSuperviseView");\r
         ClearAll();\r
         g_pSystemSuperviseView = nullptr;\r
     }\r
@@ -23,6 +23,27 @@ namespace OHOS
     {\r
         return g_pSystemSuperviseView;\r
     }\r
+\r
+    void SystemSuperviseView::ClearAll()\r
+    {\r
+        if (initViewStatus == true)\r
+        {\r
+            SystemSuperviseViewScrollView->RemoveAll();\r
+            delete Title;\r
+            Title = nullptr;\r
+            delete ProductModel;\r
+            ProductModel = nullptr;\r
+            delete ProductModelName;\r
+            ProductModelName = nullptr;\r
+            delete CMIT;\r
+            CMIT = nullptr;\r
+            delete CMITName;\r
+            CMITName = nullptr;\r
+            delete SystemSuperviseViewScrollView;\r
+            SystemSuperviseViewScrollView = nullptr;\r
+        }\r
+    }\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
@@ -49,7 +70,7 @@ namespace OHOS
         SystemSuperviseViewScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
         SystemSuperviseViewScrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
         SystemSuperviseViewScrollView->SetStyle(STYLE_BORDER_RADIUS, 1294);\r
-        draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
+        UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());\r
         if (draglistener == nullptr)\r
         {\r
             return nullptr;\r
@@ -99,48 +120,14 @@ namespace OHOS
         CMITName->SetPosition(37, 367, 400, 30);                  // 位置大小\r
         CMITName->SetStyle(STYLE_TEXT_FONT, 26);                  // 字体大小\r
         CMITName->SetStyle(STYLE_LINE_HEIGHT, 30);                // 字体行高\r
-        CMITName->SetText("V02.03.01");                           // 内容\r
+        CMITName->SetText("V1.0");                                // 内容\r
         CMITName->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS); // 断行模式。\r
         CMITName->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
         CMITName->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
         CMITName->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));\r
         SystemSuperviseViewScrollView->Add(CMITName);\r
-\r
+        initViewStatus = true;\r
         return SystemSuperviseViewScrollView;\r
     }\r
 \r
-    void SystemSuperviseView::ClearAll()\r
-    {\r
-        SystemSuperviseViewScrollView->RemoveAll();\r
-        delete draglistener;\r
-        draglistener = nullptr;\r
-        if (Title != nullptr)\r
-        {\r
-            delete Title;\r
-            Title = nullptr;\r
-        }\r
-        if (ProductModel != nullptr)\r
-        {\r
-            delete ProductModel;\r
-            ProductModel = nullptr;\r
-        }\r
-        if (ProductModelName != nullptr)\r
-        {\r
-            delete ProductModelName;\r
-            ProductModelName = nullptr;\r
-        }\r
-        if (CMIT != nullptr)\r
-        {\r
-            delete CMIT;\r
-            CMIT = nullptr;\r
-        }\r
-        if (CMITName != nullptr)\r
-        {\r
-            delete CMITName;\r
-            CMITName = nullptr;\r
-        }\r
-        delete SystemSuperviseViewScrollView;\r
-        SystemSuperviseViewScrollView = nullptr;\r
-    }\r
-\r
 }
\ No newline at end of file
index 10b9948..52d180a 100644 (file)
@@ -24,6 +24,30 @@ namespace OHOS
         return g_pSystemView;\r
     }\r
 \r
+    void SystemView::ClearAll()\r
+    {\r
+        if (initViewStatus == true)\r
+        {\r
+            SystemScrollView[0]->RemoveAll();\r
+            delete p_SystemAboutTheWatchView;\r
+            p_SystemAboutTheWatchView = nullptr;\r
+            delete p_SystemSuperviseView;\r
+            p_SystemSuperviseView = nullptr;\r
+            delete p_SystemLanguageView;\r
+            p_SystemLanguageView = nullptr;\r
+            delete SystemLabel;\r
+            SystemLabel = nullptr;\r
+            delete AboutTheWatchButton;\r
+            AboutTheWatchButton = nullptr;\r
+            delete SuperviseButton;\r
+            SuperviseButton = nullptr;\r
+            delete SystemLanguageButton;\r
+            SystemLanguageButton = nullptr;\r
+            delete FactoryResetButton;\r
+            FactoryResetButton = nullptr;\r
+        }\r
+    }\r
+\r
     /// @brief 设置SystemScrollView\r
     /// @param  void\r
     /// @return true 设置成功,false 失败\r
@@ -156,34 +180,10 @@ namespace OHOS
         initViewStatus = true;\r
     }\r
 \r
-    void SystemView::ClearAll()\r
-    {\r
-        if (initViewStatus == true)\r
-        {\r
-            SystemScrollView[0]->RemoveAll();\r
-            delete p_SystemAboutTheWatchView;\r
-            p_SystemAboutTheWatchView = nullptr;\r
-            delete p_SystemSuperviseView;\r
-            p_SystemSuperviseView = nullptr;\r
-            delete p_SystemLanguageView;\r
-            p_SystemLanguageView = nullptr;\r
-            delete SystemLabel;\r
-            SystemLabel = nullptr;\r
-            delete AboutTheWatchButton;\r
-            AboutTheWatchButton = nullptr;\r
-            delete SuperviseButton;\r
-            SuperviseButton = nullptr;\r
-            delete SystemLanguageButton;\r
-            SystemLanguageButton = nullptr;\r
-            delete FactoryResetButton;\r
-            FactoryResetButton = nullptr;\r
-        }\r
-    }\r
-\r
-    // 0.跳转到系统视图,其他视图都市通过这个视图跳转\r
+        // 0.跳转到系统视图,其他视图都市通过这个视图跳转\r
     bool SystemView::ChangeSystemView(int16_t thisView)\r
     {\r
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemView");\r
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemView");\r
         RootView::GetInstance()->Add(SystemScrollView[thisView]);\r
         return true;\r
     }\r
@@ -193,7 +193,7 @@ namespace OHOS
     {\r
         if (SystemScrollView[thisView] == nullptr)\r
         {\r
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemAboutView");\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemAboutView");\r
             p_SystemAboutTheWatchView = new SystemAboutTheWatchView();\r
             if (p_SystemAboutTheWatchView == nullptr)\r
             {\r
@@ -211,7 +211,7 @@ namespace OHOS
     {\r
         if (SystemScrollView[thisView] == nullptr)\r
         {\r
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemSuperviseView");\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemSuperviseView");\r
             p_SystemSuperviseView = new SystemSuperviseView();\r
             if (p_SystemSuperviseView == nullptr)\r
             {\r
@@ -229,7 +229,7 @@ namespace OHOS
     {\r
         if (SystemScrollView[thisView] == nullptr)\r
         {\r
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemLanguageView");\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemLanguageView");\r
             p_SystemLanguageView = new SystemLanguageView();\r
             if (p_SystemLanguageView == nullptr)\r
             {\r
@@ -304,7 +304,7 @@ namespace OHOS
         View<SystemPresenter>::OnSetUpView();\r
         if (SystemScrollView[0] == nullptr)\r
         {\r
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemView:: OnSetUpView  has nullptr");\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: OnSetUpView  has nullptr");\r
             return;\r
         }\r
         SystemScrollView[0]->Add(SystemLabel);\r
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
deleted file mode 100644 (file)
index ac88ca2..0000000
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_REBOOT.bin and /dev/null 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
deleted file mode 100644 (file)
index 5fb1c58..0000000
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/SYSTEM_SHOUTDOWM.bin and /dev/null 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
deleted file mode 100644 (file)
index fb50225..0000000
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/reboot.bin and /dev/null 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
deleted file mode 100644 (file)
index 8ee51a2..0000000
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/system/shoutdown.bin and /dev/null differ