Selaa lähdekoodia

合并代码55

第二版
fyf 1 vuosi sitten
vanhempi
commit
a20f4e1021
3 muutettua tiedostoa jossa 23 lisäystä ja 3 poistoa
  1. +7
    -0
      app/src/main/java/com/example/bpa/service/DeviceData.java
  2. +7
    -3
      app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java
  3. +9
    -0
      app/src/main/res/layout/from/layout/activity_dzcjy.xml

+ 7
- 0
app/src/main/java/com/example/bpa/service/DeviceData.java Näytä tiedosto

@@ -1146,4 +1146,11 @@ public class DeviceData {


//endregion

/**
* 关闭写保护
*/
public void setCloseWrite(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.1", true, callback);
}
}

+ 7
- 3
app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java Näytä tiedosto

@@ -52,7 +52,7 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
* zerocalibration_button:零点校准
* allcalibration_button:一键去皮
*/
Button mwSave_button, owSave_button, materilwrite_button, calibration_button, zeroweight_button, outWrite_button, zerocalibration_button, allcalibration_button;
Button mwSave_button, owSave_button, materilwrite_button, calibration_button, zeroweight_button, outWrite_button, zerocalibration_button, allcalibration_button,closewrite_bottom;

EditText materialweight_edit, outweight_edit;

@@ -106,6 +106,8 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis

values_spinner = this.findViewById(R.id.values_spinner);
allcalibration_button = this.findViewById(R.id.allcalibration_button);

closewrite_bottom = this.findViewById(R.id.closewrite_bottom);
//edit
mode_1_realvalue = this.findViewById(R.id.mode_1_realvalue);
mode_2_realvalue = this.findViewById(R.id.mode_2_realvalue);
@@ -150,7 +152,7 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
allcalibration_button.setOnClickListener(this);
out_switch.setOnCheckedChangeListener(this);
marialmode_switch.setOnCheckedChangeListener(this);
closewrite_bottom.setOnClickListener(this);

}

@@ -254,7 +256,9 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
case R.id.allcalibration_button://一件去皮
DeviceData.Get().setOneClickPeeling(null);
break;

case R.id.closewrite_bottom://关闭写保护
DeviceData.Get().setCloseWrite(null);
break;
}
}).start();



+ 9
- 0
app/src/main/res/layout/from/layout/activity_dzcjy.xml Näytä tiedosto

@@ -238,7 +238,16 @@
android:background="@drawable/btn_greenblue"
android:text="零点校准"
android:layout_margin="5dp"/>


</LinearLayout>
<Button
android:id="@+id/closewrite_bottom"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/btn_greenblue"
android:text="关闭写保护"
android:layout_margin="5dp"/>
</LinearLayout>
</RelativeLayout>



Ladataan…
Peruuta
Tallenna