Page 846 - 3-3
P. 846

" 스마트 클래스", "    지각 조퇴 외출 결석,  ,  ,   ") ;
                     //  두 번째 아이템 추가.
                     adapter.addItem(ContextCompat.getDrawable(this, R.drawable.office),
                             " 스마트 오피스", "    상태변경 시간표 정보 홈페이지,  ,  ,        ") ;
                     //  세 번째 아이템 추가.
                     adapter.addItem(ContextCompat.getDrawable(this, R.drawable.mooin),
                             " 무인 체력장", "50m,     팔굽혀펴기 유연성,       ") ;
                     //  리스트뷰를 클릭할경우
                     listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                         @Override
                         public void onItemClick(AdapterView parent, View v, int position, long id) {
                             if(position == 0) { // Item0 을 클릭할 경우
                                 if(PORT == 8001){ // PORT   가 8001  일 경우
                                     // Class_Loginsee 로 가는 인탠트 생성
                                     Intent      intent     =      new       Intent(getApplicationContext(),
             Class_Loginsee.class);
                                     intent.putExtra("IP",IP); // IP 값을 인탠트로 넘김
                                     intent.putExtra("WebIP", WebIP);// WebIP 값을 인탠트로 넘김
                                     intent.putExtra("PORT",PORT);// PORT  값을 인탠트로 넘김
                                     startActivity(intent);//  화면전환
                                 }
                                 else // PORT 값이 다를경우
                                     Toast.makeText(getBaseContext(),       " 포트값이       맞지       않습니다",
             Toast.LENGTH_SHORT).show();
                             }
                             if(position == 1) { // Item1 을 클릭할 경우
                                 if(PORT == 8000){ // PORT   가 8000  일 경우
                                     // Office_Login 으로 가는 인탠트 생성
                                     Intent intent = new Intent(getApplicationContext(), Office_Login.class);
                                     intent.putExtra("IP",IP); // IP 값을 인탠트로 넘김
                                     intent.putExtra("WebIP", WebIP);// WebIP 값을 인탠트로 넘김
                                     intent.putExtra("PORT",PORT);// PORT  값을 인탠트로 넘김
                                     startActivity(intent);//  화면전환
                                 }
                                 else // PORT 값이 다를경우
                                     Toast.makeText(getBaseContext(),       " 포트값이       맞지       않습니다",
             Toast.LENGTH_SHORT).show();
                             }
                             if(position == 2) { // Item2 를 클릭할 경우
                                 if(PORT == 8002){ // PORT   가 8002  일 경우
                                     // MooIn_Login 으로 가는 인탠트 생성
                                     Intent      intent     =      new       Intent(getApplicationContext(),
             MooIn_Login.class);
                                     intent.putExtra("IP",IP); // IP 값을 인탠트로 넘김
                                     intent.putExtra("WebIP", WebIP);// WebIP 값을 인탠트로 넘김


                                                        - 846 -
   841   842   843   844   845   846   847   848   849   850   851