正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 ECGParaSettingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 ECGParaSettingActivity.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.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
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.SeekBar;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
import androidx.core.view.MotionEventCompat;
import androidx.exifinterface.media.ExifInterface;
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;
import java.util.List;
public class ECGParaSettingActivity extends Activity implements SeekBar.OnSeekBarChangeListener, View.OnClickListener, KeyboardUtilInterface {
public static Handler m_handler = new Handler();
private LinearLayout ChanItem1;
private LinearLayout ChanItem2;
private TextView ECGAlarmHigh;
private LinearLayout ECGAlarmItem;
private TextView ECGAlarmLow;
private TextView ECGAlarmMid;
private Switch ECGJZswitch;
private TextView ECG_goback;
private Switch HR50HZswitch;
private Switch HRSC_lock;
private Switch QiBo_lock;
TextView[] SpinnerECG1Item;
TextView SpinnerECG1ItemAVF;
TextView SpinnerECG1ItemAVL;
TextView SpinnerECG1ItemAVR;
TextView SpinnerECG1ItemI;
TextView SpinnerECG1ItemII;
TextView SpinnerECG1ItemIII;
TextView SpinnerECG1ItemV;
TextView[] SpinnerECG2Item;
TextView SpinnerECG2ItemAVF;
TextView SpinnerECG2ItemAVL;
TextView SpinnerECG2ItemAVR;
TextView SpinnerECG2ItemI;
TextView SpinnerECG2ItemII;
TextView SpinnerECG2ItemIII;
TextView SpinnerECG2ItemV;
private AudioManager audiomanage;
private int currentVolume;
private int ecgHRsource;
private RadioButton ecgHRsource1;
private RadioButton ecgHRsource2;
private RadioGroup ecgHRsource_rgp;
private TextView ecg_cancle;
private TextView ecg_default;
private int ecgalarmlevel;
private int ecgcalHR;
private RadioButton ecgcalHR1;
private RadioButton ecgcalHR2;
private RadioGroup ecgcalHR_rgp;
private int ecgchanno1;
private int ecgchanno2;
private int ecgfilter;
private RadioButton ecgfilter_Dia;
private RadioButton ecgfilter_Mon;
private RadioButton ecgfilter_Ope;
private RadioGroup ecgfilter_rgp;
private int ecggain;
private RadioButton ecggain1;
private RadioButton ecggain2;
private RadioButton ecggain3;
private RadioButton ecggain4;
private RadioGroup ecggain_rgp;
private int ecgleadtype;
private RadioButton ecgleadtype1;
private RadioButton ecgleadtype2;
private RadioGroup ecgleadtype_rgp;
private int ecgspeed;
private RadioButton ecgspeed1;
private RadioButton ecgspeed2;
private RadioButton ecgspeed3;
private RadioGroup ecgspeed_rgp;
public SharedPreferences gzj;
private int highhr;
private EditText hr_high;
private Switch hr_lock;
private EditText hr_low;
private ImageView ima_top;
private boolean ishr_lock;
private KeyboardView keyboard;
private KeyboardUtil keyboardUtil;
private RelativeLayout.LayoutParams layoutParams;
private int lowhr;
List<TextView[]> mList;
public TextView m_ECG1chan;
public TextView m_ECG2chan;
public TextView m_ECGalarmlevel;
private int m_tempcurrentVolume;
private int maxvol;
private EditText myVirturlEdit;
private RelativeLayout relativeLayout;
private SeekBar seekBar;
private int tempecgHRsource;
private int tempecgcalHR;
private int tempecgfilter;
private int tempecggain;
private int tempecgleadtype;
private int tempecgspeed;
private int temphighhr;
private boolean tempishr_lock;
private int templowhr;
private boolean tempm_bECGQiboSwitch = false;
private boolean m_bECGQiboSwitch = false;
private boolean m_bHR50HZswitch = false;
private boolean tempm_bHR50HZswitch = false;
private boolean m_bHRxlscswitch = false;
private boolean tempm_bHRxlscswitch = false;
private boolean tempm_bECGJZswitch = false;
private boolean m_bECGJZswitch = false;
public AppGlobal myApp = null;
boolean myclick = false;
@Override
public void initLeftKeyboard(EditText editText) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
requestWindowFeature(1);
this.myApp = (AppGlobal) getApplication();
setContentView(R.layout.ecgsetting);
this.myApp.setSystemBarVisible(this, false);
this.myApp.SetBackgroundLight(this, -255, 52, false);
this.gzj = getSharedPreferences("gzj", 0);
setFinishOnTouchOutside(false);
FontManager.changeFonts((ViewGroup) getWindow().getDecorView(), this, Typeface.createFromAsset(getAssets(), "fonts/MSBlack.ttf"));
InitECGSetting();
SeekBar seekBar = (SeekBar) findViewById(R.id.SeekBarECGHeartVOL);
this.seekBar = seekBar;
seekBar.setOnSeekBarChangeListener(this);
setVolumeControlStream(2);
AudioManager audioManager = (AudioManager) getSystemService("audio");
this.audiomanage = audioManager;
this.maxvol = audioManager.getStreamMaxVolume(2);
int i = this.gzj.getInt("HRCurrentVolume", 7);
this.currentVolume = i;
this.m_tempcurrentVolume = i;
this.seekBar.setMax(this.maxvol);
this.seekBar.setProgress(this.currentVolume);
}
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
this.audiomanage.setStreamVolume(2, i, 4);
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
this.m_tempcurrentVolume = this.audiomanage.getStreamVolume(2);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public boolean onKeyDown(int i, KeyEvent keyEvent) {
int streamVolume = this.audiomanage.getStreamVolume(2);
if (i == 25) {
if (streamVolume > 0) {
streamVolume--;
}
this.seekBar.setProgress(streamVolume);
this.audiomanage.setStreamVolume(2, streamVolume, 4);
return true;
}
if (i == 24) {
if (streamVolume < this.maxvol) {
streamVolume++;
}
this.seekBar.setProgress(streamVolume);
this.audiomanage.setStreamVolume(2, streamVolume, 4);
}
return true;
}
public void SetChannelText(TextView textView, int i) {
switch (i) {
case 0:
textView.setText("I");
break;
case 1:
textView.setText("II");
break;
case 2:
textView.setText("III");
break;
case 3:
textView.setText("aVL");
break;
case 4:
textView.setText("aVR");
break;
case 5:
textView.setText("aVF");
break;
case 6:
textView.setText(ExifInterface.GPS_MEASUREMENT_INTERRUPTED);
break;
default:
textView.setText("II");
break;
}
}
public void SetAlarmLevelText(int i) {
if (i == 0) {
this.m_ECGalarmlevel.setText(R.string.ECGalarmhigh);
return;
}
if (i == 1) {
this.m_ECGalarmlevel.setText(R.string.ECGalarmMid);
} else if (i == 2) {
this.m_ECGalarmlevel.setText(R.string.ECGalarmhlow);
} else {
this.m_ECGalarmlevel.setText(R.string.ECGalarmMid);
}
}
public void InitECGSetting() {
this.ecgchanno1 = this.gzj.getInt("ecgchanno1", 1);
TextView textView = (TextView) findViewById(R.id.SpinnerECG1);
this.m_ECG1chan = textView;
SetChannelText(textView, this.ecgchanno1);
this.m_ECG1chan.setOnClickListener(this);
TextView textView2 = (TextView) findViewById(R.id.SpinnerECG1ItemI);
this.SpinnerECG1ItemI = textView2;
textView2.setOnClickListener(this);
TextView textView3 = (TextView) findViewById(R.id.SpinnerECG1ItemII);
this.SpinnerECG1ItemII = textView3;
textView3.setOnClickListener(this);
TextView textView4 = (TextView) findViewById(R.id.SpinnerECG1ItemIII);
this.SpinnerECG1ItemIII = textView4;
textView4.setOnClickListener(this);
TextView textView5 = (TextView) findViewById(R.id.SpinnerECG1ItemAVL);
this.SpinnerECG1ItemAVL = textView5;
textView5.setOnClickListener(this);
TextView textView6 = (TextView) findViewById(R.id.SpinnerECG1ItemAVR);
this.SpinnerECG1ItemAVR = textView6;
textView6.setOnClickListener(this);
TextView textView7 = (TextView) findViewById(R.id.SpinnerECG1ItemAVF);
this.SpinnerECG1ItemAVF = textView7;
textView7.setOnClickListener(this);
TextView textView8 = (TextView) findViewById(R.id.SpinnerECG1ItemV);
this.SpinnerECG1ItemV = textView8;
textView8.setOnClickListener(this);
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.SpinnerECG1Item);
this.ChanItem1 = linearLayout;
linearLayout.setVisibility(4);
this.ecgchanno2 = this.gzj.getInt("ecgchanno2", 0);
TextView textView9 = (TextView) findViewById(R.id.SpinnerECG2);
this.m_ECG2chan = textView9;
SetChannelText(textView9, this.ecgchanno2);
this.m_ECG2chan.setOnClickListener(this);
TextView textView10 = (TextView) findViewById(R.id.SpinnerECG2ItemI);
this.SpinnerECG2ItemI = textView10;
textView10.setOnClickListener(this);
TextView textView11 = (TextView) findViewById(R.id.SpinnerECG2ItemII);
this.SpinnerECG2ItemII = textView11;
textView11.setOnClickListener(this);
TextView textView12 = (TextView) findViewById(R.id.SpinnerECG2ItemIII);
this.SpinnerECG2ItemIII = textView12;
textView12.setOnClickListener(this);
TextView textView13 = (TextView) findViewById(R.id.SpinnerECG2ItemAVL);
this.SpinnerECG2ItemAVL = textView13;
textView13.setOnClickListener(this);
TextView textView14 = (TextView) findViewById(R.id.SpinnerECG2ItemAVR);
this.SpinnerECG2ItemAVR = textView14;
textView14.setOnClickListener(this);
TextView textView15 = (TextView) findViewById(R.id.SpinnerECG2ItemAVF);
this.SpinnerECG2ItemAVF = textView15;
textView15.setOnClickListener(this);
TextView textView16 = (TextView) findViewById(R.id.SpinnerECG2ItemV);
this.SpinnerECG2ItemV = textView16;
textView16.setOnClickListener(this);
LinearLayout linearLayout2 = (LinearLayout) findViewById(R.id.SpinnerECG2Item);
this.ChanItem2 = linearLayout2;
linearLayout2.setVisibility(4);
this.ecgalarmlevel = this.gzj.getInt("ecgalarmlevel", 1);
this.m_ECGalarmlevel = (TextView) findViewById(R.id.SpinnerECGalarm);
this.ECGAlarmItem = (LinearLayout) findViewById(R.id.SpinnerECGAlarmItem);
SetAlarmLevelText(this.ecgalarmlevel);
this.m_ECGalarmlevel.setOnClickListener(this);
this.ECGAlarmItem.setVisibility(4);
TextView textView17 = (TextView) findViewById(R.id.SpinnerECGHighAlarmItem);
this.ECGAlarmHigh = textView17;
textView17.setOnClickListener(this);
TextView textView18 = (TextView) findViewById(R.id.SpinnerECGMidAlarmItem);
this.ECGAlarmMid = textView18;
textView18.setOnClickListener(this);
TextView textView19 = (TextView) findViewById(R.id.SpinnerECGLowAlarmItem);
this.ECGAlarmLow = textView19;
textView19.setOnClickListener(this);
this.ecgfilter_rgp = (RadioGroup) findViewById(R.id.ecgfilter_rgp);
this.ecgfilter_Mon = (RadioButton) findViewById(R.id.ecgfilter_mon);
this.ecgfilter_Dia = (RadioButton) findViewById(R.id.ecgfilter_dia);
this.ecgfilter_Ope = (RadioButton) findViewById(R.id.ecgfilter_ope);
int i = this.gzj.getInt("ecgfilter", 1);
this.ecgfilter = i;
this.tempecgfilter = i;
if (i == 0) {
this.ecgfilter_Dia.setChecked(true);
} else if (i == 1) {
this.ecgfilter_Mon.setChecked(true);
} else if (i == 2) {
this.ecgfilter_Ope.setChecked(true);
}
this.ecgfilter_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i2) {
switch (i2) {
case R.id.ecgfilter_dia:
ECGParaSettingActivity.this.tempecgfilter = 0;
break;
case R.id.ecgfilter_mon:
ECGParaSettingActivity.this.tempecgfilter = 1;
break;
case R.id.ecgfilter_ope:
ECGParaSettingActivity.this.tempecgfilter = 2;
break;
}
}
});
this.ecggain_rgp = (RadioGroup) findViewById(R.id.ecg3_rgp);
this.ecggain1 = (RadioButton) findViewById(R.id.ecggain_1);
this.ecggain2 = (RadioButton) findViewById(R.id.ecggain_2);
this.ecggain3 = (RadioButton) findViewById(R.id.ecggain_3);
this.ecggain4 = (RadioButton) findViewById(R.id.ecggain_4);
int i2 = this.gzj.getInt("ecggain", 2);
this.ecggain = i2;
this.tempecggain = i2;
if (i2 == 0) {
this.ecggain1.setChecked(true);
} else if (i2 == 1) {
this.ecggain2.setChecked(true);
} else if (i2 == 2) {
this.ecggain3.setChecked(true);
} else if (i2 == 3) {
this.ecggain4.setChecked(true);
}
this.ecggain_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i3) {
if (!ECGParaSettingActivity.this.myclick) {
switch (i3) {
case R.id.ecggain_1:
ECGParaSettingActivity.this.tempecggain = 0;
break;
case R.id.ecggain_2:
ECGParaSettingActivity.this.tempecggain = 1;
break;
case R.id.ecggain_3:
ECGParaSettingActivity.this.tempecggain = 2;
break;
case R.id.ecggain_4:
ECGParaSettingActivity.this.tempecggain = 3;
break;
}
}
ECGParaSettingActivity.this.myclick = false;
}
});
this.ecgspeed_rgp = (RadioGroup) findViewById(R.id.ecgspeed_rgp);
this.ecgspeed1 = (RadioButton) findViewById(R.id.ecgspeed_1);
this.ecgspeed2 = (RadioButton) findViewById(R.id.ecgspeed_2);
this.ecgspeed3 = (RadioButton) findViewById(R.id.ecgspeed_3);
int i3 = this.gzj.getInt("ecgspeed", 0);
this.ecgspeed = i3;
this.tempecgspeed = i3;
if (i3 == 0) {
this.ecgspeed1.setChecked(true);
} else if (i3 == 1) {
this.ecgspeed2.setChecked(true);
} else if (i3 == 2) {
this.ecgspeed3.setChecked(true);
}
this.ecgspeed_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i4) {
switch (i4) {
case R.id.ecgspeed_1:
ECGParaSettingActivity.this.tempecgspeed = 0;
break;
case R.id.ecgspeed_2:
ECGParaSettingActivity.this.tempecgspeed = 1;
break;
case R.id.ecgspeed_3:
ECGParaSettingActivity.this.tempecgspeed = 2;
break;
}
}
});
this.ecgleadtype_rgp = (RadioGroup) findViewById(R.id.ecgleadtype_rgp);
this.ecgleadtype1 = (RadioButton) findViewById(R.id.ecgleadtype_3);
this.ecgleadtype2 = (RadioButton) findViewById(R.id.ecgleadtype_5);
int i4 = this.gzj.getInt("ecgleadtype", 1);
this.ecgleadtype = i4;
this.tempecgleadtype = i4;
if (i4 == 0) {
this.ecgleadtype1.setChecked(true);
} else if (i4 == 1) {
this.ecgleadtype2.setChecked(true);
}
this.ecgleadtype_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i5) {
switch (i5) {
case R.id.ecgleadtype_3:
ECGParaSettingActivity.this.tempecgleadtype = 0;
break;
case R.id.ecgleadtype_5:
ECGParaSettingActivity.this.tempecgleadtype = 1;
break;
}
}
});
this.ecgcalHR_rgp = (RadioGroup) findViewById(R.id.ecgcalHR_rgp);
this.ecgcalHR1 = (RadioButton) findViewById(R.id.ecgchan1);
this.ecgcalHR2 = (RadioButton) findViewById(R.id.ecgchan2);
int i5 = this.gzj.getInt("ecgcalHR", 0);
this.ecgcalHR = i5;
this.tempecgcalHR = i5;
if (i5 == 0) {
this.ecgcalHR1.setChecked(true);
} else if (i5 == 1) {
this.ecgcalHR2.setChecked(true);
}
this.ecgcalHR_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i6) {
switch (i6) {
case R.id.ecgchan1:
ECGParaSettingActivity.this.tempecgcalHR = 0;
break;
case R.id.ecgchan2:
ECGParaSettingActivity.this.tempecgcalHR = 1;
break;
}
}
});
this.ecgHRsource_rgp = (RadioGroup) findViewById(R.id.ecgHRsource_rgp);
this.ecgHRsource1 = (RadioButton) findViewById(R.id.ecgsourcehr);
this.ecgHRsource2 = (RadioButton) findViewById(R.id.ecgsourcespo2);
int i6 = this.gzj.getInt("ecgHRsource", 1);
this.ecgHRsource = i6;
this.tempecgHRsource = i6;
if (i6 == 0) {
this.ecgHRsource1.setChecked(true);
} else if (i6 == 1) {
this.ecgHRsource2.setChecked(true);
}
this.ecgHRsource_rgp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i7) {
switch (i7) {
case R.id.ecgsourcehr:
ECGParaSettingActivity.this.tempecgHRsource = 0;
break;
case R.id.ecgsourcespo2:
ECGParaSettingActivity.this.tempecgHRsource = 1;
break;
}
}
});
this.QiBo_lock = (Switch) findViewById(R.id.HRQiboswitch);
boolean z = this.gzj.getBoolean("HRQiboswitch", false);
this.m_bECGQiboSwitch = z;
this.tempm_bECGQiboSwitch = z;
this.QiBo_lock.setChecked(z);
this.QiBo_lock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z2) {
ECGParaSettingActivity.this.tempm_bECGQiboSwitch = z2;
}
});
this.HR50HZswitch = (Switch) findViewById(R.id.HR50HZswitch);
boolean z2 = this.gzj.getBoolean("HR50HZswitch", false);
this.m_bHR50HZswitch = z2;
this.tempm_bHR50HZswitch = z2;
this.HR50HZswitch.setChecked(z2);
this.HR50HZswitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z3) {
ECGParaSettingActivity.this.tempm_bHR50HZswitch = z3;
}
});
this.HRSC_lock = (Switch) findViewById(R.id.HRxlscswitch);
boolean z3 = this.gzj.getBoolean("HRxlscswitch", false);
this.m_bHRxlscswitch = z3;
this.tempm_bHRxlscswitch = z3;
this.HRSC_lock.setChecked(z3);
this.HRSC_lock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z4) {
ECGParaSettingActivity.this.tempm_bHRxlscswitch = z4;
}
});
this.ECGJZswitch = (Switch) findViewById(R.id.ECGJZswitch);
boolean z4 = this.gzj.getBoolean("ECGJZswitch", false);
this.m_bECGJZswitch = z4;
this.tempm_bECGJZswitch = z4;
this.ECGJZswitch.setChecked(z4);
this.ECGJZswitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z5) {
ECGParaSettingActivity.this.tempm_bECGJZswitch = z5;
}
});
this.hr_lock = (Switch) findViewById(R.id.hr_lock);
EditText editText = (EditText) findViewById(R.id.hr_high);
this.hr_high = editText;
editText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
ECGParaSettingActivity eCGParaSettingActivity = ECGParaSettingActivity.this;
eCGParaSettingActivity.initTopKeyboard(eCGParaSettingActivity.hr_high);
ECGParaSettingActivity.this.setlayoutParams(70, 270, 0, 0);
return false;
}
});
EditText editText2 = (EditText) findViewById(R.id.hr_low);
this.hr_low = editText2;
editText2.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
ECGParaSettingActivity eCGParaSettingActivity = ECGParaSettingActivity.this;
eCGParaSettingActivity.initTopKeyboard(eCGParaSettingActivity.hr_low);
ECGParaSettingActivity.this.setlayoutParams(310, 270, 0, 0);
return false;
}
});
shield();
boolean z5 = this.gzj.getBoolean("hr_lock", true);
this.ishr_lock = z5;
this.tempishr_lock = z5;
this.hr_lock.setChecked(z5);
this.highhr = this.gzj.getInt(GzjSharePref.KEY_HR_ALARM_HIGH, 120);
this.hr_high.setText("" + this.highhr);
this.lowhr = this.gzj.getInt(GzjSharePref.KEY_HR_ALARM_LOW, 50);
this.hr_low.setText("" + this.lowhr);
this.hr_lock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z6) {
if (ECGParaSettingActivity.this.myApp.m_ALMPermission) {
ECGParaSettingActivity.this.tempishr_lock = z6;
} else {
ECGParaSettingActivity.this.showMessage(R.string.AlarmTip);
ECGParaSettingActivity.this.hr_lock.setChecked(ECGParaSettingActivity.this.tempishr_lock);
}
}
});
EditText editText3 = (EditText) findViewById(R.id.keyvirtul);
this.myVirturlEdit = editText3;
editText3.setInputType(0);
this.myVirturlEdit.setVisibility(4);
TextView textView20 = (TextView) findViewById(R.id.ECG_goback);
this.ECG_goback = textView20;
textView20.setOnClickListener(this);
TextView textView21 = (TextView) findViewById(R.id.ecg_default);
this.ecg_default = textView21;
textView21.setOnClickListener(this);
TextView textView22 = (TextView) findViewById(R.id.ecg_cancle);
this.ecg_cancle = textView22;
textView22.setOnClickListener(this);
((TextView) findViewById(R.id.ARRSelfStudy)).setOnClickListener(this);
}
public boolean SaveECGPara() {
boolean z;
boolean z2;
boolean z3;
boolean z4;
String str = (this.hr_high.getText() == null || this.hr_high.getText().toString().equals("")) ? "" + getString(R.string.ecg5) + " " : "";
if (this.hr_low.getText() == null || this.hr_low.getText().toString().equals("")) {
str = str + getString(R.string.ecg6) + " ";
}
if (!str.equals("")) {
ShowAlertDialog(str, 0);
return false;
}
int i = this.gzj.getInt("PatientType", 0);
int parseInt = Integer.parseInt(this.hr_high.getText().toString());
int parseInt2 = Integer.parseInt(this.hr_low.getText().toString());
String str2 = (i != 0 || (parseInt <= 300 && parseInt >= 15 && parseInt2 <= 300 && parseInt2 >= 15)) ? "" : " 15--300bpm";
if (i == 1 && (parseInt > 350 || parseInt < 15 || parseInt2 > 350 || parseInt2 < 15)) {
str2 = " 15--350bpm";
}
if (!str2.equals("")) {
ShowAlertDialog(str2, 1);
return false;
}
if (str2.equals("") && parseInt < parseInt2) {
ShowAlertDialog(getString(R.string.RangeOfdataError), 1);
return false;
}
AppGlobal appGlobal = (AppGlobal) getApplication();
appGlobal.paraList.clear();
appGlobal.OtherparaList.clear();
SharedPreferences.Editor edit = this.gzj.edit();
edit.putInt("ecgchanno1", this.ecgchanno1);
edit.putInt("ecgchanno2", this.ecgchanno2);
edit.putInt("ecgalarmlevel", this.ecgalarmlevel);
if (this.highhr == parseInt && this.lowhr == parseInt2) {
z = false;
} else {
appGlobal.OtherparaList.add((byte) 14);
appGlobal.OtherparaList.add((byte) 0);
appGlobal.OtherparaList.add(Byte.valueOf((byte) (parseInt & 255)));
appGlobal.OtherparaList.add(Byte.valueOf((byte) ((parseInt & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8)));
appGlobal.OtherparaList.add(Byte.valueOf((byte) (parseInt2 & 255)));
appGlobal.OtherparaList.add(Byte.valueOf((byte) ((parseInt2 & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8)));
z = true;
}
if (this.ecgalarmlevel != this.gzj.getInt("ecgalarmlevel", 1)) {
appGlobal.OtherparaList.add((byte) 13);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.ecgalarmlevel));
z = true;
}
int i2 = this.ecgfilter;
int i3 = this.tempecgfilter;
if (i2 != i3) {
edit.putInt("ecgfilter", i3);
appGlobal.paraList.add((byte) 4);
appGlobal.paraList.add(Byte.valueOf((byte) this.tempecgfilter));
appGlobal.OtherparaList.add((byte) 4);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.tempecgfilter));
z = true;
z2 = true;
} else {
z2 = false;
}
int i4 = this.ecggain;
int i5 = this.tempecggain;
if (i4 != i5) {
edit.putInt("ecggain", i5);
appGlobal.paraList.add((byte) 5);
appGlobal.paraList.add(Byte.valueOf((byte) this.tempecggain));
appGlobal.paraList.add((byte) 5);
appGlobal.paraList.add(Byte.valueOf((byte) (this.tempecggain | 16)));
appGlobal.paraList.add((byte) 5);
appGlobal.paraList.add(Byte.valueOf((byte) (this.tempecggain | 32)));
appGlobal.OtherparaList.add((byte) 5);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.tempecggain));
appGlobal.OtherparaList.add((byte) 5);
appGlobal.OtherparaList.add(Byte.valueOf((byte) (this.tempecggain | 16)));
appGlobal.OtherparaList.add((byte) 5);
appGlobal.OtherparaList.add(Byte.valueOf((byte) (this.tempecggain | 32)));
z = true;
z2 = true;
}
int i6 = this.ecgspeed;
int i7 = this.tempecgspeed;
if (i6 != i7) {
edit.putInt("ecgspeed", i7);
appGlobal.OtherparaList.add((byte) 20);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.tempecgspeed));
z = true;
}
int i8 = this.ecgleadtype;
int i9 = this.tempecgleadtype;
if (i8 != i9) {
edit.putInt("ecgleadtype", i9);
appGlobal.paraList.add((byte) 3);
appGlobal.paraList.add(Byte.valueOf((byte) this.tempecgleadtype));
appGlobal.OtherparaList.add((byte) 3);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.tempecgleadtype));
z = true;
z2 = true;
}
int i10 = this.ecgcalHR;
int i11 = this.tempecgcalHR;
if (i10 != i11) {
edit.putInt("ecgcalHR", i11);
appGlobal.paraList.add((byte) 7);
appGlobal.paraList.add(Byte.valueOf((byte) this.tempecgcalHR));
appGlobal.OtherparaList.add((byte) 7);
appGlobal.OtherparaList.add(Byte.valueOf((byte) this.tempecgcalHR));
z = true;
z2 = true;
}
int i12 = this.ecgHRsource;
int i13 = this.tempecgHRsource;
if (i12 != i13) {
edit.putInt("ecgHRsource", i13);
}
boolean z5 = this.m_bECGQiboSwitch;
boolean z6 = this.tempm_bECGQiboSwitch;
if (z5 != z6) {
edit.putBoolean("HRQiboswitch", z6);
if (this.tempm_bECGQiboSwitch) {
appGlobal.m_FunTypelow = (byte) (appGlobal.m_FunTypelow | 16);
z4 = false;
z3 = true;
} else {
appGlobal.m_stopFunTypelow = (byte) (appGlobal.m_stopFunTypelow | 16);
appGlobal.m_FunTypelow = (byte) (appGlobal.m_FunTypelow & 239);
z3 = false;
z4 = true;
}
} else {
z3 = false;
z4 = false;
}
boolean z7 = this.tempm_bHRxlscswitch;
if (z7 != this.m_bHRxlscswitch) {
edit.putBoolean("HRxlscswitch", z7);
appGlobal.OtherparaList.add((byte) 15);
if (this.tempm_bHRxlscswitch) {
appGlobal.OtherparaList.add((byte) 97);
} else {
appGlobal.OtherparaList.add((byte) 96);
}
z = true;
}
boolean z8 = this.m_bHR50HZswitch;
boolean z9 = this.tempm_bHR50HZswitch;
if (z8 != z9) {
edit.putBoolean("HR50HZswitch", z9);
if (this.tempm_bHR50HZswitch) {
appGlobal.m_FunTypehigh = (byte) (appGlobal.m_FunTypehigh | 1);
z3 = true;
} else {
appGlobal.m_stopFunTypehigh = (byte) (appGlobal.m_stopFunTypehigh | 1);
appGlobal.m_FunTypehigh = (byte) (appGlobal.m_FunTypehigh & 254);
z4 = true;
}
}
boolean z10 = this.m_bECGJZswitch;
boolean z11 = this.tempm_bECGJZswitch;
if (z10 != z11) {
edit.putBoolean("ECGJZswitch", z11);
if (this.tempm_bECGJZswitch) {
appGlobal.m_FunTypelow = (byte) (appGlobal.m_FunTypelow | 128);
z3 = true;
} else {
appGlobal.m_stopFunTypelow = (byte) (appGlobal.m_stopFunTypelow | 128);
appGlobal.m_FunTypelow = (byte) (appGlobal.m_FunTypelow & Byte.MAX_VALUE);
z4 = true;
}
}
boolean z12 = this.ishr_lock;
boolean z13 = this.tempishr_lock;
if (z12 != z13) {
edit.putBoolean("hr_lock", z13);
appGlobal.OtherparaList.add((byte) 15);
if (this.tempishr_lock) {
appGlobal.OtherparaList.add((byte) 1);
} else {
appGlobal.OtherparaList.add((byte) 0);
}
z = true;
}
int i14 = this.m_tempcurrentVolume;
if (i14 != this.currentVolume) {
edit.putInt("HRCurrentVolume", i14);
int i15 = this.m_tempcurrentVolume;
this.currentVolume = i15;
if (i15 == 0) {
appGlobal.OtherparaList.add((byte) 16);
appGlobal.OtherparaList.add((byte) 0);
} else {
appGlobal.OtherparaList.add((byte) 16);
appGlobal.OtherparaList.add((byte) 1);
}
z = true;
}
edit.putInt(GzjSharePref.KEY_HR_ALARM_HIGH, Integer.parseInt(this.hr_high.getText().toString()));
edit.putInt(GzjSharePref.KEY_HR_ALARM_LOW, Integer.parseInt(this.hr_low.getText().toString()));
edit.putInt("PRAlarmHigh", Integer.parseInt(this.hr_high.getText().toString()));
edit.putInt("PRAlarmLow", Integer.parseInt(this.hr_low.getText().toString()));
edit.commit();
Bundle bundle = new Bundle();
bundle.putBoolean("bcgparaset", z2);
bundle.putBoolean("becgcommandstart", z3);
bundle.putBoolean("becgcommandstop", z4);
bundle.putBoolean("netparaset", z);
Intent intent = new Intent();
intent.putExtras(bundle);
setResult(10, intent);
return true;
}
public void GotoSleep(int i) {
try {
Thread.sleep(i);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public void ShowAlertDialog(String str, int i) {
String str2;
View inflate = getLayoutInflater().inflate(R.layout.mytoast, (ViewGroup) null);
Toast toast = new Toast(getApplicationContext());
toast.setView(inflate);
toast.setGravity(17, 0, 0);
TextView textView = (TextView) inflate.findViewById(R.id.toastInfo);
if (i == 0) {
str2 = getString(R.string.dialog_04) + " " + str + "!";
} else {
str2 = i == 1 ? getString(R.string.AlarmDataRangeError) + " " + str + "!" : "";
}
textView.setText(str2);
toast.show();
}
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 ResetECGParaExcu() {
this.ecgchanno1 = 1;
SetChannelText(this.m_ECG1chan, 1);
this.ecgchanno2 = 0;
SetChannelText(this.m_ECG2chan, 0);
this.ecgalarmlevel = 1;
SetAlarmLevelText(1);
this.tempecggain = 2;
this.ecggain3.setChecked(true);
this.tempecgspeed = 1;
this.ecgspeed2.setChecked(true);
this.tempecgfilter = 0;
this.ecgfilter_Dia.setChecked(true);
this.tempecgleadtype = 1;
this.ecgleadtype2.setChecked(true);
this.tempecgcalHR = 0;
this.ecgcalHR1.setChecked(true);
this.tempecgHRsource = 0;
this.ecgHRsource1.setChecked(true);
this.tempm_bECGQiboSwitch = false;
this.QiBo_lock.setChecked(false);
this.tempm_bHR50HZswitch = false;
this.HR50HZswitch.setChecked(false);
this.tempm_bECGJZswitch = false;
this.ECGJZswitch.setChecked(false);
this.tempishr_lock = true;
this.hr_lock.setChecked(true);
this.temphighhr = 120;
this.hr_high.setText("" + this.temphighhr);
this.templowhr = 50;
this.hr_low.setText("" + this.templowhr);
SaveECGPara();
finish();
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
if (i == 1 && intent != null && intent.getExtras().getBoolean("popupresult")) {
ResetECGParaExcu();
}
}
@Override
public void finish() {
super.finish();
this.audiomanage.setStreamVolume(2, this.currentVolume, 4);
overridePendingTransition(0, R.anim.zoomout);
}
@Override
public void onClick(View view) {
int id = view.getId();
switch (id) {
case R.id.ARRSelfStudy:
Message message = new Message();
message.what = 19;
m_handler.sendMessage(message);
break;
case R.id.ECG_goback:
if (SaveECGPara()) {
finish();
break;
}
break;
case R.id.SpinnerECG1:
if (this.ChanItem1.getVisibility() == 0) {
this.ChanItem1.setVisibility(4);
break;
} else {
this.ChanItem1.setVisibility(0);
this.ChanItem2.setVisibility(4);
break;
}
case R.id.ecg_cancle:
finish();
break;
case R.id.ecg_default:
Bundle bundle = new Bundle();
bundle.putInt("popuptextview", R.string.dialog_ECGParaSetting);
Intent intent = new Intent();
intent.putExtras(bundle);
intent.setClass(this, PopUpParaDefaultActivity.class);
startActivityForResult(intent, 1);
break;
default:
switch (id) {
case R.id.SpinnerECG1ItemAVF:
setDaolian1(5);
break;
case R.id.SpinnerECG1ItemAVL:
setDaolian1(3);
break;
case R.id.SpinnerECG1ItemAVR:
setDaolian1(4);
break;
case R.id.SpinnerECG1ItemI:
setDaolian1(0);
break;
case R.id.SpinnerECG1ItemII:
setDaolian1(1);
break;
case R.id.SpinnerECG1ItemIII:
setDaolian1(2);
break;
case R.id.SpinnerECG1ItemV:
setDaolian1(6);
break;
case R.id.SpinnerECG2:
if (this.ChanItem2.getVisibility() == 0) {
this.ChanItem2.setVisibility(4);
break;
} else {
this.ChanItem2.setVisibility(0);
this.ChanItem1.setVisibility(4);
break;
}
default:
switch (id) {
case R.id.SpinnerECG2ItemAVF:
setDaolian2(5);
break;
case R.id.SpinnerECG2ItemAVL:
setDaolian2(3);
break;
case R.id.SpinnerECG2ItemAVR:
setDaolian2(4);
break;
case R.id.SpinnerECG2ItemI:
setDaolian2(0);
break;
case R.id.SpinnerECG2ItemII:
setDaolian2(1);
break;
case R.id.SpinnerECG2ItemIII:
setDaolian2(2);
break;
case R.id.SpinnerECG2ItemV:
setDaolian2(6);
break;
default:
switch (id) {
case R.id.SpinnerECGHighAlarmItem:
this.ecgalarmlevel = 0;
SetAlarmLevelText(0);
this.ECGAlarmItem.setVisibility(4);
break;
case R.id.SpinnerECGLowAlarmItem:
this.ecgalarmlevel = 2;
SetAlarmLevelText(2);
this.ECGAlarmItem.setVisibility(4);
break;
case R.id.SpinnerECGMidAlarmItem:
this.ecgalarmlevel = 1;
SetAlarmLevelText(1);
this.ECGAlarmItem.setVisibility(4);
break;
case R.id.SpinnerECGalarm:
if (this.ECGAlarmItem.getVisibility() == 0) {
this.ECGAlarmItem.setVisibility(4);
break;
} else {
this.ECGAlarmItem.setVisibility(0);
break;
}
}
}
}
}
}
public void setDaolian1(int i) {
if (this.ecgchanno2 == i) {
return;
}
this.ecgchanno1 = i;
SetChannelText(this.m_ECG1chan, i);
this.myclick = true;
this.ChanItem1.setVisibility(4);
}
public void setDaolian2(int i) {
if (this.ecgchanno1 == i) {
return;
}
this.ecgchanno2 = i;
SetChannelText(this.m_ECG2chan, i);
this.myclick = true;
this.ChanItem2.setVisibility(4);
}
public TextView getTextView(int i, int i2) {
return this.mList.get(i)[i2];
}
@Override
public void initTopKeyboard(EditText editText) {
KeyboardUtil keyboardUtil = this.keyboardUtil;
if (keyboardUtil == null) {
this.keyboardUtil = new KeyboardUtil(this, this, editText, false, false);
} else {
keyboardUtil.hideKeyboard();
this.keyboardUtil = null;
this.keyboardUtil = new KeyboardUtil(this, this, editText, false, false);
}
KeyboardView keyboardView = (KeyboardView) findViewById(R.id.keyboard_view);
this.keyboard = keyboardView;
keyboardView.setVisibility(0);
ImageView imageView = (ImageView) findViewById(R.id.ima_top);
this.ima_top = 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.hr_high, false);
method.invoke(this.hr_low, false);
} catch (Exception e) {
e.printStackTrace();
}
}
}