正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 NIBPTestting.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 NIBPTestting.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cn.neoprint.padmonitor.ui;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import cn.neoprint.padmonitor.R;
import cn.neoprint.padmonitor.app.AppGlobal;
import cn.neoprint.padmonitor.utils.FontManager;
public class NIBPTestting extends Activity implements View.OnClickListener {
public static Handler m_handler = new Handler();
public SharedPreferences gzj;
public int ifuploaddata;
public ProgressBar m_bpBar;
public TextView m_txnibp;
public TextView m_txnibpDiscription;
public TextView m_txnibpItem;
public TextView m_txnibpStart;
public TextView m_txnibpStop;
public TextView m_txnibpmap;
AppGlobal myApp = null;
public Handler handler = new Handler();
public Handler Starthandler = new Handler();
public Handler Finishhandler = new Handler();
private boolean m_IsTesting = false;
public int nibpunit = 0;
private Runnable Startrunnable = new Runnable() {
@Override
public void run() {
NIBPTestting.this.Init();
}
};
private Runnable Finishrunnable = new Runnable() {
@Override
public void run() {
NIBPTestting.this.finish();
}
};
private Runnable runnable = new Runnable() {
@Override
public void run() {
if (NIBPTestting.this.myApp.GetBPFinish() == 0) {
int GetNowNIBPPP = NIBPTestting.this.myApp.GetNowNIBPPP();
if (NIBPTestting.this.nibpunit == 0) {
NIBPTestting.this.m_txnibp.setText(GetNowNIBPPP + "mmHg");
} else {
NIBPTestting.this.m_txnibp.setText((Math.round(((GetNowNIBPPP * 2) / 15.0f) * 10.0f) / 10.0f) + "kPa");
}
NIBPTestting.this.m_txnibpmap.setText("");
NIBPTestting.this.m_bpBar.setProgress(GetNowNIBPPP);
NIBPTestting.this.m_IsTesting = true;
NIBPTestting.this.m_txnibpStart.setVisibility(4);
NIBPTestting.this.RefreshBPDiscription();
NIBPTestting.this.handler.postDelayed(NIBPTestting.this.runnable, 50L);
return;
}
if (NIBPTestting.this.myApp.GetBPFinish() < 0) {
NIBPTestting.this.m_bpBar.setProgress(0);
NIBPTestting.this.handler.postDelayed(NIBPTestting.this.runnable, 50L);
return;
}
if (NIBPTestting.this.myApp.GetBPSuccessFlag()) {
if (NIBPTestting.this.myApp.GetBPType() == 5) {
NIBPTestting.this.m_txnibp.setText(R.string.LQCheckSuccess);
NIBPTestting.this.m_txnibpmap.setText("");
} else {
NIBPTestting.this.m_txnibp.setText(NIBPTestting.this.myApp.GetBPResult1());
NIBPTestting.this.m_txnibpmap.setText(NIBPTestting.this.myApp.GetBPResult2());
}
NIBPTestting.this.m_bpBar.setProgress(0);
} else {
NIBPTestting.this.m_txnibp.setText(NIBPTestting.this.myApp.GetBPResult1());
NIBPTestting.this.m_txnibpmap.setText("");
NIBPTestting.this.m_bpBar.setProgress(0);
}
NIBPTestting.this.RefreshBPFinish();
}
};
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
requestWindowFeature(1);
setContentView(R.layout.nibptest);
AppGlobal appGlobal = (AppGlobal) getApplication();
this.myApp = appGlobal;
appGlobal.setSystemBarVisible(this, false);
this.myApp.SetBackgroundLight(this, -255, 78, true);
FontManager.changeFonts((ViewGroup) getWindow().getDecorView(), this, Typeface.createFromAsset(getAssets(), "fonts/MSBlack.ttf"));
SharedPreferences sharedPreferences = getSharedPreferences("gzj", 0);
this.gzj = sharedPreferences;
this.nibpunit = sharedPreferences.getInt("nibpunit", 0);
this.ifuploaddata = this.gzj.getInt("ifuploaddata", 0);
this.Starthandler.postDelayed(this.Startrunnable, 10L);
}
@Override
protected void onDestroy() {
super.onDestroy();
this.handler.removeCallbacks(this.runnable);
this.Starthandler.removeCallbacks(this.Startrunnable);
this.Finishhandler.removeCallbacks(this.Finishrunnable);
System.out.println("结束nibp");
}
public void Init() {
setFinishOnTouchOutside(false);
Bundle extras = getIntent().getExtras();
if (extras != null) {
this.myApp.SetBPFinish(extras.getInt("NIBPFinish", -1));
this.myApp.SetBPType(extras.getInt("NIBPType", 1));
} else {
this.myApp.SetBPFinish(-1);
}
this.myApp.SetNowNIBPPP(0);
this.myApp.SetBPResult1("");
this.myApp.SetBPResult2("");
Typeface createFromAsset = Typeface.createFromAsset(getAssets(), "fonts/MSBlack.ttf");
TextView textView = (TextView) findViewById(R.id.nibpPP);
this.m_txnibp = textView;
textView.setTypeface(createFromAsset);
this.m_txnibp.getPaint().setFakeBoldText(true);
this.m_txnibp.setText("");
TextView textView2 = (TextView) findViewById(R.id.nibpmap);
this.m_txnibpmap = textView2;
textView2.setTypeface(createFromAsset);
this.m_txnibpmap.getPaint().setFakeBoldText(true);
this.m_txnibpmap.setText("");
TextView textView3 = (TextView) findViewById(R.id.stopBP);
this.m_txnibpStop = textView3;
textView3.setTypeface(createFromAsset);
this.m_txnibpStop.getPaint().setFakeBoldText(true);
this.m_txnibpStop.setOnClickListener(this);
TextView textView4 = (TextView) findViewById(R.id.startBP);
this.m_txnibpStart = textView4;
textView4.setTypeface(createFromAsset);
this.m_txnibpStart.getPaint().setFakeBoldText(true);
this.m_txnibpStart.setOnClickListener(this);
TextView textView5 = (TextView) findViewById(R.id.nibpTestItem);
this.m_txnibpItem = textView5;
textView5.setTypeface(createFromAsset);
this.m_txnibpItem.getPaint().setFakeBoldText(true);
TextView textView6 = (TextView) findViewById(R.id.nibpdicription);
this.m_txnibpDiscription = textView6;
textView6.setTypeface(createFromAsset);
this.m_txnibpDiscription.getPaint().setFakeBoldText(true);
this.m_bpBar = (ProgressBar) findViewById(R.id.nibpprogress);
this.handler.postDelayed(this.runnable, 50L);
}
@Override
public void finish() {
super.finish();
overridePendingTransition(0, R.anim.zoomout);
}
public void RefreshBPDiscription() {
int GetBPType = this.myApp.GetBPType();
if (GetBPType == 1) {
this.m_txnibpDiscription.setText(R.string.Manualtesting);
return;
}
if (GetBPType == 2) {
this.m_txnibpDiscription.setText(R.string.Autotesting);
return;
}
if (GetBPType == 3) {
this.m_txnibpDiscription.setText(R.string.STATtesting);
return;
}
if (GetBPType == 4) {
this.m_txnibpDiscription.setText(R.string.BPCheck);
} else if (GetBPType == 5) {
this.m_txnibpDiscription.setText(R.string.LQCheck);
} else {
this.m_txnibpDiscription.setText("");
}
}
public void RefreshBPFinish() {
int GetBPFinish = this.myApp.GetBPFinish();
String str = "";
if (GetBPFinish == 10) {
str = getString(R.string.SysError);
} else {
switch (GetBPFinish) {
case 6:
this.handler.postDelayed(this.runnable, 50L);
break;
}
this.myApp.SetBPFinish(-1);
this.m_txnibpDiscription.setText(str);
this.m_bpBar.setProgress(0);
}
this.m_IsTesting = false;
this.Finishhandler.postDelayed(this.Finishrunnable, 5000L);
this.myApp.SetBPFinish(-1);
this.m_txnibpDiscription.setText(str);
this.m_bpBar.setProgress(0);
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == 2131363445) {
Message message = new Message();
message.what = 9;
m_handler.sendMessage(message);
this.m_txnibpStart.setVisibility(4);
this.myApp.SetBPFinish(0);
this.m_IsTesting = true;
return;
}
if (id != 2131363471) {
return;
}
if (this.m_IsTesting) {
Bundle bundle = new Bundle();
bundle.putBoolean("StopBPTest", true);
Intent intent = new Intent();
intent.putExtras(bundle);
setResult(11, intent);
}
this.myApp.SetBPFinish(-1);
finish();
}
}