Browse Source

样式

tags/old_version_1
fyf 1 year ago
parent
commit
0f47a92d27
5 changed files with 26 additions and 28 deletions
  1. +1
    -1
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +11
    -13
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  3. +8
    -8
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/imagebutton_control.java
  4. +5
    -5
      app/src/main/res/layout/activity_bottom_navigation2.xml
  5. +1
    -1
      app/src/main/res/values/colors.xml

+ 1
- 1
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -40,7 +40,7 @@ public class ExecuteTheRecipe {
/** /**
* 等待超时时间 * 等待超时时间
*/ */
public static int whileTime = 10;
public static int whileTime = 20;


/** /**
* 监听变量值 * 监听变量值


+ 11
- 13
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java View File

@@ -233,12 +233,12 @@ public class Home1Fragment extends BaseFragment {
jiaoban_control.mListener = new MyClickListener() { jiaoban_control.mListener = new MyClickListener() {
@Override @Override
public void clickListener(View v, Object data) { public void clickListener(View v, Object data) {
boolean status = (boolean) data;
if (!IsMake(true))
boolean status = !(boolean) data;
if (!IsMake(false))
{ {
jiaoban_control.SetStatus(!status);
return; return;
} }
jiaoban_control.SetStatus(status);
int jd = (int) nifty_slider2.getValue(); int jd = (int) nifty_slider2.getValue();
ToastUtils.info("点击按钮:搅拌" + status + ".搅拌频率:" + jd); ToastUtils.info("点击按钮:搅拌" + status + ".搅拌频率:" + jd);
ExecuteTheRecipe.WritePLC("搅拌速度", jd, new IWriteCallBack() { ExecuteTheRecipe.WritePLC("搅拌速度", jd, new IWriteCallBack() {
@@ -267,13 +267,12 @@ public class Home1Fragment extends BaseFragment {
zhuandong_control_left.mListener = new MyClickListener() { zhuandong_control_left.mListener = new MyClickListener() {
@Override @Override
public void clickListener(View v, Object data) { public void clickListener(View v, Object data) {
boolean status = (boolean) data;
boolean status = !(boolean) data;
if (!IsMake(true)) if (!IsMake(true))
{ {
zhuandong_control_left.SetStatus(!status);
return; return;
} }
ToastUtils.info("点击按钮:炒锅正转" + status);
zhuandong_control_left.SetStatus(status);
int jd = (int) nifty_slider3.getValue(); int jd = (int) nifty_slider3.getValue();
ToastUtils.info("点击按钮:搅拌" + status + ".转动频率:" + jd); ToastUtils.info("点击按钮:搅拌" + status + ".转动频率:" + jd);
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() { ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@@ -301,13 +300,12 @@ public class Home1Fragment extends BaseFragment {
zhuandong_control_Rift.mListener = new MyClickListener() { zhuandong_control_Rift.mListener = new MyClickListener() {
@Override @Override
public void clickListener(View v, Object data) { public void clickListener(View v, Object data) {
boolean status = (boolean) data;
boolean status = !(boolean) data;
if (!IsMake(true)) if (!IsMake(true))
{ {
zhuandong_control_Rift.SetStatus(!status);
return; return;
} }
ToastUtils.info("点击按钮:炒锅反转" + status);
zhuandong_control_Rift.SetStatus(status);
int jd = (int) nifty_slider3.getValue(); int jd = (int) nifty_slider3.getValue();
ToastUtils.info("点击按钮:搅拌" + status + ".转动频率:" + jd); ToastUtils.info("点击按钮:搅拌" + status + ".转动频率:" + jd);
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() { ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@@ -335,12 +333,12 @@ public class Home1Fragment extends BaseFragment {
choushui_control.mListener = new MyClickListener() { choushui_control.mListener = new MyClickListener() {
@Override @Override
public void clickListener(View v, Object data) { public void clickListener(View v, Object data) {
boolean status = (boolean) data;
boolean status = !(boolean) data;
if (!IsMake(true)) if (!IsMake(true))
{ {
choushui_control.SetStatus(!status);
return; return;
} }
choushui_control.SetStatus(status);
ToastUtils.info("点击按钮:炒锅抽水" + status); ToastUtils.info("点击按钮:炒锅抽水" + status);
ExecuteTheRecipe.WritePLC("炒锅抽水", status, null); ExecuteTheRecipe.WritePLC("炒锅抽水", status, null);
} }
@@ -354,12 +352,12 @@ public class Home1Fragment extends BaseFragment {
fangshui_control.mListener = new MyClickListener() { fangshui_control.mListener = new MyClickListener() {
@Override @Override
public void clickListener(View v, Object data) { public void clickListener(View v, Object data) {
boolean status = (boolean) data;
boolean status = !(boolean) data;
if (!IsMake(true)) if (!IsMake(true))
{ {
fangshui_control.SetStatus(!status);
return; return;
} }
fangshui_control.SetStatus(status);
ToastUtils.info("点击按钮:炒锅放水" + status); ToastUtils.info("点击按钮:炒锅放水" + status);
ExecuteTheRecipe.WritePLC("炒锅放水", status, null); ExecuteTheRecipe.WritePLC("炒锅放水", status, null);
} }


+ 8
- 8
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/imagebutton_control.java View File

@@ -75,18 +75,17 @@ public class imagebutton_control extends LinearLayout {
text_u.setText(""); text_u.setText("");
} }


SetStatus(Status);
SetStatus(false);
} }


@OnClick({R.id.startjb}) @OnClick({R.id.startjb})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.startjb:
Status=!Status;
SetStatus(Status);
break;
}

// switch (view.getId()) {
// case R.id.startjb:
// Status=!Status;
// SetStatus(Status);
// break;
// }
if(mListener!=null) if(mListener!=null)
{ {
mListener.clickListener(root,Status); mListener.clickListener(root,Status);
@@ -99,6 +98,7 @@ public class imagebutton_control extends LinearLayout {
*/ */
public void SetStatus(boolean status) public void SetStatus(boolean status)
{ {
Status=status;
if(status) if(status)
{ {
image_u.setImageResource(ks_ys); image_u.setImageResource(ks_ys);


+ 5
- 5
app/src/main/res/layout/activity_bottom_navigation2.xml View File

@@ -32,12 +32,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:water_mark_align="CENTER" app:water_mark_align="CENTER"
app:water_mark_degree="-30" app:water_mark_degree="-30"
app:water_mark_dx="100px"
app:water_mark_dy="240px"
app:water_mark_dx="300px"
app:water_mark_dy="340px"
app:water_mark_sync="true" app:water_mark_sync="true"
app:water_mark_text="四川黑菠萝技"
app:water_mark_text="黑菠萝技术部"
app:water_mark_textColor="@color/watermarkcolor" app:water_mark_textColor="@color/watermarkcolor"
app:water_mark_textBold="false"
app:water_mark_textSize="12px" />
app:water_mark_textBold="true"
app:water_mark_textSize="14px" />


</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> </com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 1
- 1
app/src/main/res/values/colors.xml View File

@@ -66,7 +66,7 @@
<color name="main_background">#EEEEEE</color> <color name="main_background">#EEEEEE</color>
<color name="colorLoginButton">#004684</color> <color name="colorLoginButton">#004684</color>
<color name="black_50p">#80000000</color> <color name="black_50p">#80000000</color>
<color name="watermarkcolor">#14000000</color>
<color name="watermarkcolor">#22000000</color>




<!--自定义日期时间控件--> <!--自定义日期时间控件-->


Loading…
Cancel
Save