正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 WalkTestSettingsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 WalkTestSettingsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cn.neoprint.padmonitor.ui;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.RadioGroup;
import android.widget.TextView;
import cn.neoprint.padmonitor.R;
import cn.neoprint.padmonitor.app.AppGlobal;
import cn.neoprint.padmonitor.ui.base.BaseDialogActivity;
import com.sayeasytech.base.base.Layout;
import java.util.ArrayList;
import java.util.List;
public class WalkTestSettingsActivity extends BaseDialogActivity {
public static String hr_channel_key = "hr_channel_key";
private int ecgCalHr;
private RadioGroup ecgCalHrRg;
private int ecgChannel1;
private int ecgChannel2;
private RadioGroup ecgChannelRg1;
private RadioGroup ecgChannelRg2;
private int ecgGain;
private RadioGroup ecgGainRg;
private int ecgHrSource;
private RadioGroup ecgHrSourceRg;
public SharedPreferences gzj;
private int tempEcgCalHr;
private int tempEcgCalHrNew;
private int tempEcgGain;
private int tempEcgHrSource;
AppGlobal myApp = null;
private List<Integer> ecgChannelRbIdList1 = new ArrayList();
private List<Integer> ecgChannelRbIdList2 = new ArrayList();
private List<Integer> ecgGainRbIdList = new ArrayList();
private List<Integer> ecgCalHrRbIdList = new ArrayList();
private List<Integer> ecgHrSourceRbIdList = new ArrayList();
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.myApp = AppGlobal.getInstance();
this.gzj = getSharedPreferences("gzj", 0);
initView();
}
protected Layout getLayout() {
return Layout.createLayoutByID(R.layout.activity_walk_test_settings);
}
@Override
protected void beforeSetContentView(Bundle bundle) {
super.beforeSetContentView(bundle);
this.displayWidthRate = 0.85f;
this.displayHeightRate = 0.7f;
}
private void initView() {
((TextView) findViewById(R.id.confirm_pwd_btn)).setOnClickListener(this);
((TextView) findViewById(R.id.back_btn)).setOnClickListener(this);
this.ecgChannelRg1 = (RadioGroup) findViewById(R.id.ecg_channel1_rg);
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_I));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_II));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_III));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_aVL));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_aVR));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_aVF));
this.ecgChannelRbIdList1.add(Integer.valueOf(R.id.ecg_channel1_rb_V));
int i = this.gzj.getInt("ecgchanno1", 1);
this.ecgChannel1 = i;
this.ecgChannelRg1.check(this.ecgChannelRbIdList1.get(i).intValue());
this.ecgChannelRg1.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i2) {
int i3;
switch (i2) {
case R.id.ecg_channel1_rb_I:
i3 = 0;
break;
case R.id.ecg_channel1_rb_II:
i3 = 1;
break;
case R.id.ecg_channel1_rb_III:
i3 = 2;
break;
case R.id.ecg_channel1_rb_V:
i3 = 6;
break;
case R.id.ecg_channel1_rb_aVF:
i3 = 5;
break;
case R.id.ecg_channel1_rb_aVL:
i3 = 3;
break;
case R.id.ecg_channel1_rb_aVR:
i3 = 4;
break;
default:
i3 = -1;
break;
}
if (WalkTestSettingsActivity.this.ecgChannel2 == i3) {
WalkTestSettingsActivity.this.ecgChannelRg1.check(((Integer) WalkTestSettingsActivity.this.ecgChannelRbIdList1.get(WalkTestSettingsActivity.this.ecgChannel1)).intValue());
} else {
WalkTestSettingsActivity.this.ecgChannel1 = i3;
}
}
});
this.ecgChannelRg2 = (RadioGroup) findViewById(R.id.ecg_channel2_rg);
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_I));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_II));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_III));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_aVL));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_aVR));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_aVF));
this.ecgChannelRbIdList2.add(Integer.valueOf(R.id.ecg_channel2_rb_V));
int i2 = this.gzj.getInt("ecgchanno2", 0);
this.ecgChannel2 = i2;
this.ecgChannelRg2.check(this.ecgChannelRbIdList2.get(i2).intValue());
this.ecgChannelRg2.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i3) {
int i4;
switch (i3) {
case R.id.ecg_channel2_rb_I:
i4 = 0;
break;
case R.id.ecg_channel2_rb_II:
i4 = 1;
break;
case R.id.ecg_channel2_rb_III:
i4 = 2;
break;
case R.id.ecg_channel2_rb_V:
i4 = 6;
break;
case R.id.ecg_channel2_rb_aVF:
i4 = 5;
break;
case R.id.ecg_channel2_rb_aVL:
i4 = 3;
break;
case R.id.ecg_channel2_rb_aVR:
i4 = 4;
break;
default:
i4 = -1;
break;
}
if (WalkTestSettingsActivity.this.ecgChannel1 == i4) {
WalkTestSettingsActivity.this.ecgChannelRg2.check(((Integer) WalkTestSettingsActivity.this.ecgChannelRbIdList2.get(WalkTestSettingsActivity.this.ecgChannel2)).intValue());
} else {
WalkTestSettingsActivity.this.ecgChannel2 = i4;
}
}
});
this.ecgGainRg = (RadioGroup) findViewById(R.id.ecg_gain_rg);
this.ecgGainRbIdList.add(Integer.valueOf(R.id.ecg_gain_1));
this.ecgGainRbIdList.add(Integer.valueOf(R.id.ecg_gain_2));
this.ecgGainRbIdList.add(Integer.valueOf(R.id.ecg_gain_3));
this.ecgGainRbIdList.add(Integer.valueOf(R.id.ecg_gain_4));
this.ecgGainRbIdList.add(Integer.valueOf(R.id.ecg_gain_5));
int i3 = this.gzj.getInt("ecggain", 2);
this.ecgGain = i3;
this.tempEcgGain = i3;
this.ecgGainRg.check(this.ecgGainRbIdList.get(i3).intValue());
this.ecgGainRg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i4) {
switch (i4) {
case R.id.ecg_gain_1:
WalkTestSettingsActivity.this.tempEcgGain = 0;
break;
case R.id.ecg_gain_2:
WalkTestSettingsActivity.this.tempEcgGain = 1;
break;
case R.id.ecg_gain_3:
WalkTestSettingsActivity.this.tempEcgGain = 2;
break;
case R.id.ecg_gain_4:
WalkTestSettingsActivity.this.tempEcgGain = 3;
break;
case R.id.ecg_gain_5:
WalkTestSettingsActivity.this.tempEcgGain = 4;
break;
}
}
});
this.ecgCalHrRg = (RadioGroup) findViewById(R.id.ecgcalHR_rgp);
this.ecgCalHrRbIdList.add(Integer.valueOf(R.id.ecgchan1));
this.ecgCalHrRbIdList.add(Integer.valueOf(R.id.ecgchan2));
this.ecgCalHrRbIdList.add(Integer.valueOf(R.id.ecgchan3));
int i4 = this.gzj.getInt("ecgcalHR", 0);
this.ecgCalHr = i4;
this.tempEcgCalHr = i4;
int i5 = this.gzj.getInt(hr_channel_key, 0);
this.tempEcgCalHrNew = i5;
this.ecgCalHrRg.check(this.ecgCalHrRbIdList.get(i5 != 2 ? this.ecgCalHr : 2).intValue());
this.ecgCalHrRg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i6) {
WalkTestSettingsActivity.this.tempEcgCalHrNew = 0;
switch (i6) {
case R.id.ecgchan1:
WalkTestSettingsActivity.this.tempEcgCalHr = 0;
break;
case R.id.ecgchan2:
WalkTestSettingsActivity.this.tempEcgCalHr = 1;
break;
case R.id.ecgchan3:
WalkTestSettingsActivity.this.tempEcgCalHrNew = 2;
break;
}
}
});
this.ecgHrSourceRg = (RadioGroup) findViewById(R.id.ecgHRsource_rgp);
this.ecgHrSourceRbIdList.add(Integer.valueOf(R.id.ecgsourcehr));
this.ecgHrSourceRbIdList.add(Integer.valueOf(R.id.ecgsourcespo2));
int i6 = this.gzj.getInt("ecgHRsource", 1);
this.ecgHrSource = i6;
this.tempEcgHrSource = i6;
this.ecgHrSourceRg.check(this.ecgHrSourceRbIdList.get(i6).intValue());
this.ecgHrSourceRg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i7) {
switch (i7) {
case R.id.ecgsourcehr:
WalkTestSettingsActivity.this.tempEcgHrSource = 0;
break;
case R.id.ecgsourcespo2:
WalkTestSettingsActivity.this.tempEcgHrSource = 1;
break;
}
}
});
}
public void onClick(View view) {
int id = view.getId();
if (id == 2131362170) {
finish();
} else {
if (id != 2131362347) {
return;
}
confirm();
}
}
private void confirm() {
boolean z;
SharedPreferences.Editor edit = this.gzj.edit();
edit.putInt("ecgchanno1", this.ecgChannel1);
edit.putInt("ecgchanno2", this.ecgChannel2);
int i = this.ecgGain;
int i2 = this.tempEcgGain;
boolean z2 = false;
boolean z3 = true;
if (i != i2) {
edit.putInt("ecggain", i2);
this.myApp.paraList.add((byte) 5);
this.myApp.paraList.add(Byte.valueOf((byte) this.tempEcgGain));
this.myApp.paraList.add((byte) 5);
this.myApp.paraList.add(Byte.valueOf((byte) (this.tempEcgGain | 16)));
this.myApp.paraList.add((byte) 5);
this.myApp.paraList.add(Byte.valueOf((byte) (this.tempEcgGain | 32)));
this.myApp.OtherparaList.add((byte) 5);
this.myApp.OtherparaList.add(Byte.valueOf((byte) this.tempEcgGain));
this.myApp.OtherparaList.add((byte) 5);
this.myApp.OtherparaList.add(Byte.valueOf((byte) (this.tempEcgGain | 16)));
this.myApp.OtherparaList.add((byte) 5);
this.myApp.OtherparaList.add(Byte.valueOf((byte) (this.tempEcgGain | 32)));
z = true;
z2 = true;
} else {
z = false;
}
int i3 = this.ecgCalHr;
int i4 = this.tempEcgCalHr;
if (i3 != i4) {
edit.putInt("ecgcalHR", i4);
this.myApp.paraList.add((byte) 7);
this.myApp.paraList.add(Byte.valueOf((byte) this.tempEcgCalHr));
this.myApp.OtherparaList.add((byte) 7);
this.myApp.OtherparaList.add(Byte.valueOf((byte) this.tempEcgCalHr));
z = true;
} else {
z3 = z2;
}
edit.putInt(hr_channel_key, this.tempEcgCalHrNew);
int i5 = this.ecgHrSource;
int i6 = this.tempEcgHrSource;
if (i5 != i6) {
edit.putInt("ecgHRsource", i6);
}
edit.commit();
Bundle bundle = new Bundle();
bundle.putBoolean("bcgparaset", z3);
bundle.putBoolean("netparaset", z);
Intent intent = new Intent();
intent.putExtras(bundle);
setResult(10, intent);
finish();
}
@Override
public void finish() {
super.finish();
overridePendingTransition(0, R.anim.zoomout);
}
}