wjc
20 小时以前 5645ad0ea692bd3ed2246e19af065e0abefde80a
2025年06月26日10:59:42
5个文件已修改
44 ■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/widget/ConfirmationCancelDialog.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-en/strings.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-zh/strings.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java
@@ -12,6 +12,7 @@
import android.text.method.LinkMovementMethod;
import android.text.method.PasswordTransformationMethod;
import android.text.style.ClickableSpan;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
@@ -318,10 +319,40 @@
        viewBinding.homeNoNetworkModeLoginTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                UserConfigManage.getInstance().setNoNetworkFlag(true);
                UserConfigManage.getInstance().Save();
                String path = HDLUniMP.UNI_EVENT_OPEN_NONETWORKDEVICELIST + "?mac=" + UserConfigManage.getInstance().getNoNetworkDeviceMac() + "&password=" + UserConfigManage.getInstance().getNoNetworkPassword() + "&autoVerify=" +UserConfigManage.getInstance().isNoNetworkFlag();
                HdlUniLogic.getInstance().openUniMP(path, null);
                boolean isNoNetworkModeLogin = SharedPreUtils.getBoolean("no_network_mode");
                if (!isNoNetworkModeLogin) {
                    //第一次打开要提示
                    ConfirmationCancelDialog confirmationCancelDialog = new ConfirmationCancelDialog(_mActivity);
                    confirmationCancelDialog.setTitle(getString(R.string.loading_title_tip));
                    confirmationCancelDialog.setContent(getString(R.string.no_network_mode_tip));
                    confirmationCancelDialog.setConfirmation(getString(R.string.home_login_affirm));
                    confirmationCancelDialog.setCancel(getString(R.string.scan_cancel));
                    confirmationCancelDialog.show();
                    confirmationCancelDialog.getContentTextView().setGravity(Gravity.START);
                    confirmationCancelDialog.setNoOnclickListener(new ConfirmationCancelDialog.onNoOnclickListener() {
                        @Override
                        public void Cancel() {
                            confirmationCancelDialog.dismiss();
                            SharedPreUtils.putBoolean("no_network_mode", false);
                        }
                    });
                    confirmationCancelDialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() {
                        @Override
                        public void Confirm() {
                            confirmationCancelDialog.dismiss();
                            SharedPreUtils.putBoolean("no_network_mode", true);
                            UserConfigManage.getInstance().setNoNetworkFlag(true);
                            UserConfigManage.getInstance().Save();
                            String path = HDLUniMP.UNI_EVENT_OPEN_NONETWORKDEVICELIST + "?mac=" + UserConfigManage.getInstance().getNoNetworkDeviceMac() + "&password=" + UserConfigManage.getInstance().getNoNetworkPassword() + "&autoVerify=" + UserConfigManage.getInstance().isNoNetworkFlag();
                            HdlUniLogic.getInstance().openUniMP(path, null);
                        }
                    });
                } else {
                    UserConfigManage.getInstance().setNoNetworkFlag(true);
                    UserConfigManage.getInstance().Save();
                    String path = HDLUniMP.UNI_EVENT_OPEN_NONETWORKDEVICELIST + "?mac=" + UserConfigManage.getInstance().getNoNetworkDeviceMac() + "&password=" + UserConfigManage.getInstance().getNoNetworkPassword() + "&autoVerify=" + UserConfigManage.getInstance().isNoNetworkFlag();
                    HdlUniLogic.getInstance().openUniMP(path, null);
                }
            }
        });
app/src/main/java/com/hdl/photovoltaic/widget/ConfirmationCancelDialog.java
@@ -129,6 +129,7 @@
        }
    }
    public TextView getContentTextView() {
        if (viewBinding == null) {
            return null;
app/src/main/res/values-en/strings.xml
@@ -365,4 +365,5 @@
    <string name="device_failed_to_certificate">Device failed to certificate</string>
    <string name="no_network_mode">No network mode</string>
    <string name="confirm_deletion">Delete confirmation required</string>
    <string name="no_network_mode_tip">Before using the offline mode, please make sure that the phone and the device are in the same local area network, otherwise it will not work properly. You can try the following two methods:\n\n1. Connect the phone to the device hotspot;\n\n2. Connect the phone to the router Wi-Fi, and the device to the router LAN port via an Ethernet cable.</string>
</resources>
app/src/main/res/values-zh/strings.xml
@@ -361,5 +361,6 @@
    <string name="device_failed_to_certificate">查询设备认证失败</string>
    <string name="no_network_mode">无网模式</string>
    <string name="confirm_deletion">确定需要删除</string>
    <string name="no_network_mode_tip">使用无网模式前,请确保手机与设备处于同一局域网内,否则将无法正常使用,你可以尝试以下两种方式:\n\n1.手机连接设备热点;\n\n2.手机连接路由器Wi-Fi,设备通过网线接入路由器LAN口。</string>
</resources>
app/src/main/res/values/strings.xml
@@ -367,7 +367,7 @@
    <string name="device_failed_to_certificate">Device failed to certificate</string>
    <string name="no_network_mode">No network mode</string>
    <string name="confirm_deletion">Delete confirmation required</string>
    <string name="no_network_mode_tip">Before using the offline mode, please make sure that the phone and the device are in the same local area network, otherwise it will not work properly. You can try the following two methods:\n\n1. Connect the phone to the device hotspot;\n\n2. Connect the phone to the router Wi-Fi, and the device to the router LAN port via an Ethernet cable.</string>