diff --git a/Bandizip/.gitignore b/Bandizip/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/Bandizip/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/Bandizip/.idea/.gitignore b/Bandizip/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Bandizip/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Bandizip/.idea/.name b/Bandizip/.idea/.name new file mode 100644 index 0000000..b3405b3 --- /dev/null +++ b/Bandizip/.idea/.name @@ -0,0 +1 @@ +My Application \ No newline at end of file diff --git a/Bandizip/.idea/compiler.xml b/Bandizip/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/Bandizip/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Bandizip/.idea/dbnavigator.xml b/Bandizip/.idea/dbnavigator.xml new file mode 100644 index 0000000..70f212e --- /dev/null +++ b/Bandizip/.idea/dbnavigator.xml @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Bandizip/.idea/encodings.xml b/Bandizip/.idea/encodings.xml new file mode 100644 index 0000000..9297c1b --- /dev/null +++ b/Bandizip/.idea/encodings.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Bandizip/.idea/gradle.xml b/Bandizip/.idea/gradle.xml new file mode 100644 index 0000000..c924be2 --- /dev/null +++ b/Bandizip/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/Bandizip/.idea/misc.xml b/Bandizip/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/Bandizip/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/Bandizip/ASMS b/Bandizip/ASMS new file mode 160000 index 0000000..a4f9718 --- /dev/null +++ b/Bandizip/ASMS @@ -0,0 +1 @@ +Subproject commit a4f9718ae100ef15e3681a900ae160160c8d2d8f diff --git a/Bandizip/app/.gitignore b/Bandizip/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/Bandizip/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Bandizip/app/build.gradle b/Bandizip/app/build.gradle new file mode 100644 index 0000000..044c502 --- /dev/null +++ b/Bandizip/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'cn.edu.myapplication' + compileSdk 32 + + defaultConfig { + applicationId "cn.edu.myapplication" + minSdk 21 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + buildFeatures { + viewBinding true + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'androidx.navigation:navigation-fragment:2.4.1' + implementation 'androidx.navigation:navigation-ui:2.4.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} \ No newline at end of file diff --git a/Bandizip/app/proguard-rules.pro b/Bandizip/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/Bandizip/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/Bandizip/app/src/androidTest/java/cn/edu/myapplication/ExampleInstrumentedTest.java b/Bandizip/app/src/androidTest/java/cn/edu/myapplication/ExampleInstrumentedTest.java new file mode 100644 index 0000000..1635a73 --- /dev/null +++ b/Bandizip/app/src/androidTest/java/cn/edu/myapplication/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package cn.edu.myapplication; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("cn.edu.myapplication", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/Bandizip/app/src/main/AndroidManifest.xml b/Bandizip/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..68b99cc --- /dev/null +++ b/Bandizip/app/src/main/AndroidManifest.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentInfoActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentInfoActivity.java new file mode 100644 index 0000000..eed7dac --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentInfoActivity.java @@ -0,0 +1,132 @@ +package cn.edu.myapplication; + + + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RadioButton; +import android.widget.Spinner; +import android.widget.Toast; + +import cn.edu.myapplication.bean.StudentInfo; +import cn.edu.myapplication.dao.AddStudentInfoDao; + +public class AddStudentInfoActivity extends Activity { + //成员变量 + EditText editnum,editname,editage,editmark; + RadioButton radiomen,radiowomen; + ArrayAdapter proadapter; + String[] proname={"计算机应用","计算机网络","移动互联开发","WEB前端开发"}; + Spinner pro; + Button butok,butre; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_add_student_info); + //调用init()方法 + this.init(); + //提交按钮事件添加监听 + this.butok.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View V) { + //提交按钮的时间处理代码 + addaction(); + } + }); + //为清空按钮事件添加监听 + this.butre.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + qingkongaction(); + } + }); + } + //初始化声明的控件对象 + public void init(){ + this.editnum=(EditText) findViewById(R.id.addnumedit); + this.editname=(EditText) findViewById(R.id.addnameedit); + this.radiomen=(RadioButton) findViewById(R.id.addradioman); + this.radiowomen=(RadioButton) findViewById(R.id.addradiowoman); + this.editage=(EditText) findViewById(R.id.addageedit); + this.pro=(Spinner) findViewById(R.id.spinner1); + //构建适配器--数据源--显示格式 + this.proadapter=new ArrayAdapter(this,android.R.layout.simple_expandable_list_item_1,this.proname); + //设置spinpro 数据源 + this.pro.setAdapter(proadapter); + this.editmark=(EditText) findViewById(R.id.addmarkedit); + this.butok=(Button) findViewById(R.id.addbutton); + this.butre=(Button) findViewById(R.id.resbutton); + + } + //添加按钮事件处理方法 + public void addaction(){ + //1.获取用户输入的信息 + String num=this.editnum.getText().toString(); +// //nn为空判读 +// double nn=Integer.parseInt(num); + String name=this.editname.getText().toString(); + String sex="男"; + if(this.radiowomen.isChecked()){ + // + sex="女"; + } + String age=this.editage.getText().toString(); + String pro=this.pro.getSelectedItem().toString(); + String mark=this.editmark.getText().toString(); + //2.调用相关 存储添加学生信息 + StudentInfo tem=new StudentInfo(); + tem.setNum(num); + tem.setName(name); + tem.setSex(sex); + tem.setAge(age); + tem.setPro(pro); + tem.setMark(mark); + AddStudentInfoDao adao=new AddStudentInfoDao(this); + long n=adao.addStudentInfo(tem); + //3.根据结果显示 + String mes="学生信息添加失败"; + if(n>0){ + mes="学生信息添加成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + //清空按钮事件处理方法 + public void qingkongaction(){ + this.editnum.setText(""); + this.editname.setText(""); + //设置性别默认为男进行选中显示 + this.radiomen.setChecked(true); + this.editage.setText(""); + //设置下拉选择框的专业为选择框的第一个 + this.pro.setSelection(0); + this.editmark.setText(""); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.add_info, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentScoreActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentScoreActivity.java new file mode 100644 index 0000000..a034b1a --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/AddStudentScoreActivity.java @@ -0,0 +1,149 @@ +package cn.edu.myapplication; + +import java.util.ArrayList; + + + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import cn.edu.myapplication.bean.StudentInfo; +import cn.edu.myapplication.bean.StudentScore; +import cn.edu.myapplication.dao.AddStudentInfoDao; +import cn.edu.myapplication.dao.AddStudentScoreDao; + +public class AddStudentScoreActivity extends Activity { + TextView num,name; + EditText numtext,androidtext,javatext,htmltext; + Button showbut,addscorebut,resscorebut; + ArrayList adata; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_add_student_score); +// 调用init()方法 + this.init(); + + //为按学号查询按钮添加事件监听 + this.showbut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + String num=numtext.getText().toString(); + getStudentnumData(num); + } + }); + //添加按钮事件添加监听 + this.addscorebut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View V) { + //添加按钮的事件处理代码 + addscoreaction(); + } + }); + //清空按钮事件处理方法 + this.resscorebut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + qingkongscoreaction(); + } + }); + } + //初始化声明的控件对象 + public void init(){ + this.numtext=(EditText) findViewById(R.id.numeditscore); + this.num=(TextView) findViewById(R.id.addscorenumtext); + this.name=(TextView) findViewById(R.id.addscorenametext); + this.androidtext=(EditText) findViewById(R.id.addscoreandroidtext); + this.javatext=(EditText) findViewById(R.id.addscorejavatext); + this.htmltext=(EditText) findViewById(R.id.addscorehtmltext); + this.showbut=(Button) findViewById(R.id.showbuttonscore); + this.addscorebut=(Button) findViewById(R.id.addscorebutton); + this.resscorebut=(Button) findViewById(R.id.resscorebutton); + } + /** + * 通过输入的学生学号进行查询 ,从学生信息表中获取数据并显示 + * + */ + public void getStudentnumData(String num){ + //1.调用 相关方法 查询数据 + AddStudentInfoDao adao=new AddStudentInfoDao(this); + this.adata=adao.getStudentnumData(num); + //2.构建列表搜需要的数据源 + //ArrayList sdata=new ArrayList(); + for(int i=0;i0){ + mes="学生成绩添加成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + //清空按钮事件处理方法 + public void qingkongscoreaction(){ + this.numtext.setText(""); + this.num.setText(""); + this.name.setText(""); + this.androidtext.setText(""); + this.javatext.setText(""); + this.htmltext.setText(""); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.add_student_score, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/LoginActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/LoginActivity.java new file mode 100644 index 0000000..10718a9 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/LoginActivity.java @@ -0,0 +1,154 @@ +package cn.edu.myapplication; + + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.EditText; +import android.widget.Toast; + +import cn.edu.myapplication.bean.UserInfo; +import cn.edu.myapplication.dao.ComData; +import cn.edu.myapplication.dao.UserDao; + + +public class LoginActivity extends Activity { + //成员变量 + EditText editname,editpass; + Button butlogin,butreg; + CheckBox checksave; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_login); + //调用方法初始化 + this.init(); + + //调用方法 读取保存的用户信息 + this.readLoginInfo(); + + //为“新用户注册” 添加按钮监听事件 + this.butreg.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + //切换到用户注册界面的切换方法 + Intent abc=new Intent(LoginActivity.this,RegisterActivity.class); + startActivity(abc); + + } + }); + //点击登录按钮 为登录按钮事件添加监听 + this.butlogin.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + //调用相关登录方法 + loginAction(); + } + }); + } + /** + * 初始化界面 + */ + public void init(){ + this.editname=(EditText) findViewById(R.id.loginditname); + this.editpass=(EditText) findViewById(R.id.logeditpass); + this.butlogin=(Button) findViewById(R.id.Logbutloging); + this.butreg=(Button) findViewById(R.id.logbutredister); + this.checksave=(CheckBox) findViewById(R.id.checkBox1); + } + + /** + * 登录按钮功能 + */ + public void loginAction(){ + //1.获取用户输入的用户名与密码 + String name=this.editname.getText().toString(); + String pass=this.editpass.getText().toString(); + //2.判断输入是否为空 + if(name.length()==0||pass.length()==0){ + Toast.makeText(this, "数据输入不完整,请修改", Toast.LENGTH_LONG).show(); + return; + } + //3.调用相关方法进行在用户信息表里查询数据库 + UserDao udao=new UserDao(this); + UserInfo utem=udao.checkUser(name, pass); + //4.处理结果 + if(utem==null){ + //如果用户信息表中用户信息为空--登录失败 + Toast.makeText(this, "用户名或密码错误,请修改!", Toast.LENGTH_LONG).show(); + }else{ + //如果用户信息表中有用户信息--登录成功--合法用户 + Toast.makeText(this, "用户登录成功!", Toast.LENGTH_LONG).show(); + SharedPreferences sharesave=getSharedPreferences("loginfo",Context.MODE_PRIVATE); + Editor editor=sharesave.edit(); + if(this.checksave.isChecked()){ + //用户选择了保存用户信息 显示用户名与密码 + editor.putString("uname", name); + editor.putString("upass", pass); + //提交 + editor.commit(); + }else{ + //用户未选择保存 清空---或者清空 以保存内容 + editor.clear(); + //只进行显示用户登录过的用户名不显示密码 + editor.putString("uname", name); + editor.commit(); + } + //合法用户--登陆成功--跳转到用户使用界面 + ComData.utem=utem; + Intent intent=new Intent(this,MainActivity.class); + startActivity(intent); + //销毁登陆注册界面--返回直接退出 + this.finish(); + } + } + /** + * 读取保存的用户名 和 密码 + */ + public void readLoginInfo(){ + SharedPreferences sharelogin=getSharedPreferences("loginfo",Context.MODE_PRIVATE); + // ”根据键名进行读取“ “未读取到显示默认的空值” Context.private + String uname=sharelogin.getString("uname", ""); + String upass=sharelogin.getString("upass", ""); + //在用户名与密码的框里进行显示读取到的内容 + this.editname.setText(uname); + this.editpass.setText(upass); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.main, menu); + return true; + } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_exit) { + return true; + } + return super.onOptionsItemSelected(item); + } +} + + + + + + + + diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/MainActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/MainActivity.java new file mode 100644 index 0000000..5fc0ec8 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/MainActivity.java @@ -0,0 +1,226 @@ +package cn.edu.myapplication; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.DialogInterface.OnClickListener; +import android.net.Uri; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.AdapterView; +import android.widget.GridView; +import android.widget.SimpleAdapter; +import android.widget.AdapterView.OnItemClickListener; + +import cn.edu.myapplication.R; + + +public class MainActivity extends Activity { + //成员变量 + GridView gvinfo; + //定义数组 相关数据:图(int)、文字(String) + String[] title=new String[]{"学生信息添加","学生信息维护","学生信息查询","学生成绩添加","学生成绩维护","学生成绩查询","系统管理","使用帮助","退出软件"}; + int[] image=new int[]{R.drawable.addinfo, R.drawable.weihuinfo,R.drawable.showinfo,R.drawable.addscore, + R.drawable.weihuscore,R.drawable.showscore,R.drawable.userpass,R.drawable.help,R.drawable.exit}; + ArrayList> data;//用来包装的数据源 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + // 创建一个对象 进行--准备数据源 + this.data=new ArrayList>(); + for(int i=0;i arg0, View arg1, int position, + long id) { + //事件处理 position 点击GridView 中的 单元 序号 + mianAction(position); + } + }); + } + /** + * 点击 管理图像 事件处理 + */ + public void mianAction(int id){ + // 界面文字 布局图片与跳转二级界面显示 管理 + switch(id){ + case 0: + //点击了“学生信息添加” + Intent intent0=new Intent(this,AddStudentInfoActivity.class); + startActivity(intent0); + break; + case 1: + //点击了“学生信息维护” + Intent intent1=new Intent(this, WeihuStudentInfoActivity.class); + startActivity(intent1); + break; + case 2: + //点击了“学生信息查询” + Intent intent2=new Intent(this,ShowStudentInfoActivity.class); + startActivity(intent2); + break; + case 3: + //点击了“学生成绩添加” + Intent intent3=new Intent(this,AddStudentScoreActivity.class); + startActivity(intent3); + break; + case 4: + //点击了“学生成绩维护” + Intent intent4=new Intent(this,WeihuStudentScoreActivity.class); + startActivity(intent4); + break; + case 5: + //点击了“学生成绩查询” + Intent intent5=new Intent(this,ShowStudentScoreActivity.class); + startActivity(intent5); + break; + case 6: + //点击了“系统管理” + Intent intent6=new Intent(this,PassRepairActivity.class); + startActivity(intent6); + break; + case 7: + //点击了“使用帮助” + AlertDialog.Builder builder0=new AlertDialog.Builder(this); + builder0.setTitle("软件使用帮助"); + builder0.setMessage("软件共有9个功能:包括学生信息的添加、学生信息维护、学生信息查询、学生成绩添加" + + "学生成绩维护、学生成绩查询、系统管理、使用帮助、软件退出。\n如果在使用过程中有问题请点击下方“联系作者”进行反馈!" + + "\n软件修改作者:小明\n软件用途:毕业设计\n完成时间:2023年9月20日"); + //为“我知道了”按钮添加事件监听 + builder0.setPositiveButton("我知道了", new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface arg0, int arg1) { + // TODO Auto-generated method stub + + } + }); + //为“联系作者”按钮添加事件监听 + builder0.setNegativeButton("联系作者", new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface arg0, int arg1) { + // TODO Auto-generated method stub + //调用相关方法进行处理 + lianxi(); + } + }); + builder0.create().show(); + break; + case 8: + //用户点击了“退出” + AlertDialog.Builder builder=new AlertDialog.Builder(this); + //builder.setTitle("提示").setMessage("是否确定退出程序"); + builder.setTitle("提示"); + builder.setMessage("是否确定退出程序"); + + //确定按钮 + builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface arg0, int arg1) { + // TODO Auto-generated method stub + finish(); + } + }); + + //取消按钮 + builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface arg0, int arg1) { + // TODO Auto-generated method stub + + } + }); + builder.create().show(); + break; + default: + break; + } + } + /** + * 软件使用帮助中“联系作者”事件处理方法 + */ + public void lianxi(){ + //方法一 +// PackageManager packageManager = getPackageManager(); +// Uri uri = Uri.parse("http://qm.qq.com/cgi-bin/qm/qr?k=XALdOZEPRx8ndbgaQoetggHd-mGfeusx"); +// Intent intent = new Intent(Intent.ACTION_VIEW, uri); +// startActivity(intent); +// intent = packageManager.getLaunchIntentForPackage("com.tencent.mobileqq"); + //方法二 + Uri uri = Uri.parse("http://qm.qq.com/cgi-bin/qm/qr?k=XALdOZEPRx8ndbgaQoetggHd-mGfeusx"); + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_exit) { + //用户选择了退出 + AlertDialog.Builder buidler=new AlertDialog.Builder(this); +// buidler.setTitle("提示").setMessage("是否确定退出程序?"); + buidler.setTitle("提示"); + buidler.setMessage("是否确定退出程序?"); + //确定按钮 + buidler.setPositiveButton("确定", new OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + finish(); + } + }); + //取消按钮 + buidler.setNegativeButton("取消", new OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + return; + } + }); + //创建对话框--进行显示对话框 + buidler.create().show(); + } + + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/PassRepairActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/PassRepairActivity.java new file mode 100644 index 0000000..b5b4dac --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/PassRepairActivity.java @@ -0,0 +1,121 @@ +package cn.edu.myapplication; + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import cn.edu.myapplication.dao.ComData; +import cn.edu.myapplication.dao.UserDao; + +public class PassRepairActivity extends Activity { + //成员变量 + EditText editpass1,editpass2,editpass3; + Button butsave,butres; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_pass_repair); + //初始化 调用方法 + this.init(); + + //保存按钮 事件监听 + this.butsave.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + //调用保存按钮事件方法 + saveAction(); + } + }); + + //重置按钮 事件监听 + this.butres.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + //调用 重置按钮事件 方法 + resAction(); + } + }); + + } + /** + * 初始化 + */ + private void init(){ + this.editpass1=(EditText) findViewById(R.id.paeditpass1); + this.editpass2=(EditText) findViewById(R.id.paeditpass2); + this.editpass3=(EditText) findViewById(R.id.paeditpass3); + this.butsave=(Button) findViewById(R.id.psbutsave); + this.butres=(Button) findViewById(R.id.psbutres); + } + /** + *保存按钮的事件处理 + */ + public void saveAction(){ + //1.获取用户的数据(原,新,重复) + String pass1=this.editpass1.getText().toString(); + String pass2=this.editpass2.getText().toString(); + String pass3=this.editpass3.getText().toString(); + //为空判断 省略 + //2.判读原密码 是否正确 pass1 登陆 用密码 ComData.utem 中 + String pass= ComData.utem.getUserpass(); + if(!pass1.equals(pass)){ + Toast.makeText(this, "原密码输入有错,请修改", Toast.LENGTH_LONG).show(); + return ; + } + //3.判读两次 密码 是否一致 + if(!pass2.equals(pass3)){ + Toast.makeText(this, "两次密码不一致,请修改", Toast.LENGTH_LONG).show(); + return ; + } + //4.调用相关方法修改数据库 + UserDao udao=new UserDao(this); + int id=ComData.utem.getId(); + long n=udao.repairPassById(id, pass2); + //修改用户保存的密码 并验证 + if(n>0){ + //用户密码修改成功 + Toast.makeText(this, "密码修改成功", Toast.LENGTH_LONG).show(); + //进行设置更新 修改密码 + ComData.utem.setUserpass(pass2); + return ; + }else{ + //用户密码修改失败 + Toast.makeText(this, "密码修改失败", Toast.LENGTH_LONG).show(); + return ; + } + } + /** + *重置按钮的事件处理 + */ + public void resAction(){ + this.editpass1.setText(""); + this.editpass2.setText(""); + this.editpass3.setText(""); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.pass_repair, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/RegisterActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/RegisterActivity.java new file mode 100644 index 0000000..db2fb23 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/RegisterActivity.java @@ -0,0 +1,103 @@ +package cn.edu.myapplication; + + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import cn.edu.myapplication.dao.UserDao; + +public class RegisterActivity extends Activity { + //成员变量 + EditText editname,editpass1,editpass2; + Button butsave; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_register); + //调用方法初始化 + this.init(); + //保存按钮添加事件监听 + this.butsave.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + //调用保存 方法 -- saveAction + saveAction(); + } + }); + } + /** + * + * 初始化 + */ + private void init(){ + this.editname=(EditText) findViewById(R.id.regeditname); + this.editpass1=(EditText) findViewById(R.id.regditpass1); + this.editpass2=(EditText) findViewById(R.id.regditpass2); + this.butsave=(Button) findViewById(R.id.regbutsave); + } + /** + * 保存按钮具体事件处理方法 + */ + public void saveAction(){ + //1.获取 + String name=this.editname.getText().toString(); + String pass1=this.editpass1.getText().toString(); + String pass2=this.editpass2.getText().toString(); + //2.判断输入是否为空 + if(name.length()==0||pass1.length()==0||pass2.length()==0){ + Toast.makeText(this,"输入数据不完整,请修改",Toast.LENGTH_LONG).show(); + //返回 + return; + } + //3.判断密码两次是否一致 + if(!pass1.equals(pass2)){ + //两次密码不一致 + Toast.makeText(this,"两次密码不一致,请修改",Toast.LENGTH_LONG).show(); + //返回 + return; + } + //4.调用相关方法 修改 数据库内容 + UserDao udao=new UserDao(this); + long n=udao.addUser(name, pass1); + if(n>0){ + //添加 --注册成功 + Toast.makeText(this,"新用户注册成功",Toast.LENGTH_LONG).show(); +// //从新用户注册界面进行跳转到用户的登录界面 +// Intent intent=new Intent(RegisterActivity.this,LoginActivity.class); +// startActivity(intent); +// //跳转后 进行销毁新用户注册界面 +// this.finish(); + }else{ + //添加--注册失败 + Toast.makeText(this,"新用户注册失败",Toast.LENGTH_LONG).show(); + } + } + /** + * 重置按钮具体事件处理方法 + */ + public void resetAction(){ + this.editname.setText(""); + this.editpass1.setText(""); + this.editpass2.setText(""); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_exit) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentInfoActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentInfoActivity.java new file mode 100644 index 0000000..66bb82f --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentInfoActivity.java @@ -0,0 +1,173 @@ +package cn.edu.myapplication; + + + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.EditText; +import android.widget.RadioButton; +import android.widget.Spinner; +import android.widget.TextView; +import android.widget.Toast; + +import cn.edu.myapplication.bean.StudentInfo; +import cn.edu.myapplication.dao.AddStudentInfoDao; +import cn.edu.myapplication.dao.ComData; + +public class RepairStudentInfoActivity extends Activity { + //成员变量 + TextView repaireditnum,repaireditname; + EditText repaireditage,repaireditmark; + RadioButton repairradiomen,repairradiowomen; + ArrayAdapter proadapter; + String[] proname={"计算机应用","计算机网络","移动互联开发","WEB前端开发"}; + Spinner repairpro; + Button butsave,butdel; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_repair_student_info); + + //调用方发 初始化 声明控件对象 + this.init(); + //调用方法 公共数据区 获取数据并显示 + this.showOldStudentData(); + //保存按钮 + this.butsave.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + // TODO Auto-generated method stub + saveAction(); + } + }); + //删除按钮 + this.butdel.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + // TODO Auto-generated method stub + deleteAction(); + } + }); + } + //初始化 声明的控件 对象 + private void init(){ + this.repaireditnum=(TextView) findViewById(R.id.repairnumtext); + this.repaireditname=(TextView) findViewById(R.id.repairnametext); + this.repairradiomen=(RadioButton) findViewById(R.id.repairradiomen); + this.repairradiowomen=(RadioButton) findViewById(R.id.repairradiowoman); + this.repaireditage=(EditText) findViewById(R.id.repairageedit); + this.repairpro=(Spinner) findViewById(R.id.spinner1); + this.repaireditmark=(EditText) findViewById(R.id.repairmarkedit); + this.butsave=(Button) findViewById(R.id.repairsavebutton); + this.butdel=(Button) findViewById(R.id.repairdelbutton); + } + /** + * 从公共数据区 获取数据并显示 + * + */ + private void showOldStudentData(){ + //获取存储的数据 + StudentInfo tem= ComData.item; + //显示获取的数据 + this.repaireditnum.setText(tem.getNum()); + this.repaireditname.setText(tem.getName()); + + this.repaireditage.setText(tem.getAge()); + if(tem.getSex().equals("男")) + { + repairradiomen.setChecked(true); + } + else + { + repairradiowomen.setChecked(true); + } + int n=0; + String pro=tem.getPro(); + if(pro.equals("计算机应用")){ + n=0; + }else if(pro.equals("计算机网络")){ + n=1; + }else if(pro.equals("移动互联开发")){ + n=2; + }else if(pro.equals("WEB前端开发")){ + n=3; + }else{ + n=4; + } + this.repairpro.setSelection(n); + this.repaireditmark.setText(tem.getMark()); + } + /** + * 删除 学生信息按钮事件功能 + */ + private void deleteAction(){ + String num=ComData.item.getNum(); + //调用方法 删除相关信息 + AddStudentInfoDao adao=new AddStudentInfoDao(this); + long n=adao.deleteById(num); + String mes="学生信息删除失败"; + if(n>0){ + mes="学生信息删除成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + /** + * 保存学生信息按钮事件功能 + */ + private void saveAction(){ + //1.获取用户输入的信息(用户修改的信息) + String num=this.repaireditnum.getText().toString(); + String name=this.repaireditname.getText().toString(); + String sex="男"; + if(this.repairradiowomen.isChecked()){ + // + sex="女"; + } + String age=this.repaireditage.getText().toString(); + String pro=this.repairpro.getSelectedItem().toString(); + String mark=this.repaireditmark.getText().toString(); + //修改公共数据库相关信息 + ComData.item.setNum(num); + ComData.item.setName(name); + ComData.item.setSex(sex); + ComData.item.setAge(age); + ComData.item.setPro(pro); + ComData.item.setMark(mark); + //调用 相关方法 修改数据库 + AddStudentInfoDao adao=new AddStudentInfoDao(this); + long n=adao.updateById(ComData.item); + //根据结果显示 + String mes="学生信息修改失败"; + if(n>0){ + mes="学生信息修改成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.repair_student_info, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentScoreActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentScoreActivity.java new file mode 100644 index 0000000..30d0077 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/RepairStudentScoreActivity.java @@ -0,0 +1,131 @@ +package cn.edu.myapplication; + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import cn.edu.myapplication.bean.StudentScore; +import cn.edu.myapplication.dao.AddStudentScoreDao; +import cn.edu.myapplication.dao.ComData; + +public class RepairStudentScoreActivity extends Activity { + TextView repairnum,repairname; + EditText repandroid,repjava,rephtml; + Button repbut,delbut; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_repair_student_score); + //调用方发 初始化 声明控件对象 + this.init(); + //调用方法 公共数据区 获取数据并显示 + this.showOldStudentData(); + //保存修改按钮 + this.repbut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + // TODO Auto-generated method stub + saveAction(); + } + }); + //删除成绩按钮 + this.delbut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View arg0) { + // TODO Auto-generated method stub + deleteAction(); + } + }); + } + //初始化 声明的控件 对象 + private void init(){ + this.repairnum=(TextView) findViewById(R.id.repscorenumtext); + this.repairname=(TextView) findViewById(R.id.repscorenametext); + this.repandroid=(EditText) findViewById(R.id.repscoreandroidtext); + this.repjava=(EditText) findViewById(R.id.repscorejavatext); + this.rephtml=(EditText) findViewById(R.id.repscorehtmltext); + this.repbut=(Button) findViewById(R.id.repscorebutton); + this.delbut=(Button) findViewById(R.id.repdelscorebutton); + } + /** + * 从公共数据区 获取数据并显示 + * + */ + private void showOldStudentData(){ + //获取存储的数据 + StudentScore tem= ComData.stem; + //显示获取的数据 + this.repairnum.setText(tem.getNum()); + this.repairname.setText(tem.getName()); + this.repandroid.setText(tem.getAndroid()); + this.repjava.setText(tem.getJava()); + this.rephtml.setText(tem.getHtml()); + } + /** + * 删除 学生成绩按钮事件功能 + */ + private void deleteAction(){ + String num=ComData.stem.getNum(); + //调用方法 删除相关信息 + AddStudentScoreDao adao=new AddStudentScoreDao(this); + long n=adao.deleteById(num); + String mes="学生成绩删除失败"; + if(n>0){ + mes="学生成绩删除成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + /** + * 保存学生成绩按钮事件功能 + */ + private void saveAction(){ + //1.获取用户输入的成绩(用户修改的成绩) + String num=this.repairnum.getText().toString(); + String name=this.repairname.getText().toString(); + String android=this.repandroid.getText().toString(); + String java=this.repjava.getText().toString(); + String html=this.rephtml.getText().toString(); + //修改公共数据库相关成绩 + ComData.stem.setNum(num); + ComData.stem.setName(name); + ComData.stem.setAndroid(android); + ComData.stem.setJava(java); + ComData.stem.setHtml(html); + //调用 相关方法 修改数据库 + AddStudentScoreDao adao=new AddStudentScoreDao(this); + long n=adao.updateById(ComData.stem); + //根据结果显示 + String mes="学生成绩修改失败"; + if(n>0){ + mes="学生成绩修改成功"; + } + Toast.makeText(this, mes, Toast.LENGTH_LONG).show(); + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.repair_student_score, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/ShowStudentInfoActivity.java b/Bandizip/app/src/main/java/cn/edu/myapplication/ShowStudentInfoActivity.java new file mode 100644 index 0000000..96e472c --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/ShowStudentInfoActivity.java @@ -0,0 +1,128 @@ +package cn.edu.myapplication; + +import java.util.ArrayList; + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.ListView; +import android.widget.TextView; + +import cn.edu.myapplication.bean.StudentInfo; +import cn.edu.myapplication.dao.AddStudentInfoDao; + +public class ShowStudentInfoActivity extends Activity { + //成员变量 + Button butall,butshow; + TextView numedit; + ListView listshow; + ArrayList adata;//存储 查询的结果 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_show_student_info); + //调用方法进行初始化 + this.init(); + //showdata在方法初始化之后调用进入直接进行显示学生的信息 +// this.showData(); + //为查询所有学生信息按钮事件添加监听 + this.butall.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + //showdata在按钮监听事件里调用 点击查询进行查询全部 + showData(); + } + }); + //根据学号查询所有学生信息按钮添加监听 + this.butshow.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + String num=numedit.getText().toString(); + shownumData(num); + } + }); + } +/* + * 初始化声明的控件对象 + */ + private void init(){ + this.butall=(Button) findViewById(R.id.showallbutton); + this.butshow=(Button) findViewById(R.id.showbutton); + this.numedit=(TextView) findViewById(R.id.numedit); + this.listshow=(ListView) findViewById(R.id.listView1); + } + /** + *查询所有学生信息 数据表并显示 + *type + */ + private void showData(){ + //1.调用 相关方法 插寻数据 + AddStudentInfoDao adao=new AddStudentInfoDao(this); + this.adata=adao.getStudentData(); + //2.构建列表搜需要的数据源 + ArrayList sdata=new ArrayList(); + for(int i=0;i sdata=new ArrayList(); + for(int i=0;i adata;//存储 查询的结果 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_show_student_score); + //调用方法进行初始化 + this.init(); + //showdata在方法初始化之后调用进入直接进行显示学生的信息 +// this.showData(); + //为查询所有学生信息按钮事件添加监听 + this.butscoreall.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + //showdata在按钮监听事件里调用 点击查询进行查询全部 + showscoreData(); + } + }); + //根据学号查询所有学生信息按钮添加监听 + this.butscoreshow.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + String num=scoreedit.getText().toString(); + shownumscoreData(num); + } + }); + } + /* + * 初始化声明的控件对象 + */ + private void init(){ + this.butscoreall=(Button) findViewById(R.id.showallbutton); + this.butscoreshow=(Button) findViewById(R.id.showscorebutton); + this.scoreedit=(TextView) findViewById(R.id.numscoreedit); + this.listshow=(ListView) findViewById(R.id.listView11); + } + /** + *查询所有学生成绩数据表并显示在ListView + *type + */ + private void showscoreData(){ + //1.调用 相关方法 插寻数据 + AddStudentScoreDao adao=new AddStudentScoreDao(this); + this.adata=adao.getallscoreData(); + //2.构建列表搜需要的数据源 + ArrayList sdata=new ArrayList(); + for(int i=0;i sdata=new ArrayList(); + for(int i=0;i adata;//存储 查询的结果 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_weihu_student_info); + //调用方法进行初始化 + this.init(); + //为根据学号进行查询按钮添加事件监听 + this.butshow.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + String num=numedit.getText().toString(); + shownumData(num); + } + }); +//为 listshow 控件添加 监听 + this.listshow.setOnItemClickListener(new OnItemClickListener() { + + @Override + public void onItemClick(AdapterView arg0, View arg1, int arg2, + long arg3) { + // TODO Auto-generated method stub + listAction(arg2); + } + }); + + } + /* + * 初始化声明的控件对象 + */ + private void init(){ + this.butshow=(Button) findViewById(R.id.showbutton); + this.numedit=(TextView) findViewById(R.id.numedit); + this.listshow=(ListView) findViewById(R.id.listView1); + } + /** + *根据学号查询单个学生信息 数据并显示 + *type + */ + public void shownumData(String num){ + //1.调用 相关方法 查询数据 + AddStudentInfoDao adao=new AddStudentInfoDao(this); + this.adata=adao.getStudentnumData(num); + //2.构建列表搜需要的数据源 + ArrayList sdata=new ArrayList(); + for(int i=0;i adata;//存储 查询的结果 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_weihu_student_score); + //调用方法进行初始化 + this.init(); + //为根据学号进行查询按钮添加事件监听 + this.weihuscorebut.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + String num=weihuscoreedit.getText().toString(); + shownumscoreData(num); + } + }); + //为 listshow 控件添加 监听 + this.listView.setOnItemClickListener(new OnItemClickListener() { + + @Override + public void onItemClick(AdapterView arg0, View arg1, int arg2, + long arg3) { + // TODO Auto-generated method stub + listAction(arg2); + } + }); + + } + /* + * 初始化声明的控件对象 + */ + private void init(){ + this.weihuscorebut=(Button) findViewById(R.id.showscorebutton); + this.weihuscoreedit=(TextView) findViewById(R.id.numscoreedit); + this.listView=(ListView) findViewById(R.id.listView12); + } + /** + *根据学号查询单个学生成绩 数据并显示在ListView + *type + */ + public void shownumscoreData(String num){ + //1.调用 相关方法 查询数据 + AddStudentScoreDao adao=new AddStudentScoreDao(this); + this.adata=adao.getScorenumData(num); + //2.构建列表搜需要的数据源 + ArrayList sdata=new ArrayList(); + for(int i=0;i + */ + public ArrayList getStudentData(){ + //初始化一个对象 + ArrayList adata=new ArrayList(); + //查询添加的学生信息表中所有的学生信息 + String sql="select * from "+TB_NAME; + + //管理员 发送查寻指令 + Cursor cursor=this.st.rawQuery(sql, null); + //从结果中逐条 取出 相关记录 + while(cursor.moveToNext()){ + //取出当前记录 + int id=cursor.getInt(cursor.getColumnIndex(COL1)); + String num=cursor.getString(cursor.getColumnIndex(COL2)); + String name=cursor.getString(cursor.getColumnIndex(COL3)); + String sex=cursor.getString(cursor.getColumnIndex(COL4)); + String age=cursor.getString(cursor.getColumnIndex(COL5)); + String pro=cursor.getString(cursor.getColumnIndex(COL6)); + String mark=cursor.getString(cursor.getColumnIndex(COL7)); + //创建一个对象,进行初始化学生信息的相关bean + StudentInfo tem=new StudentInfo(); + //用初始化的字段进行设置 相关的信息 + tem.setId(id); + tem.setNum(num); + tem.setName(name); + tem.setSex(sex); + tem.setAge(age); + tem.setPro(pro); + tem.setMark(mark); + //将相关的数据进行添加到初始化的学生信息表的相关存储中... + adata.add(tem); + } + cursor.close();//关闭查询 + this.st.close();//关闭管理员命令 + this.myhelper.close();//关闭数据库连接 + return adata;// + } + /** + * 查询添加的学生信息 按学号进行查询 + *@parma num0 + *@return ArrayList + */ + public ArrayList getStudentnumData(String num0){ + ArrayList adata=new ArrayList(); + //根据用户输入的学号查询单个学生信息 + String sql="select * from "+TB_NAME+" where "+COL2+"=?"; + //管理员 发送查寻指令 + Cursor cursor=this.st.rawQuery(sql, new String[]{num0}); + //从结果中逐条 取出 相关记录 + if(cursor.moveToNext()){ + //查询成功取出当前记录 + int id=cursor.getInt(cursor.getColumnIndex(COL1)); + String num=cursor.getString(cursor.getColumnIndex(COL2)); + String name=cursor.getString(cursor.getColumnIndex(COL3)); + String sex=cursor.getString(cursor.getColumnIndex(COL4)); + String age=cursor.getString(cursor.getColumnIndex(COL5)); + String pro=cursor.getString(cursor.getColumnIndex(COL6)); + String mark=cursor.getString(cursor.getColumnIndex(COL7)); + // + StudentInfo tem=new StudentInfo(); + // + tem.setId(id); + tem.setNum(num); + tem.setName(name); + tem.setSex(sex); + tem.setAge(age); + tem.setPro(pro); + tem.setMark(mark); + // + adata.add(tem); + } + cursor.close(); + this.st.close(); + this.myhelper.close(); + return adata; + } + /** + * 根据 学号删除 对应的学生信息 + * @param num + * @return long + */ + public long deleteById(String num){ + long n=this.st.delete(TB_NAME, COL2+"=?", new String[]{num}); + this.st.close(); + this.myhelper.close(); + return n; + } + /** + * 学生信息数据修改 + * @param num,name,sex,age,pro,mark---包装为 StudentInfo 类对象 + * @return long + */ + public long updateById(StudentInfo tem){ + ContentValues values=new ContentValues(); + //设置要进行 修改的字段值 + values.put(COL2, tem.getNum()); + values.put(COL3, tem.getName()); + values.put(COL4, tem.getSex()); + values.put(COL5, tem.getAge()); + values.put(COL6, tem.getPro()); + values.put(COL7, tem.getMark()); + //通过管理员 发指令 where 列 1=? 设置参数 String.values(整形数) 将整形数 转换为字符串 + long n=this.st.update(TB_NAME, values, COL2+"=?", new String[]{ String.valueOf( tem.getNum()) }); + this.free(); + return n; + } + +/** +* 释放 +*/ + public void free(){ + this.st.close(); + this.myhelper.close(); + } + public static void main(String args[]){ +// AddStudentInfoDao adao=new AddStudentInfoDao(); + } +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/dao/AddStudentScoreDao.java b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/AddStudentScoreDao.java new file mode 100644 index 0000000..e07c7e8 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/AddStudentScoreDao.java @@ -0,0 +1,183 @@ +package cn.edu.myapplication.dao; + +import java.util.ArrayList; + +import android.content.ContentValues; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.util.Log; + +import cn.edu.myapplication.bean.StudentScore; + +/** + * 学生成绩添加表 相关 + * @author k01 + * + */ +public class AddStudentScoreDao { + //成员变量 + MySqitHelper myhelper; + SQLiteDatabase st;// + String TB_NAME="AddScoretb"; + String COL1="_id"; + String COL2="num"; + String COL3="name"; + String COL4="android"; + String COL5="java"; + String COL6="html"; + //构造方法 + public AddStudentScoreDao(Context context){ + //创建打开数据库 + this.myhelper=new MySqitHelper(context); + //连接,初始化管理员 + try { + //当内存足够用读写的方式进行打开 + this.st=this.myhelper.getWritableDatabase(); + } catch (Exception e) { + //当内存不足时就只用只读的方式进行打开 + this.st=this.myhelper.getReadableDatabase(); + } + //创建表 + try { + String sql="create table if not exists "+TB_NAME+"("+COL1+" integer primary key autoincrement , "+ + COL2+" varchar(10),"+COL3+" varchar(10),"+COL4+" varchar(10),"+COL5+"" + + " varchar(10),"+COL6+" varchar(10))"; + //发送指令 + this.st.execSQL(sql); + } catch (Exception e) { + // 数据表 创建 异常 + Log.e("学生成绩表创建异常",e.toString()); + } + } +/** + * 添加学生成绩 +* 包装为一个 StudentScore对象 +* @return long + */ + public long addStudentScore(StudentScore tem){ + ContentValues values=new ContentValues(); + values.put(COL2, tem.getNum()); + values.put(COL3, tem.getName()); + values.put(COL4, tem.getAndroid()); + values.put(COL5, tem.getJava()); + values.put(COL6, tem.getHtml()); + //发送管理员指令 + long n=this.st.insert(TB_NAME, null, values); + this.free(); + return n; + } + + /** + * 查询添加的所有学生成绩 ,按所有进行查询 + *@parma all + *@return ArrayList + */ + public ArrayList getallscoreData(){ + ArrayList adata=new ArrayList(); + //查询添加的学生成绩表中所有的学生成绩 + String sql="select * from "+TB_NAME; + + //管理员 发送查寻指令 + Cursor cursor=this.st.rawQuery(sql, null); + //从结果中逐条 取出 相关记录 + while(cursor.moveToNext()){ + //取出当前记录 + int id=cursor.getInt(cursor.getColumnIndex(COL1)); + String num=cursor.getString(cursor.getColumnIndex(COL2)); + String name=cursor.getString(cursor.getColumnIndex(COL3)); + String android=cursor.getString(cursor.getColumnIndex(COL4)); + String java=cursor.getString(cursor.getColumnIndex(COL5)); + String html=cursor.getString(cursor.getColumnIndex(COL6)); + // + StudentScore tem=new StudentScore(); + // + tem.setId(id); + tem.setNum(num); + tem.setName(name); + tem.setAndroid(android); + tem.setJava(java); + tem.setHtml(html); + // + adata.add(tem); + } + cursor.close(); + this.st.close(); + this.myhelper.close(); + return adata; + } + /** + * 查询添加的学生成绩 按学号进行查询 + *@parma num1 + *@return ArrayList + */ + public ArrayList getScorenumData(String num0){ + ArrayList adata=new ArrayList(); + //根据学号查询单个学生信息 + String sql="select * from "+TB_NAME+" where "+COL2+"=?"; + //管理员 发送查寻指令 + Cursor cursor=this.st.rawQuery(sql, new String[]{num0}); + //从结果中逐条 取出 相关记录 + if(cursor.moveToNext()){ + //查询成功取出当前记录 + int id=cursor.getInt(cursor.getColumnIndex(COL1)); + String num=cursor.getString(cursor.getColumnIndex(COL2)); + String name=cursor.getString(cursor.getColumnIndex(COL3)); + String android=cursor.getString(cursor.getColumnIndex(COL4)); + String java=cursor.getString(cursor.getColumnIndex(COL5)); + String html=cursor.getString(cursor.getColumnIndex(COL6)); + // + StudentScore tem=new StudentScore(); + // + tem.setId(id); + tem.setNum(num); + tem.setName(name); + tem.setAndroid(android); + tem.setJava(java); + tem.setHtml(html); + // + adata.add(tem); + } + cursor.close(); + this.st.close(); + this.myhelper.close(); + return adata; + } + /** + * 根据 学号删除 对应的学生成绩 + * @param num + * @return long + */ + public long deleteById(String num){ + long n=this.st.delete(TB_NAME, COL2+"=?", new String[]{num}); + this.st.close(); + this.myhelper.close(); + return n; + } + /** + * 学生成绩数据修改 + * 包装为 StudentScore 类对象 + * @return long + */ + public long updateById(StudentScore tem){ + ContentValues values=new ContentValues(); + //设置要进行 修改的字段值 + values.put(COL2, tem.getNum()); + values.put(COL3, tem.getName()); + values.put(COL4, tem.getAndroid()); + values.put(COL5, tem.getJava()); + values.put(COL6, tem.getHtml()); + //通过管理员 发指令 where 列 1=? 设置参数 String.values(整形数) 将整形数 转换为字符串 + long n=this.st.update(TB_NAME, values, COL2+"=?", new String[]{ String.valueOf( tem.getNum()) }); + this.free(); + return n; + } + +/** +* 释放 +*/ + public void free(){ + this.st.close(); + this.myhelper.close(); + } +} \ No newline at end of file diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/dao/ComData.java b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/ComData.java new file mode 100644 index 0000000..90bbe73 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/ComData.java @@ -0,0 +1,16 @@ +package cn.edu.myapplication.dao; + + +import cn.edu.myapplication.bean.StudentInfo; +import cn.edu.myapplication.bean.StudentScore; +import cn.edu.myapplication.bean.UserInfo; + +/** + * 存储 程序 运行需要的暂时保存的 数据 + * + */ +public class ComData { + public static UserInfo utem=null;//登陆成功的用户信息 + static public StudentInfo item=null;//存储在学生信息维护中 点击列表 显示的信息 + static public StudentScore stem=null;//存储在学生成绩维护中 点击列表 显示的信息 +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/dao/MySqitHelper.java b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/MySqitHelper.java new file mode 100644 index 0000000..9cc8872 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/MySqitHelper.java @@ -0,0 +1,27 @@ +package cn.edu.myapplication.dao; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; + + +public class MySqitHelper extends SQLiteOpenHelper { + // + static String DB_NAME="studentsystem.db"; + static int version=1; + //构造方法 + public MySqitHelper(Context context){ + super(context,DB_NAME,null,version); + } + @Override + public void onCreate(SQLiteDatabase arg0) { + // TODO Auto-generated method stub + + } + @Override + public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) { + // TODO Auto-generated method stub + + } + +} diff --git a/Bandizip/app/src/main/java/cn/edu/myapplication/dao/UserDao.java b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/UserDao.java new file mode 100644 index 0000000..ff63a23 --- /dev/null +++ b/Bandizip/app/src/main/java/cn/edu/myapplication/dao/UserDao.java @@ -0,0 +1,154 @@ +package cn.edu.myapplication.dao; + + +import android.content.ContentValues; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.util.Log; + +import cn.edu.myapplication.bean.UserInfo; +import cn.edu.myapplication.dao.MySqitHelper; + +/** + * + * 对用户有信息表的相关操作(创建 查询 添加 ) + * @author k01 + * + */ +public class UserDao { + // + MySqitHelper myhelper; + SQLiteDatabase st;// + String TB_NAME="userinfo"; + String COL1="_id"; + String COL2="username"; + String COL3="userpass"; + // + public UserDao(Context context){ + //打开数据库 + this.myhelper=new MySqitHelper(context); + //连接数据库,--初始化 管理员 + try { + // 数据库的读 + this.st=this.myhelper.getWritableDatabase(); + } catch (Exception e) { + // 数据库的写 + this.st=this.myhelper.getReadableDatabase(); + } + //表创建(判断表是否存在)、 + String sql="create table if not exists "+TB_NAME+"("+COL1+" integer primary key autoincrement , "+ + COL2+" vachar(20),"+COL3+" varchar(20))"; + try { + //通过管理员发送指令 + this.st.execSQL(sql); + } catch (Exception e) { + Log.e("user表创建异常",e.toString()); + } + } + /** + * 添加用户 + * @param username userpass + * @return long + */ + public long addUser(String username,String userpass){ + ContentValues valuse=new ContentValues(); + // + valuse.put(COL2,username); + valuse.put(COL3,userpass); + //通过st发送指令 + long n=this.st.insert(TB_NAME,null,valuse); + return n; + } + /** + * 根据用户名 和 密码 --判断用户合法性 + * @param name,pass + * @return UserInfo + */ + public UserInfo checkUser(String name, String pass){ + UserInfo utem=null; + String sql="select * from "+TB_NAME+" where "+COL2+"=? and "+COL3+"=?"; + //发送 查询语句进行查询 + Cursor cursor=this.st.rawQuery(sql, new String[]{name,pass}); + //判断 结果集是否有数据 + if(cursor.moveToNext()){ + //取出当前记录 + int _id=cursor.getInt(cursor.getColumnIndex(COL1)); + //初始化 utem + utem=new UserInfo(); //本句执行 完后 ,utem值不等于null + //设置属性 + utem.setId(_id); + utem.setUsername(name); + utem.setUserpass(pass); + } + return utem; + } + /** + * 根据id修改对应的密码 + * @param id,pass + * @return long + */ + public long repairPassById(int id,String pass){ + ContentValues values=new ContentValues(); + values.put(COL3, pass); + long n=this.st.update(TB_NAME, values, COL1+"=?", new String[]{String.valueOf(id)}); + return n; + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bandizip/app/src/main/res/drawable-hdpi/ic_launcher.png b/Bandizip/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..d03b36a Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/addinfo.png b/Bandizip/app/src/main/res/drawable-mdpi/addinfo.png new file mode 100644 index 0000000..cb07a70 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/addinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/addscore.png b/Bandizip/app/src/main/res/drawable-mdpi/addscore.png new file mode 100644 index 0000000..523c784 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/addscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/bg1.png b/Bandizip/app/src/main/res/drawable-mdpi/bg1.png new file mode 100644 index 0000000..8c4a891 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/bg1.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/bg2.jpg b/Bandizip/app/src/main/res/drawable-mdpi/bg2.jpg new file mode 100644 index 0000000..05f94d1 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/bg2.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/bg3.jpg b/Bandizip/app/src/main/res/drawable-mdpi/bg3.jpg new file mode 100644 index 0000000..648316e Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/bg3.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/bg4.jpg b/Bandizip/app/src/main/res/drawable-mdpi/bg4.jpg new file mode 100644 index 0000000..5b99152 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/bg4.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/bg5.jpg b/Bandizip/app/src/main/res/drawable-mdpi/bg5.jpg new file mode 100644 index 0000000..10988ee Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/bg5.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/exit.png b/Bandizip/app/src/main/res/drawable-mdpi/exit.png new file mode 100644 index 0000000..c902d5e Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/exit.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/help.png b/Bandizip/app/src/main/res/drawable-mdpi/help.png new file mode 100644 index 0000000..e716aef Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/help.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/ic_launcher.png b/Bandizip/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..939a194 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/pass.png b/Bandizip/app/src/main/res/drawable-mdpi/pass.png new file mode 100644 index 0000000..c9c6c7f Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/pass.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/showinfo.png b/Bandizip/app/src/main/res/drawable-mdpi/showinfo.png new file mode 100644 index 0000000..2a9196a Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/showinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/showscore.png b/Bandizip/app/src/main/res/drawable-mdpi/showscore.png new file mode 100644 index 0000000..d594092 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/showscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/user.png b/Bandizip/app/src/main/res/drawable-mdpi/user.png new file mode 100644 index 0000000..b9ca9d0 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/user.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/userpass.png b/Bandizip/app/src/main/res/drawable-mdpi/userpass.png new file mode 100644 index 0000000..8e998d1 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/userpass.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/weihuinfo.png b/Bandizip/app/src/main/res/drawable-mdpi/weihuinfo.png new file mode 100644 index 0000000..a0fd6cb Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/weihuinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-mdpi/weihuscore.png b/Bandizip/app/src/main/res/drawable-mdpi/weihuscore.png new file mode 100644 index 0000000..2e06a22 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-mdpi/weihuscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/addinfo.png b/Bandizip/app/src/main/res/drawable-v24/addinfo.png new file mode 100644 index 0000000..cb07a70 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/addinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/addscore.png b/Bandizip/app/src/main/res/drawable-v24/addscore.png new file mode 100644 index 0000000..523c784 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/addscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/bg1.png b/Bandizip/app/src/main/res/drawable-v24/bg1.png new file mode 100644 index 0000000..8c4a891 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/bg1.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/bg2.jpg b/Bandizip/app/src/main/res/drawable-v24/bg2.jpg new file mode 100644 index 0000000..05f94d1 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/bg2.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-v24/bg3.jpg b/Bandizip/app/src/main/res/drawable-v24/bg3.jpg new file mode 100644 index 0000000..648316e Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/bg3.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-v24/bg4.jpg b/Bandizip/app/src/main/res/drawable-v24/bg4.jpg new file mode 100644 index 0000000..5b99152 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/bg4.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-v24/bg5.jpg b/Bandizip/app/src/main/res/drawable-v24/bg5.jpg new file mode 100644 index 0000000..10988ee Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/bg5.jpg differ diff --git a/Bandizip/app/src/main/res/drawable-v24/exit.png b/Bandizip/app/src/main/res/drawable-v24/exit.png new file mode 100644 index 0000000..c902d5e Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/exit.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/help.png b/Bandizip/app/src/main/res/drawable-v24/help.png new file mode 100644 index 0000000..e716aef Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/help.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/ic_launcher.png b/Bandizip/app/src/main/res/drawable-v24/ic_launcher.png new file mode 100644 index 0000000..2558a80 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/ic_launcher.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Bandizip/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/Bandizip/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Bandizip/app/src/main/res/drawable-v24/pass.png b/Bandizip/app/src/main/res/drawable-v24/pass.png new file mode 100644 index 0000000..c9c6c7f Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/pass.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/showinfo.png b/Bandizip/app/src/main/res/drawable-v24/showinfo.png new file mode 100644 index 0000000..2a9196a Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/showinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/showscore.png b/Bandizip/app/src/main/res/drawable-v24/showscore.png new file mode 100644 index 0000000..d594092 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/showscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/user.png b/Bandizip/app/src/main/res/drawable-v24/user.png new file mode 100644 index 0000000..b9ca9d0 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/user.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/userpass.png b/Bandizip/app/src/main/res/drawable-v24/userpass.png new file mode 100644 index 0000000..8e998d1 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/userpass.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/weihuinfo.png b/Bandizip/app/src/main/res/drawable-v24/weihuinfo.png new file mode 100644 index 0000000..a0fd6cb Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/weihuinfo.png differ diff --git a/Bandizip/app/src/main/res/drawable-v24/weihuscore.png b/Bandizip/app/src/main/res/drawable-v24/weihuscore.png new file mode 100644 index 0000000..2e06a22 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-v24/weihuscore.png differ diff --git a/Bandizip/app/src/main/res/drawable-xhdpi/ic_launcher.png b/Bandizip/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..2558a80 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/Bandizip/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/Bandizip/app/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..0a0b510 Binary files /dev/null and b/Bandizip/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/Bandizip/app/src/main/res/drawable/ic_launcher_background.xml b/Bandizip/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/Bandizip/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bandizip/app/src/main/res/drawable/tx.jpg b/Bandizip/app/src/main/res/drawable/tx.jpg new file mode 100644 index 0000000..6469a2b Binary files /dev/null and b/Bandizip/app/src/main/res/drawable/tx.jpg differ diff --git a/Bandizip/app/src/main/res/layout/activity_add_student_info.xml b/Bandizip/app/src/main/res/layout/activity_add_student_info.xml new file mode 100644 index 0000000..69f1c31 --- /dev/null +++ b/Bandizip/app/src/main/res/layout/activity_add_student_info.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +