正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 NIBPSettingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 NIBPSettingActivity.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.inputmethodservice.KeyboardView;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
import cn.neoprint.padmonitor.R;
import cn.neoprint.padmonitor.app.AppGlobal;
import cn.neoprint.padmonitor.utils.FontManager;
import cn.neoprint.padmonitor.utils.constant.GzjSharePref;
import cn.neoprint.padmonitor.utils.keyboard.KeyboardUtil;
import cn.neoprint.padmonitor.utils.keyboard.KeyboardUtilInterface;
import java.lang.reflect.Method;
public class NIBPSettingActivity extends Activity implements View.OnClickListener, KeyboardUtilInterface {
private TextView NIBPAlarmHigh;
private LinearLayout NIBPAlarmItem;
private TextView NIBPAlarmLow;
private TextView NIBPAlarmMid;
public TextView Spinnernibptime1;
public TextView Spinnernibptime2;
private LinearLayout SpinnernibptimeItem1;
private LinearLayout SpinnernibptimeItem2;
public SharedPreferences gzj;
public int ifuploaddata;
private ImageView ima_left;
private ImageView ima_right;
private float kPa_tempDIAHigh;
private float kPa_tempDIALow;
private float kPa_tempMAPHigh;
private float kPa_tempMAPLow;
private float kPa_tempSYSHigh;
private float kPa_tempSYSLow;
private KeyboardView keyboard;
private KeyboardUtil keyboardUtil;
private RelativeLayout.LayoutParams layoutParams;
private boolean m_autoFailreTest;
public boolean m_nibpAlarmLevelshow;
private float m_nibpDIAAlarmHigh;
private float m_nibpDIAAlarmLow;
private int m_nibpFirstPress;
private float m_nibpMAPAlarmHigh;
private float m_nibpMAPAlarmLow;
private float m_nibpSYSAlarmHigh;
private float m_nibpSYSAlarmLow;
private int m_nibpalarmlevel;
private boolean m_nibpalarmswitch;
private int m_nibptest;
private int m_nibptime1;
private boolean m_nibptime1Itemshow;
private int m_nibptime2;
private boolean m_nibptime2Itemshow;
private int m_nibptimeHour1;
private int m_nibptimeHour2;
private int m_nibptimeMin1;
private int m_nibptimeMin2;
private int m_tempnibptest;
private int m_tempnibptime1;
private int m_tempnibptime2;
private float mmHg_tempDIAHigh;
private float mmHg_tempDIALow;
private float mmHg_tempMAPHigh;
private float mmHg_tempMAPLow;
private float mmHg_tempSYSHigh;
private float mmHg_tempSYSLow;
private RadioButton nibpAuto;
private EditText nibpDIAAlarmHigh;
private EditText nibpDIAAlarmLow;
private EditText nibpFirstPress;
private EditText nibpMAPAlarmHigh;
private EditText nibpMAPAlarmLow;
private RadioButton nibpSTAT;
private EditText nibpSYSAlarmHigh;
private EditText nibpSYSAlarmLow;
private TextView nibp_cancle;
private TextView nibp_default;
private TextView nibp_goback;
public TextView nibpalarmlevel;
private Switch nibpalarmswitch;
private CheckBox nibpautoFailreTest;
private RadioButton nibpmanual;
private RadioGroup nibptest_rgp;
private TextView nibptime1Item1;
private TextView nibptime1Item2;
private TextView nibptime1Item3;
private TextView nibptime1Item4;
private TextView nibptime1Item5;
private TextView nibptime1Item6;
private TextView nibptime2Item1;
private TextView nibptime2Item2;
private TextView nibptime2Item3;
private TextView nibptime2Item4;
private TextView nibptime2Item5;
private TextView nibptime2Item6;
private EditText nibptimeHour1;
private EditText nibptimeHour2;
private EditText nibptimeMin1;
private EditText nibptimeMin2;
private int nibpunit;
private RadioButton nibpunit_kpa;
private RadioButton nibpunit_mmhg;
private RadioGroup nibpunit_rgp;
private RelativeLayout relativeLayout;
private float tempDIAH;
private float tempDIAL;
private float tempMAPH;
private float tempMAPL;
private int tempNIBP;
private float tempSYSH;
private float tempSYSL;
public AppGlobal myApp = null;
public boolean m_isConnect = false;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
systemSettings();
getViewId();
initData();
setListeners();
shield();
FontManager.changeFonts((ViewGroup) getWindow().getDecorView(), this, Typeface.createFromAsset(getAssets(), "fonts/MSBlack.ttf"));
}
public void systemSettings() {
this.gzj = getSharedPreferences("gzj", 0);
requestWindowFeature(1);
this.myApp = (AppGlobal) getApplication();
setContentView(R.layout.nibpsetting);
this.myApp.setSystemBarVisible(this, false);
this.myApp.SetBackgroundLight(this, -255, 52, false);
setFinishOnTouchOutside(false);
}
public void showMessage(int i) {
View inflate = getLayoutInflater().inflate(R.layout.mytoast, (ViewGroup) null);
Toast toast = new Toast(this);
toast.setView(inflate);
toast.setGravity(17, -150, 0);
((TextView) inflate.findViewById(R.id.toastInfo)).setText(i);
toast.show();
}
public void getViewId() {
this.nibpalarmswitch = (Switch) findViewById(R.id.nibpalarmswitch);
this.nibpalarmlevel = (TextView) findViewById(R.id.SpinnernibpAlarmLevel);
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.SpinnerNIBPAlarmItem);
this.NIBPAlarmItem = linearLayout;
linearLayout.setVisibility(4);
this.NIBPAlarmHigh = (TextView) findViewById(R.id.SpinnerNIBPHighAlarmItem);
this.NIBPAlarmMid = (TextView) findViewById(R.id.SpinnerNIBPMidAlarmItem);
this.NIBPAlarmLow = (TextView) findViewById(R.id.SpinnerNIBPLowAlarmItem);
this.nibpunit_rgp = (RadioGroup) findViewById(R.id.nibpunit_rgp);
this.nibpunit_mmhg = (RadioButton) findViewById(R.id.nibpunit_1);
this.nibpunit_kpa = (RadioButton) findViewById(R.id.nibpunit_2);
this.nibpSYSAlarmHigh = (EditText) findViewById(R.id.nibpsys_high);
this.nibpSYSAlarmLow = (EditText) findViewById(R.id.nibpsys_low);
this.nibpMAPAlarmHigh = (EditText) findViewById(R.id.nibpmip_high);
this.nibpMAPAlarmLow = (EditText) findViewById(R.id.nibpmip_low);
this.nibpDIAAlarmHigh = (EditText) findViewById(R.id.nibpdia_high);
this.nibpDIAAlarmLow = (EditText) findViewById(R.id.nibpdia_low);
this.nibptest_rgp = (RadioGroup) findViewById(R.id.nibptest_rgp);
this.nibpmanual = (RadioButton) findViewById(R.id.nibpmanual);
this.nibpAuto = (RadioButton) findViewById(R.id.nibpAuto);
this.nibpSTAT = (RadioButton) findViewById(R.id.nibpSTAT);
this.nibpautoFailreTest = (CheckBox) findViewById(R.id.nibpretest);
this.nibpFirstPress = (EditText) findViewById(R.id.nibptime);
this.nibptimeHour1 = (EditText) findViewById(R.id.nibptimeHour1);
this.nibptimeHour2 = (EditText) findViewById(R.id.nibptimeHour2);
this.nibptimeMin1 = (EditText) findViewById(R.id.nibptimeMin1);
this.nibptimeMin2 = (EditText) findViewById(R.id.nibptimeMin2);
this.nibptime1Item1 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem1);
this.nibptime1Item2 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem2);
this.nibptime1Item3 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem3);
this.nibptime1Item4 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem4);
this.nibptime1Item5 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem5);
this.nibptime1Item6 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem6);
this.Spinnernibptime2 = (TextView) findViewById(R.id.Spinnernibptime2);
LinearLayout linearLayout2 = (LinearLayout) findViewById(R.id.SpinnerNIBPTestTime2);
this.SpinnernibptimeItem2 = linearLayout2;
linearLayout2.setVisibility(4);
this.Spinnernibptime1 = (TextView) findViewById(R.id.Spinnernibptime1);
LinearLayout linearLayout3 = (LinearLayout) findViewById(R.id.SpinnerNIBPTestTime1);
this.SpinnernibptimeItem1 = linearLayout3;
linearLayout3.setVisibility(4);
this.nibptime2Item1 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem21);
this.nibptime2Item2 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem22);
this.nibptime2Item3 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem23);
this.nibptime2Item4 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem24);
this.nibptime2Item5 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem25);
this.nibptime2Item6 = (TextView) findViewById(R.id.SpinnerNIBPTestTimeItem26);
this.nibp_cancle = (TextView) findViewById(R.id.nibp_cancle);
this.nibp_default = (TextView) findViewById(R.id.nibp_default);
this.nibp_goback = (TextView) findViewById(R.id.nibp_goback);
}
public void setListeners() {
this.nibpalarmswitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
if (NIBPSettingActivity.this.myApp.m_ALMPermission) {
NIBPSettingActivity.this.m_nibpalarmswitch = z;
} else {
NIBPSettingActivity.this.showMessage(R.string.AlarmTip);
NIBPSettingActivity.this.nibpalarmswitch.setChecked(NIBPSettingActivity.this.m_nibpalarmswitch);
}
}
});
this.nibpalarmlevel.setOnClickListener(this);
this.NIBPAlarmHigh.setOnClickListener(this);
this.NIBPAlarmMid.setOnClickListener(this);
this.NIBPAlarmLow.setOnClickListener(this);
this.nibpunit_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i) {
case R.id.nibpunit_1:
if (NIBPSettingActivity.this.gzj.getInt("nibpunit", 0) != 0) {
NIBPSettingActivity.this.nibpunit = 0;
NIBPSettingActivity.this.unitConverter(7.5f);
break;
}
break;
case R.id.nibpunit_2:
if (NIBPSettingActivity.this.gzj.getInt("nibpunit", 0) != 1) {
NIBPSettingActivity.this.nibpunit = 1;
NIBPSettingActivity.this.unitConverter(0.133f);
break;
}
break;
}
}
});
OnTouchListenerMpl onTouchListenerMpl = new OnTouchListenerMpl();
this.nibpSYSAlarmHigh.setOnTouchListener(onTouchListenerMpl);
this.nibpSYSAlarmHigh.addTextChangedListener(new mTextWatcher(R.id.nibpsys_high, this));
this.nibpSYSAlarmLow.setOnTouchListener(onTouchListenerMpl);
this.nibpSYSAlarmLow.addTextChangedListener(new mTextWatcher(R.id.nibpsys_low, this));
this.nibpMAPAlarmHigh.setOnTouchListener(onTouchListenerMpl);
this.nibpMAPAlarmHigh.addTextChangedListener(new mTextWatcher(R.id.nibpmip_high, this));
this.nibpMAPAlarmLow.setOnTouchListener(onTouchListenerMpl);
this.nibpMAPAlarmLow.addTextChangedListener(new mTextWatcher(R.id.nibpmip_low, this));
this.nibpDIAAlarmHigh.setOnTouchListener(onTouchListenerMpl);
this.nibpDIAAlarmHigh.addTextChangedListener(new mTextWatcher(R.id.nibpdia_high, this));
this.nibpDIAAlarmLow.setOnTouchListener(onTouchListenerMpl);
this.nibpDIAAlarmLow.addTextChangedListener(new mTextWatcher(R.id.nibpdia_low, this));
this.nibpFirstPress.setOnTouchListener(onTouchListenerMpl);
this.nibptimeHour1.setOnTouchListener(onTouchListenerMpl);
this.nibptimeHour2.setOnTouchListener(onTouchListenerMpl);
this.nibptimeMin1.setOnTouchListener(onTouchListenerMpl);
this.nibptimeMin2.setOnTouchListener(onTouchListenerMpl);
watcher watcherVar = new watcher();
this.nibpFirstPress.addTextChangedListener(watcherVar);
this.nibptimeHour1.addTextChangedListener(watcherVar);
this.nibptimeHour2.addTextChangedListener(watcherVar);
this.nibptimeMin1.addTextChangedListener(watcherVar);
this.nibptimeMin2.addTextChangedListener(watcherVar);
Intent intent = getIntent();
if (intent != null) {
this.ifuploaddata = intent.getExtras().getInt("ifuploaddata");
}
if (this.ifuploaddata == 2) {
clickable(false, -7829368);
} else {
clickable(true, -1);
}
this.m_isConnect = intent.getExtras().getBoolean("isconnect");
this.nibptest_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
if (NIBPSettingActivity.this.m_isConnect) {
if (i == 2131363005) {
NIBPSettingActivity.this.m_tempnibptest = 1;
return;
} else if (i == 2131363007) {
NIBPSettingActivity.this.m_tempnibptest = 2;
return;
} else {
if (i != 2131363017) {
return;
}
NIBPSettingActivity.this.m_tempnibptest = 0;
return;
}
}
NIBPSettingActivity.this.showMessage(R.string.Connectfirst);
if (NIBPSettingActivity.this.m_nibptest == 0) {
NIBPSettingActivity.this.nibpmanual.setChecked(true);
} else if (NIBPSettingActivity.this.m_nibptest == 1) {
NIBPSettingActivity.this.nibpAuto.setChecked(true);
} else if (NIBPSettingActivity.this.m_nibptest == 2) {
NIBPSettingActivity.this.nibpSTAT.setChecked(true);
}
}
});
this.Spinnernibptime1.setOnClickListener(this);
this.nibptime1Item1.setOnClickListener(this);
this.nibptime1Item2.setOnClickListener(this);
this.nibptime1Item3.setOnClickListener(this);
this.nibptime1Item4.setOnClickListener(this);
this.nibptime1Item5.setOnClickListener(this);
this.nibptime1Item6.setOnClickListener(this);
this.Spinnernibptime2.setOnClickListener(this);
this.nibptime2Item1.setOnClickListener(this);
this.nibptime2Item2.setOnClickListener(this);
this.nibptime2Item3.setOnClickListener(this);
this.nibptime2Item4.setOnClickListener(this);
this.nibptime2Item5.setOnClickListener(this);
this.nibptime2Item6.setOnClickListener(this);
this.nibp_cancle.setOnClickListener(this);
this.nibp_default.setOnClickListener(this);
this.nibp_goback.setOnClickListener(this);
}
public synchronized void initData() {
this.m_nibpAlarmLevelshow = false;
this.m_nibptime1Itemshow = false;
this.m_nibptime2Itemshow = false;
boolean z = this.gzj.getBoolean("nibpalarmswitch", false);
this.m_nibpalarmswitch = z;
this.nibpalarmswitch.setChecked(z);
int i = this.gzj.getInt("nibpalarmlevel", 1);
this.m_nibpalarmlevel = i;
SetAlarmLevelText(i);
int i2 = this.gzj.getInt("nibpunit", 0);
this.nibpunit = i2;
this.tempNIBP = i2;
if (i2 == 0) {
this.nibpunit_mmhg.setChecked(true);
this.m_nibpSYSAlarmHigh = this.gzj.getFloat("mmHg_tempSYSHigh", 160.0f);
this.m_nibpSYSAlarmLow = this.gzj.getFloat("mmHg_tempSYSLow", 90.0f);
this.m_nibpMAPAlarmHigh = this.gzj.getFloat("mmHg_tempMAPHigh", 110.0f);
this.m_nibpMAPAlarmLow = this.gzj.getFloat("mmHg_tempMAPLow", 60.0f);
this.m_nibpDIAAlarmHigh = this.gzj.getFloat("mmHg_tempDIAHigh", 90.0f);
this.m_nibpDIAAlarmLow = this.gzj.getFloat("mmHg_tempDIALow", 50.0f);
} else {
this.nibpunit_kpa.setChecked(true);
this.m_nibpSYSAlarmHigh = this.gzj.getFloat("kPa_tempSYSHigh", 21.333334f);
this.m_nibpSYSAlarmLow = this.gzj.getFloat("kPa_tempSYSLow", 12.0f);
this.m_nibpMAPAlarmHigh = this.gzj.getFloat("kPa_tempMAPHigh", 14.666667f);
this.m_nibpMAPAlarmLow = this.gzj.getFloat("kPa_tempMAPLow", 8.0f);
this.m_nibpDIAAlarmHigh = this.gzj.getFloat("kPa_tempDIAHigh", 12.0f);
this.m_nibpDIAAlarmLow = this.gzj.getFloat("kPa_tempDIALow", 6.6666665f);
}
this.tempSYSH = this.m_nibpSYSAlarmHigh;
this.tempSYSL = this.m_nibpSYSAlarmLow;
this.tempMAPH = this.m_nibpMAPAlarmHigh;
this.tempMAPL = this.m_nibpMAPAlarmLow;
this.tempDIAH = this.m_nibpDIAAlarmHigh;
this.tempDIAL = this.m_nibpDIAAlarmLow;
this.mmHg_tempSYSHigh = this.gzj.getFloat("mmHg_tempSYSHigh", 160.0f);
this.mmHg_tempSYSLow = this.gzj.getFloat("mmHg_tempSYSLow", 90.0f);
this.kPa_tempSYSHigh = this.gzj.getFloat("kPa_tempSYSHigh", 21.0f);
this.kPa_tempSYSLow = this.gzj.getFloat("kPa_tempSYSLow", 12.0f);
this.mmHg_tempMAPHigh = this.gzj.getFloat("mmHg_tempMAPHigh", 110.0f);
this.mmHg_tempMAPLow = this.gzj.getFloat("mmHg_tempMAPLow", 60.0f);
this.kPa_tempMAPHigh = this.gzj.getFloat("kPa_tempMAPHigh", 15.0f);
this.kPa_tempMAPLow = this.gzj.getFloat("kPa_tempMAPLow", 8.0f);
this.mmHg_tempDIAHigh = this.gzj.getFloat("mmHg_tempDIAHigh", 90.0f);
this.mmHg_tempDIALow = this.gzj.getFloat("mmHg_tempDIALow", 50.0f);
this.kPa_tempDIAHigh = this.gzj.getFloat("kPa_tempDIAHigh", 8.0f);
this.kPa_tempDIALow = this.gzj.getFloat("kPa_tempDIALow", 7.0f);
this.nibpSYSAlarmHigh.setText("" + this.m_nibpSYSAlarmHigh);
this.nibpSYSAlarmLow.setText("" + this.m_nibpSYSAlarmLow);
this.nibpMAPAlarmHigh.setText("" + this.m_nibpMAPAlarmHigh);
this.nibpMAPAlarmLow.setText("" + this.m_nibpMAPAlarmLow);
this.nibpDIAAlarmHigh.setText("" + this.m_nibpDIAAlarmHigh);
this.nibpDIAAlarmLow.setText("" + this.m_nibpDIAAlarmLow);
int i3 = this.gzj.getInt("nibptest", 0);
this.m_nibptest = i3;
this.m_tempnibptest = i3;
if (i3 == 0) {
this.nibpmanual.setChecked(true);
} else if (i3 == 1) {
this.nibpAuto.setChecked(true);
} else if (i3 == 2) {
this.nibpSTAT.setChecked(true);
}
boolean z2 = this.gzj.getBoolean("autoFailreTest", false);
this.m_autoFailreTest = z2;
this.nibpautoFailreTest.setChecked(z2);
this.m_nibpFirstPress = this.gzj.getInt("nibpFirstPress", 240);
this.nibpFirstPress.setText("" + this.m_nibpFirstPress);
int i4 = this.gzj.getInt("nibptimeHour1", 8);
this.nibptimeHour1.setText("" + i4);
this.m_nibptimeHour1 = i4;
int i5 = this.gzj.getInt("nibptimeHour2", 20);
this.m_nibptimeHour2 = i5;
this.nibptimeHour2.setText("" + i5);
int i6 = this.gzj.getInt("nibptimeMin1", 0);
this.nibptimeMin1.setText("" + i6);
this.m_nibptimeMin1 = i6;
int i7 = this.gzj.getInt("nibptimeMin2", 0);
this.m_nibptimeMin2 = i7;
this.nibptimeMin2.setText("" + i7);
this.m_nibptime1 = this.gzj.getInt("Spinnernibptime1", 30);
this.Spinnernibptime1.setText("" + this.m_nibptime1);
this.m_tempnibptime1 = this.m_nibptime1;
int i8 = this.gzj.getInt("Spinnernibptime2", 30);
this.m_nibptime2 = i8;
this.m_tempnibptime2 = i8;
this.Spinnernibptime2.setText("" + this.m_nibptime2);
}
public void clickable(boolean z, int i) {
this.nibptest_rgp.setClickable(z);
this.nibpmanual.setClickable(z);
this.nibpAuto.setClickable(z);
this.nibpSTAT.setClickable(z);
this.nibpmanual.setTextColor(i);
this.nibpAuto.setTextColor(i);
this.nibpSTAT.setTextColor(i);
}
public boolean judge(float f, float f2, int i) {
float f3;
float f4;
String string;
float f5;
String str;
String str2;
int i2 = this.gzj.getInt("PatientType", 0);
float f6 = 0.0f;
switch (i) {
case 11:
case 12:
f3 = i2 == 0 ? 270.0f : 200.0f;
f4 = 40.0f;
string = getString(R.string.AlarmDataRangeSYSError);
float f7 = f3;
f6 = f4;
f5 = f7;
break;
case 13:
case 14:
float f8 = i2 == 0 ? 215.0f : 150.0f;
string = getString(R.string.AlarmDataRangeMeanError);
f5 = f8;
f6 = 10.0f;
break;
case 15:
case 16:
f3 = i2 == 0 ? 235.0f : 165.0f;
f4 = 20.0f;
string = getString(R.string.AlarmDataRangeDiaError);
float f72 = f3;
f6 = f4;
f5 = f72;
break;
default:
string = "";
f5 = 0.0f;
break;
}
if (this.nibpunit == 1) {
f6 = ((int) ((f6 * 0.133f) * 10.0f)) / 10.0f;
f5 = ((int) ((f5 * 0.133f) * 10.0f)) / 10.0f;
str = "kPa";
} else {
str = "mmHg";
}
boolean z = f <= f2 || f >= f5 || f2 <= f6;
if (z) {
if (f < f2) {
str2 = string + " " + getString(R.string.RangeOfdataError);
} else {
str2 = string + " " + f6 + "---" + f5 + str;
}
ShowAlertDialog(str2);
}
return z;
}
public boolean SaveNIBPPara() {
throw new UnsupportedOperationException("Method not decompiled: cn.neoprint.padmonitor.ui.NIBPSettingActivity.SaveNIBPPara():boolean");
}
@Override
public void finish() {
super.finish();
overridePendingTransition(0, R.anim.zoomout);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
public void ShowAlertDialog(String str) {
View inflate = getLayoutInflater().inflate(R.layout.mytoast, (ViewGroup) null);
Toast toast = new Toast(getApplicationContext());
toast.setView(inflate);
toast.setGravity(17, 0, 0);
((TextView) inflate.findViewById(R.id.toastInfo)).setText(str);
toast.show();
}
public void SetAlarmLevelText(int i) {
if (i == 0) {
this.nibpalarmlevel.setText(R.string.ECGalarmhigh);
return;
}
if (i == 1) {
this.nibpalarmlevel.setText(R.string.ECGalarmMid);
} else if (i == 2) {
this.nibpalarmlevel.setText(R.string.ECGalarmhlow);
} else {
this.nibpalarmlevel.setText(R.string.ECGalarmMid);
}
}
public void SetNIBPTestTimeText(int i, TextView textView) {
if (i == 0) {
textView.setText("5");
return;
}
if (i == 1) {
textView.setText("15");
return;
}
if (i == 2) {
textView.setText("30");
return;
}
if (i == 3) {
textView.setText("60");
return;
}
if (i == 4) {
textView.setText("90");
} else if (i == 5) {
textView.setText("120");
} else {
textView.setText("30");
}
}
protected void ResetNIBPParaExcu() {
this.m_nibpalarmswitch = true;
this.nibpalarmswitch.setChecked(true);
this.m_nibpalarmlevel = 1;
SetAlarmLevelText(1);
this.nibpunit = 0;
this.nibpunit_mmhg.setChecked(true);
this.m_nibpSYSAlarmHigh = 160.0f;
this.nibpSYSAlarmHigh.setText("" + this.m_nibpSYSAlarmHigh);
this.m_nibpSYSAlarmLow = 90.0f;
this.nibpSYSAlarmLow.setText("" + this.m_nibpSYSAlarmLow);
this.m_nibpMAPAlarmHigh = 110.0f;
this.nibpMAPAlarmHigh.setText("" + this.m_nibpMAPAlarmHigh);
this.m_nibpMAPAlarmLow = 60.0f;
this.nibpMAPAlarmLow.setText("" + this.m_nibpMAPAlarmLow);
this.m_nibpDIAAlarmHigh = 90.0f;
this.nibpDIAAlarmHigh.setText("" + this.m_nibpDIAAlarmHigh);
this.m_nibpDIAAlarmLow = 50.0f;
this.nibpDIAAlarmLow.setText("" + this.m_nibpDIAAlarmLow);
this.m_tempnibptest = 0;
this.nibpmanual.setChecked(true);
this.m_autoFailreTest = false;
this.nibpautoFailreTest.setChecked(false);
this.m_nibpFirstPress = 240;
this.nibpFirstPress.setText("" + this.m_nibpFirstPress);
this.m_nibptimeHour1 = 8;
this.nibptimeHour1.setText("" + this.m_nibptimeHour1);
this.m_nibptimeHour2 = 20;
this.nibptimeHour2.setText("" + this.m_nibptimeHour2);
this.m_nibptimeMin1 = 0;
this.nibptimeMin1.setText("" + this.m_nibptimeMin1);
this.m_nibptimeMin2 = 0;
this.nibptimeMin2.setText("" + this.m_nibptimeMin2);
this.m_nibptime1 = 30;
this.Spinnernibptime1.setText("" + this.m_nibptime1);
this.m_nibptime1 = 30;
this.Spinnernibptime2.setText("" + this.m_nibptime2);
SaveNIBPPara();
finish();
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
if (i == 1 && intent != null && intent.getExtras().getBoolean("popupresult")) {
ResetNIBPParaExcu();
}
}
@Override
public void onClick(View view) {
int id = view.getId();
switch (id) {
case R.id.SpinnerNIBPHighAlarmItem:
this.m_nibpalarmlevel = 0;
SetAlarmLevelText(0);
this.NIBPAlarmItem.setVisibility(4);
this.m_nibpAlarmLevelshow = false;
break;
case R.id.SpinnerNIBPLowAlarmItem:
this.m_nibpalarmlevel = 2;
SetAlarmLevelText(2);
this.NIBPAlarmItem.setVisibility(4);
this.m_nibpAlarmLevelshow = false;
break;
case R.id.SpinnerNIBPMidAlarmItem:
this.m_nibpalarmlevel = 1;
SetAlarmLevelText(1);
this.NIBPAlarmItem.setVisibility(4);
this.m_nibpAlarmLevelshow = false;
break;
default:
switch (id) {
case R.id.SpinnerNIBPTestTimeItem1:
SetNIBPTestTimeText(0, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 5;
break;
case R.id.SpinnerNIBPTestTimeItem2:
SetNIBPTestTimeText(1, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 15;
break;
case R.id.SpinnerNIBPTestTimeItem21:
SetNIBPTestTimeText(0, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 5;
break;
case R.id.SpinnerNIBPTestTimeItem22:
SetNIBPTestTimeText(1, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 15;
break;
case R.id.SpinnerNIBPTestTimeItem23:
SetNIBPTestTimeText(2, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 30;
break;
case R.id.SpinnerNIBPTestTimeItem24:
SetNIBPTestTimeText(3, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 60;
break;
case R.id.SpinnerNIBPTestTimeItem25:
SetNIBPTestTimeText(4, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 90;
break;
case R.id.SpinnerNIBPTestTimeItem26:
SetNIBPTestTimeText(5, this.Spinnernibptime2);
this.SpinnernibptimeItem2.setVisibility(4);
this.m_nibptime2Itemshow = false;
this.m_tempnibptime2 = 120;
break;
case R.id.SpinnerNIBPTestTimeItem3:
SetNIBPTestTimeText(2, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 30;
break;
case R.id.SpinnerNIBPTestTimeItem4:
SetNIBPTestTimeText(3, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 60;
break;
case R.id.SpinnerNIBPTestTimeItem5:
SetNIBPTestTimeText(4, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 90;
break;
case R.id.SpinnerNIBPTestTimeItem6:
SetNIBPTestTimeText(5, this.Spinnernibptime1);
this.SpinnernibptimeItem1.setVisibility(4);
this.m_nibptime1Itemshow = false;
this.m_tempnibptime1 = 120;
break;
default:
switch (id) {
case R.id.SpinnernibpAlarmLevel:
if (this.m_nibpAlarmLevelshow) {
this.NIBPAlarmItem.setVisibility(4);
} else {
this.NIBPAlarmItem.setVisibility(0);
}
this.m_nibpAlarmLevelshow = !this.m_nibpAlarmLevelshow;
break;
case R.id.Spinnernibptime1:
if (this.m_nibptime2Itemshow) {
this.SpinnernibptimeItem2.setVisibility(4);
}
this.SpinnernibptimeItem1.setVisibility(0);
this.m_nibptime1Itemshow = true;
break;
case R.id.Spinnernibptime2:
if (this.m_nibptime1Itemshow) {
this.SpinnernibptimeItem1.setVisibility(4);
}
this.SpinnernibptimeItem2.setVisibility(0);
this.m_nibptime2Itemshow = true;
break;
default:
switch (id) {
case R.id.nibp_cancle:
reset();
finish();
break;
case R.id.nibp_default:
Bundle bundle = new Bundle();
bundle.putInt("popuptextview", R.string.dialog_nibpParaSetting);
Intent intent = new Intent();
intent.putExtras(bundle);
intent.setClass(this, PopUpParaDefaultActivity.class);
startActivityForResult(intent, 1);
break;
case R.id.nibp_goback:
if (SaveNIBPPara()) {
finish();
break;
}
break;
}
}
}
}
}
public void unitConverter(float f) {
if (f == 7.5f) {
this.nibpSYSAlarmHigh.setText(this.mmHg_tempSYSHigh + "");
this.nibpSYSAlarmLow.setText(this.mmHg_tempSYSLow + "");
this.nibpMAPAlarmHigh.setText(this.mmHg_tempMAPHigh + "");
this.nibpMAPAlarmLow.setText(this.mmHg_tempMAPLow + "");
this.nibpDIAAlarmHigh.setText(this.mmHg_tempDIAHigh + "");
this.nibpDIAAlarmLow.setText(this.mmHg_tempDIALow + "");
} else {
this.nibpSYSAlarmHigh.setText(this.kPa_tempSYSHigh + "");
this.nibpSYSAlarmLow.setText(this.kPa_tempSYSLow + "");
this.nibpMAPAlarmHigh.setText(this.kPa_tempMAPHigh + "");
this.nibpMAPAlarmLow.setText(this.kPa_tempMAPLow + "");
this.nibpDIAAlarmHigh.setText(this.kPa_tempDIAHigh + "");
this.nibpDIAAlarmLow.setText(this.kPa_tempDIALow + "");
}
this.gzj.edit().putInt("nibpunit", this.nibpunit).commit();
}
public void reset() {
SharedPreferences.Editor edit = this.gzj.edit();
edit.putInt("nibpunit", this.tempNIBP);
edit.putFloat(GzjSharePref.KEY_NIBP_SYS_ALARM_HIGH, this.tempSYSH);
edit.putFloat(GzjSharePref.KEY_NIBP_SYS_ALARM_LOW, this.tempSYSL);
edit.putFloat("nibpMAPAlarmHigh", this.tempMAPH);
edit.putFloat("nibpMAPAlarmLow", this.tempMAPL);
edit.putFloat(GzjSharePref.KEY_NIBP_DIA_ALARM_HIGH, this.tempDIAH);
edit.putFloat(GzjSharePref.KEY_NIBP_DIA_ALARM_LOW, this.tempDIAL);
edit.commit();
}
@Override
public void initTopKeyboard(EditText editText) {
KeyboardUtil keyboardUtil = this.keyboardUtil;
if (keyboardUtil == null) {
this.keyboardUtil = new KeyboardUtil(this, this, editText, true, false);
} else {
keyboardUtil.hideKeyboard();
this.keyboardUtil = null;
this.keyboardUtil = new KeyboardUtil(this, this, editText, true, false);
}
KeyboardView keyboardView = (KeyboardView) findViewById(R.id.keyboard_view);
this.keyboard = keyboardView;
keyboardView.setVisibility(0);
ImageView imageView = (ImageView) findViewById(R.id.ima_right);
this.ima_right = imageView;
imageView.setVisibility(0);
editText.setInputType(editText.getInputType());
}
@Override
public void initLeftKeyboard(EditText editText) {
KeyboardUtil keyboardUtil = this.keyboardUtil;
if (keyboardUtil == null) {
this.keyboardUtil = new KeyboardUtil(this, this, editText, true, false);
} else {
keyboardUtil.hideKeyboard();
this.keyboardUtil = null;
this.keyboardUtil = new KeyboardUtil(this, this, editText, true, false);
}
KeyboardView keyboardView = (KeyboardView) findViewById(R.id.keyboard_view);
this.keyboard = keyboardView;
keyboardView.setVisibility(0);
ImageView imageView = (ImageView) findViewById(R.id.ima_left);
this.ima_left = imageView;
imageView.setVisibility(0);
editText.setInputType(editText.getInputType());
}
@Override
public void setlayoutParams(int i, int i2, int i3, int i4) {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
this.layoutParams = layoutParams;
layoutParams.leftMargin = i;
this.layoutParams.topMargin = i2;
this.layoutParams.rightMargin = i3;
this.layoutParams.bottomMargin = i4;
RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.rel);
this.relativeLayout = relativeLayout;
relativeLayout.setLayoutParams(this.layoutParams);
}
@Override
public void shield() {
try {
Method method = EditText.class.getMethod("setShowSoftInputOnFocus", Boolean.TYPE);
method.setAccessible(true);
method.invoke(this.nibpSYSAlarmHigh, false);
method.invoke(this.nibpSYSAlarmLow, false);
method.invoke(this.nibpMAPAlarmHigh, false);
method.invoke(this.nibpMAPAlarmLow, false);
method.invoke(this.nibpDIAAlarmHigh, false);
method.invoke(this.nibpDIAAlarmLow, false);
method.invoke(this.nibptimeHour1, false);
method.invoke(this.nibptimeHour2, false);
method.invoke(this.nibptimeMin1, false);
method.invoke(this.nibptimeMin2, false);
method.invoke(this.nibpFirstPress, false);
} catch (Exception e) {
e.printStackTrace();
}
}
class OnTouchListenerMpl implements View.OnTouchListener {
OnTouchListenerMpl() {
}
@Override
public boolean onTouch(android.view.View r8, android.view.MotionEvent r9) {
throw new UnsupportedOperationException("Method not decompiled: cn.neoprint.padmonitor.ui.NIBPSettingActivity.OnTouchListenerMpl.onTouch(android.view.View, android.view.MotionEvent):boolean");
}
}
class mTextWatcher implements TextWatcher {
public int ID;
public NIBPSettingActivity activity;
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
public mTextWatcher(int i, NIBPSettingActivity nIBPSettingActivity) {
this.ID = i;
this.activity = nIBPSettingActivity;
}
@Override
public void afterTextChanged(Editable editable) {
if (editable.toString().equals("") || editable.toString().equals(".")) {
return;
}
if (editable.toString().substring(0, 1).equals(".")) {
if (!editable.toString().substring(0, 1).equals(".") || editable.toString().length() <= 1) {
if (editable.toString().equals("") || editable.toString().equals(".")) {
return;
}
} else if (Float.parseFloat(editable.toString()) >= 100.0f && editable.toString().length() > 4) {
editable = editable.delete(4, editable.toString().length());
} else if (Float.parseFloat(editable.toString()) < 10.0f && editable.toString().length() > 2) {
editable = editable.delete(2, editable.toString().length());
} else if (Float.parseFloat(editable.toString()) < 100.0f && Float.parseFloat(editable.toString()) >= 10.0f && editable.toString().length() > 3) {
editable = editable.delete(3, editable.toString().length());
}
} else if (Float.parseFloat(editable.toString()) >= 100.0f && editable.toString().length() > 3) {
editable = editable.delete(3, editable.toString().length());
} else if (Float.parseFloat(editable.toString()) < 10.0f && editable.toString().length() > 3) {
editable = editable.delete(3, editable.toString().length());
} else if (Float.parseFloat(editable.toString()) < 100.0f && Float.parseFloat(editable.toString()) >= 10.0f && editable.toString().length() > 4) {
editable = editable.delete(4, editable.toString().length());
}
if (this.activity.nibpunit == 0) {
switch (this.ID) {
case R.id.nibpdia_high:
if (NIBPSettingActivity.this.mmHg_tempDIAHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempDIAHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempDIAHigh = ((int) ((r10.mmHg_tempDIAHigh * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
case R.id.nibpdia_low:
if (NIBPSettingActivity.this.mmHg_tempDIALow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempDIALow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempDIALow = ((int) ((r10.mmHg_tempDIALow * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
case R.id.nibpmip_high:
if (NIBPSettingActivity.this.mmHg_tempMAPHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempMAPHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempMAPHigh = ((int) ((r10.mmHg_tempMAPHigh * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
case R.id.nibpmip_low:
if (NIBPSettingActivity.this.mmHg_tempMAPLow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempMAPLow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempMAPLow = ((int) ((r10.mmHg_tempMAPLow * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
case R.id.nibpsys_high:
if (NIBPSettingActivity.this.mmHg_tempSYSHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempSYSHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempSYSHigh = ((int) ((r10.mmHg_tempSYSHigh * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
case R.id.nibpsys_low:
if (NIBPSettingActivity.this.mmHg_tempSYSLow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.mmHg_tempSYSLow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.kPa_tempSYSLow = ((int) ((r10.mmHg_tempSYSLow * 0.133f) * 10.0f)) / 10.0f;
break;
}
break;
}
}
if (this.activity.nibpunit == 1) {
switch (this.ID) {
case R.id.nibpdia_high:
if (NIBPSettingActivity.this.kPa_tempDIAHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempDIAHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempDIAHigh = (Math.round(r10.kPa_tempDIAHigh * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
case R.id.nibpdia_low:
if (NIBPSettingActivity.this.kPa_tempDIALow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempDIALow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempDIALow = (Math.round(r10.kPa_tempDIALow * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
case R.id.nibpmip_high:
if (NIBPSettingActivity.this.kPa_tempMAPHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempMAPHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempMAPHigh = (Math.round(r10.kPa_tempMAPHigh * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
case R.id.nibpmip_low:
if (NIBPSettingActivity.this.kPa_tempMAPLow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempMAPLow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempMAPLow = (Math.round(r10.kPa_tempMAPLow * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
case R.id.nibpsys_high:
if (NIBPSettingActivity.this.kPa_tempSYSHigh != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempSYSHigh = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempSYSHigh = (Math.round(r10.kPa_tempSYSHigh * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
case R.id.nibpsys_low:
if (NIBPSettingActivity.this.kPa_tempSYSLow != Float.parseFloat(editable.toString())) {
NIBPSettingActivity.this.kPa_tempSYSLow = Float.parseFloat(editable.toString());
NIBPSettingActivity.this.mmHg_tempSYSLow = (Math.round(r10.kPa_tempSYSLow * 7.5f) * 10.0f) / 10.0f;
break;
}
break;
}
}
}
}
class watcher implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
watcher() {
}
@Override
public void afterTextChanged(Editable editable) {
if (editable.toString().equals("") || !editable.toString().substring(editable.toString().length() - 1, editable.toString().length()).equals(".")) {
return;
}
editable.delete(editable.toString().length() - 1, editable.toString().length());
}
}
}