package ufradvanced;

import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.ShortByReference;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

public class frmValueBlockInSectorReadWrite extends javax.swing.JInternalFrame {

    public frmValueBlockInSectorReadWrite() {
        initComponents();
    }
   
    static final int 
         FUNCT_LIGHT_OK     = 4,
         FUNCT_SOUND_OK     = 0,//4 Tripple sound
         FUNCT_LIGHT_ERROR  = 2,
         FUNCT_SOUND_ERROR  = 0,//2 Long sound
         DL_OK              = 0;
    
     static final byte
         MIFARE_AUTHENT1A   = 0x60,  
         MIFARE_AUTHENT1B   = 0x61;
     
    
    final static String ANY_DATA           = "You must enter any data !",
                        APPROPRIATE_FORMAT = "You must enter the appropriate format !";

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btngAUTH1AB = new javax.swing.ButtonGroup();
        pnlHeader = new javax.swing.JPanel();
        rbAUTH1A = new javax.swing.JRadioButton();
        rbAUTH1B = new javax.swing.JRadioButton();
        lblKeyIndex = new javax.swing.JLabel();
        cboKeyIndex = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        pgValueBlockInSectorReadWrite = new javax.swing.JTabbedPane();
        tabValueBlockInSectorRead = new javax.swing.JPanel();
        pnlValueBlockInSectorRead = new javax.swing.JPanel();
        txtVBISRSectorAddress = new javax.swing.JTextField();
        txtVBISRBlockAddress = new javax.swing.JTextField();
        btnValueBlockInSectorRead = new javax.swing.JButton();
        chkBlockRead2 = new javax.swing.JCheckBox();
        lblValueBlockInSectorRead = new javax.swing.JLabel();
        lblVBISRSectorAddress = new javax.swing.JLabel();
        txtValueBlockInSectorRead = new javax.swing.JTextField();
        lblVBISReadData = new javax.swing.JLabel();
        lblVBISRBlockAddress = new javax.swing.JLabel();
        lblValueAddress = new javax.swing.JLabel();
        txtValueAddress = new javax.swing.JTextField();
        pnlValueBlockInSectorReadAKM1 = new javax.swing.JPanel();
        txtVBISRSectorAddressAKM1 = new javax.swing.JTextField();
        txtVBISRBlockAddressAKM1 = new javax.swing.JTextField();
        btnValueBlockInSectorReadAKM1 = new javax.swing.JButton();
        chkBlockRead3 = new javax.swing.JCheckBox();
        lblValueBlockInSectorReadAKM1 = new javax.swing.JLabel();
        lblVBISRSectorAddressAKM1 = new javax.swing.JLabel();
        txtValueBlockInSectorReadAKM1 = new javax.swing.JTextField();
        lblVBISReadDataAKM1 = new javax.swing.JLabel();
        lblVBISRBlockAddressAKM1 = new javax.swing.JLabel();
        lblValueAddressAKM1 = new javax.swing.JLabel();
        txtValueAddressAKM1 = new javax.swing.JTextField();
        pnlValueBlockInSectorReadAKM2 = new javax.swing.JPanel();
        txtVBISRSectorAddressAKM2 = new javax.swing.JTextField();
        txtVBISRBlockAddressAKM2 = new javax.swing.JTextField();
        btnValueBlockInSectorReadAKM2 = new javax.swing.JButton();
        chkBlockRead4 = new javax.swing.JCheckBox();
        lblValueBlockInSectorReadAKM2 = new javax.swing.JLabel();
        lblVBISRSectorAddressAKM2 = new javax.swing.JLabel();
        txtValueBlockInSectorReadAKM2 = new javax.swing.JTextField();
        lblVBISReadDataAKM2 = new javax.swing.JLabel();
        lblVBISRBlockAddressAKM2 = new javax.swing.JLabel();
        lblValueAddressAKM2 = new javax.swing.JLabel();
        txtValueAddressAKM2 = new javax.swing.JTextField();
        pnlValueBlockInSectorReadPK = new javax.swing.JPanel();
        txtVBISRSectorAddressPK = new javax.swing.JTextField();
        txtVBISRBlockAddressPK = new javax.swing.JTextField();
        btnValueBlockInSectorReadPK = new javax.swing.JButton();
        chkBlockRead5 = new javax.swing.JCheckBox();
        lblValueBlockInSectorReadPK = new javax.swing.JLabel();
        lblVBISRSectorAddressPK = new javax.swing.JLabel();
        txtValueBlockInSectorReadPK = new javax.swing.JTextField();
        lblVBISReadDataPK = new javax.swing.JLabel();
        lblVBISRBlockAddressPK = new javax.swing.JLabel();
        lblValueAddressPK = new javax.swing.JLabel();
        txtValueAddressPK = new javax.swing.JTextField();
        tabValueBlockInSectorWrite = new javax.swing.JPanel();
        pnlValueBlockInSectorWrite = new javax.swing.JPanel();
        txtVBISWValueData = new javax.swing.JTextField();
        txtVBISWSectorAddress = new javax.swing.JTextField();
        txtVBISWBlockAddress = new javax.swing.JTextField();
        txtVBISWValueAddress = new javax.swing.JTextField();
        btnValueBlockInSectorWrite = new javax.swing.JButton();
        chkBlockRead6 = new javax.swing.JCheckBox();
        lblValueBlockInSectorWrite = new javax.swing.JLabel();
        lblVBISWSectorAddress = new javax.swing.JLabel();
        lblVBISWBlockAddress = new javax.swing.JLabel();
        lblVBISWValueData = new javax.swing.JLabel();
        lblVBISWValueAddress = new javax.swing.JLabel();
        pnlValueBlockInSectorWriteAKM1 = new javax.swing.JPanel();
        txtVBISWValueDataAKM1 = new javax.swing.JTextField();
        txtVBISWSectorAddressAKM1 = new javax.swing.JTextField();
        txtVBISWBlockAddressAKM1 = new javax.swing.JTextField();
        txtVBISWValueAddressAKM1 = new javax.swing.JTextField();
        btnValueBlockInSectorWriteAKM1 = new javax.swing.JButton();
        chkBlockRead7 = new javax.swing.JCheckBox();
        lblValueBlockInSectorWriteAKM1 = new javax.swing.JLabel();
        lblVBISWSectorAddressAKM1 = new javax.swing.JLabel();
        lblVBISWBlockAddressAKM1 = new javax.swing.JLabel();
        lblVBISWValueDataAKM1 = new javax.swing.JLabel();
        lblVBISWValueAddressAKM1 = new javax.swing.JLabel();
        pnlValueBlockInSectorWriteAKM2 = new javax.swing.JPanel();
        txtVBISWValueDataAKM2 = new javax.swing.JTextField();
        txtVBISWSectorAddressAKM2 = new javax.swing.JTextField();
        txtVBISWBlockAddressAKM2 = new javax.swing.JTextField();
        txtVBISWValueAddressAKM2 = new javax.swing.JTextField();
        btnValueBlockInSectorWriteAKM2 = new javax.swing.JButton();
        chkBlockRead8 = new javax.swing.JCheckBox();
        lblValueBlockInSectorWriteAKM2 = new javax.swing.JLabel();
        lblVBISWSectorAddressAKM2 = new javax.swing.JLabel();
        lblVBISWBlockAddressAKM2 = new javax.swing.JLabel();
        lblVBISWValueDataAKM2 = new javax.swing.JLabel();
        lblVBISWValueAddressAKM2 = new javax.swing.JLabel();
        pnlValueBlockInSectorWritePK = new javax.swing.JPanel();
        txtVBISWSectorAddressPK = new javax.swing.JTextField();
        txtVBISWBlockAddressPK = new javax.swing.JTextField();
        txtVBISWValueDataPK = new javax.swing.JTextField();
        txtVBISWValueAddressPK = new javax.swing.JTextField();
        btnValueBlockInSectorWritePK = new javax.swing.JButton();
        chkBlockRead9 = new javax.swing.JCheckBox();
        lblValueBlockInSectorWrite3 = new javax.swing.JLabel();
        lblVBISWSectorAddressPK = new javax.swing.JLabel();
        lblVBISWBlockAddressPK = new javax.swing.JLabel();
        lblVBISWValueDataPK = new javax.swing.JLabel();
        lblVBISWValueAddressPK = new javax.swing.JLabel();
        lblFunction = new javax.swing.JTextField();
        txtFErrorCode = new javax.swing.JTextField();
        txtFErrorExplain = new javax.swing.JTextField();

        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        setTitle("frmValueBlockInSectorReadWrite");
        setName("frmValueBlockInSectorReadWrite"); // NOI18N
        setPreferredSize(new java.awt.Dimension(555, 450));
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameActivated(evt);
            }
            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
            }
        });
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        pnlHeader.setBackground(new java.awt.Color(255, 255, 255));
        pnlHeader.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        rbAUTH1A.setBackground(new java.awt.Color(255, 255, 255));
        btngAUTH1AB.add(rbAUTH1A);
        rbAUTH1A.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        rbAUTH1A.setSelected(true);
        rbAUTH1A.setText("AUTH 1A");
        rbAUTH1A.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        rbAUTH1B.setBackground(new java.awt.Color(255, 255, 255));
        btngAUTH1AB.add(rbAUTH1B);
        rbAUTH1B.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        rbAUTH1B.setText("AUTH 1B");
        rbAUTH1B.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblKeyIndex.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblKeyIndex.setText("Key Index");

        cboKeyIndex.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        cboKeyIndex.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        jLabel1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        jLabel1.setText("PK");

        javax.swing.GroupLayout pnlHeaderLayout = new javax.swing.GroupLayout(pnlHeader);
        pnlHeader.setLayout(pnlHeaderLayout);
        pnlHeaderLayout.setHorizontalGroup(
            pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeaderLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(rbAUTH1A)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbAUTH1B)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lblKeyIndex)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cboKeyIndex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addContainerGap(272, Short.MAX_VALUE))
        );
        pnlHeaderLayout.setVerticalGroup(
            pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(rbAUTH1A)
                .addComponent(rbAUTH1B)
                .addComponent(lblKeyIndex)
                .addComponent(cboKeyIndex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel1))
        );

        getContentPane().add(pnlHeader, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 553, -1));

        pgValueBlockInSectorReadWrite.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N

        pnlValueBlockInSectorRead.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRSectorAddress.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRSectorAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRSectorAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRBlockAddress.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRBlockAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRBlockAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISRBlockAddress.setFocusCycleRoot(true);

        btnValueBlockInSectorRead.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorRead.setText("READ");
        btnValueBlockInSectorRead.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorRead.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorReadActionPerformed(evt);
            }
        });

        chkBlockRead2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead2.setText("Ascii");
        chkBlockRead2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorRead.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorRead.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorRead.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorRead.setText("ValueBlockInSector Read");
        lblValueBlockInSectorRead.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorRead.setOpaque(true);

        lblVBISRSectorAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRSectorAddress.setText("Sector Address");

        txtValueBlockInSectorRead.setEditable(false);
        txtValueBlockInSectorRead.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        txtValueBlockInSectorRead.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueBlockInSectorRead.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblVBISReadData.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISReadData.setText("Read Data");

        lblVBISRBlockAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRBlockAddress.setText("Block Address");

        lblValueAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblValueAddress.setText("Value Address");

        txtValueAddress.setEditable(false);
        txtValueAddress.setBackground(new java.awt.Color(204, 204, 204));
        txtValueAddress.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtValueAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout pnlValueBlockInSectorReadLayout = new javax.swing.GroupLayout(pnlValueBlockInSectorRead);
        pnlValueBlockInSectorRead.setLayout(pnlValueBlockInSectorReadLayout);
        pnlValueBlockInSectorReadLayout.setHorizontalGroup(
            pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorRead, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE)
            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorReadLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                                .addComponent(lblVBISRSectorAddress)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISRSectorAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                                .addComponent(lblVBISRBlockAddress)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISRBlockAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorReadLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                                .addComponent(chkBlockRead2)
                                .addGap(17, 17, 17))
                            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(lblValueAddress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnValueBlockInSectorRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                    .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVBISReadData)
                            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                                .addComponent(txtValueBlockInSectorRead, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(txtValueAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlValueBlockInSectorReadLayout.setVerticalGroup(
            pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorRead, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorReadLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISRSectorAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISRSectorAddress))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVBISRBlockAddress)
                            .addComponent(txtVBISRBlockAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorRead, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVBISReadData)
                    .addComponent(lblValueAddress))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValueBlockInSectorRead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtValueAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlValueBlockInSectorReadAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRSectorAddressAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRSectorAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRSectorAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRBlockAddressAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRBlockAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRBlockAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISRBlockAddressAKM1.setFocusCycleRoot(true);

        btnValueBlockInSectorReadAKM1.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorReadAKM1.setText("READ");
        btnValueBlockInSectorReadAKM1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorReadAKM1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorReadAKM1ActionPerformed(evt);
            }
        });

        chkBlockRead3.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead3.setText("Ascii");
        chkBlockRead3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorReadAKM1.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorReadAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorReadAKM1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorReadAKM1.setText("ValueBlockInSectorRead AKM1");
        lblValueBlockInSectorReadAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorReadAKM1.setOpaque(true);

        lblVBISRSectorAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRSectorAddressAKM1.setText("Sector Address");

        txtValueBlockInSectorReadAKM1.setEditable(false);
        txtValueBlockInSectorReadAKM1.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        txtValueBlockInSectorReadAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueBlockInSectorReadAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblVBISReadDataAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISReadDataAKM1.setText("Read Data");

        lblVBISRBlockAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRBlockAddressAKM1.setText("Block Address");

        lblValueAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblValueAddressAKM1.setText("Value Address");

        txtValueAddressAKM1.setEditable(false);
        txtValueAddressAKM1.setBackground(new java.awt.Color(204, 204, 204));
        txtValueAddressAKM1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtValueAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout pnlValueBlockInSectorReadAKM1Layout = new javax.swing.GroupLayout(pnlValueBlockInSectorReadAKM1);
        pnlValueBlockInSectorReadAKM1.setLayout(pnlValueBlockInSectorReadAKM1Layout);
        pnlValueBlockInSectorReadAKM1Layout.setHorizontalGroup(
            pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorReadAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
            .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                                .addComponent(lblVBISRSectorAddressAKM1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISRSectorAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                                .addComponent(lblVBISRBlockAddressAKM1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISRBlockAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblVBISReadDataAKM1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(lblValueAddressAKM1))
                            .addComponent(btnValueBlockInSectorReadAKM1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                                .addComponent(chkBlockRead3)
                                .addGap(17, 17, 17))))
                    .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                        .addComponent(txtValueBlockInSectorReadAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(txtValueAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 25, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlValueBlockInSectorReadAKM1Layout.setVerticalGroup(
            pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorReadAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISRSectorAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISRSectorAddressAKM1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVBISRBlockAddressAKM1)
                            .addComponent(txtVBISRBlockAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorReadAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblVBISReadDataAKM1)
                    .addGroup(pnlValueBlockInSectorReadAKM1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblValueAddressAKM1)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorReadAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValueBlockInSectorReadAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtValueAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlValueBlockInSectorReadAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRSectorAddressAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRSectorAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRSectorAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRBlockAddressAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRBlockAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRBlockAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISRBlockAddressAKM2.setFocusCycleRoot(true);

        btnValueBlockInSectorReadAKM2.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorReadAKM2.setText("READ");
        btnValueBlockInSectorReadAKM2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorReadAKM2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorReadAKM2ActionPerformed(evt);
            }
        });

        chkBlockRead4.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead4.setText("Ascii");
        chkBlockRead4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorReadAKM2.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorReadAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorReadAKM2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorReadAKM2.setText("ValueBlockInSectorRead AKM2");
        lblValueBlockInSectorReadAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorReadAKM2.setOpaque(true);

        lblVBISRSectorAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRSectorAddressAKM2.setText("Sector Address");

        txtValueBlockInSectorReadAKM2.setEditable(false);
        txtValueBlockInSectorReadAKM2.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        txtValueBlockInSectorReadAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueBlockInSectorReadAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblVBISReadDataAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISReadDataAKM2.setText("Read Data");

        lblVBISRBlockAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRBlockAddressAKM2.setText("Block Address");

        lblValueAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblValueAddressAKM2.setText("Value Address");

        txtValueAddressAKM2.setEditable(false);
        txtValueAddressAKM2.setBackground(new java.awt.Color(204, 204, 204));
        txtValueAddressAKM2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtValueAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout pnlValueBlockInSectorReadAKM2Layout = new javax.swing.GroupLayout(pnlValueBlockInSectorReadAKM2);
        pnlValueBlockInSectorReadAKM2.setLayout(pnlValueBlockInSectorReadAKM2Layout);
        pnlValueBlockInSectorReadAKM2Layout.setHorizontalGroup(
            pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorReadAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                                .addComponent(lblVBISRSectorAddressAKM2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISRSectorAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                                .addComponent(lblVBISRBlockAddressAKM2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISRBlockAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblVBISReadDataAKM2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(lblValueAddressAKM2))
                            .addComponent(btnValueBlockInSectorReadAKM2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                                .addComponent(chkBlockRead4)
                                .addGap(17, 17, 17))))
                    .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                        .addComponent(txtValueBlockInSectorReadAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(txtValueAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlValueBlockInSectorReadAKM2Layout.setVerticalGroup(
            pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorReadAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISRSectorAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISRSectorAddressAKM2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVBISRBlockAddressAKM2)
                            .addComponent(txtVBISRBlockAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorReadAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblVBISReadDataAKM2)
                    .addGroup(pnlValueBlockInSectorReadAKM2Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblValueAddressAKM2)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorReadAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValueBlockInSectorReadAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtValueAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlValueBlockInSectorReadPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRSectorAddressPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRSectorAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRSectorAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISRBlockAddressPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISRBlockAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISRBlockAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISRBlockAddressPK.setFocusCycleRoot(true);

        btnValueBlockInSectorReadPK.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorReadPK.setText("READ");
        btnValueBlockInSectorReadPK.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorReadPK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorReadPKActionPerformed(evt);
            }
        });

        chkBlockRead5.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead5.setText("Ascii");
        chkBlockRead5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorReadPK.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorReadPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorReadPK.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorReadPK.setText("ValueBlockInSectorRead PK");
        lblValueBlockInSectorReadPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorReadPK.setOpaque(true);

        lblVBISRSectorAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRSectorAddressPK.setText("Sector Address");

        txtValueBlockInSectorReadPK.setEditable(false);
        txtValueBlockInSectorReadPK.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        txtValueBlockInSectorReadPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueBlockInSectorReadPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblVBISReadDataPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISReadDataPK.setText("Read Data");

        lblVBISRBlockAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISRBlockAddressPK.setText("Block Address");

        lblValueAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblValueAddressPK.setText("Value Address");

        txtValueAddressPK.setEditable(false);
        txtValueAddressPK.setBackground(new java.awt.Color(204, 204, 204));
        txtValueAddressPK.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtValueAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtValueAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout pnlValueBlockInSectorReadPKLayout = new javax.swing.GroupLayout(pnlValueBlockInSectorReadPK);
        pnlValueBlockInSectorReadPK.setLayout(pnlValueBlockInSectorReadPKLayout);
        pnlValueBlockInSectorReadPKLayout.setHorizontalGroup(
            pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorReadPK, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
            .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                                .addComponent(lblVBISRSectorAddressPK)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISRSectorAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                                .addComponent(lblVBISRBlockAddressPK)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISRBlockAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblVBISReadDataPK))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(lblValueAddressPK))
                            .addComponent(btnValueBlockInSectorReadPK, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                                .addComponent(chkBlockRead5)
                                .addGap(17, 17, 17))))
                    .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                        .addComponent(txtValueBlockInSectorReadPK, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(txtValueAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 25, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlValueBlockInSectorReadPKLayout.setVerticalGroup(
            pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorReadPK, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorReadPKLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISRSectorAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISRSectorAddressPK))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblVBISRBlockAddressPK)
                            .addComponent(txtVBISRBlockAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorReadPK, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVBISReadDataPK)
                    .addComponent(lblValueAddressPK))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorReadPKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtValueBlockInSectorReadPK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtValueAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout tabValueBlockInSectorReadLayout = new javax.swing.GroupLayout(tabValueBlockInSectorRead);
        tabValueBlockInSectorRead.setLayout(tabValueBlockInSectorReadLayout);
        tabValueBlockInSectorReadLayout.setHorizontalGroup(
            tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tabValueBlockInSectorReadLayout.createSequentialGroup()
                .addGroup(tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorReadAKM2, 0, 243, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorReadPK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorReadAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        tabValueBlockInSectorReadLayout.setVerticalGroup(
            tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tabValueBlockInSectorReadLayout.createSequentialGroup()
                .addGroup(tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorReadAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(tabValueBlockInSectorReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorReadPK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorReadAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pgValueBlockInSectorReadWrite.addTab("ValueBlockInSector Read", tabValueBlockInSectorRead);

        pnlValueBlockInSectorWrite.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWValueData.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueData.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueData.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWSectorAddress.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWSectorAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWSectorAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWBlockAddress.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWBlockAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWBlockAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISWBlockAddress.setFocusCycleRoot(true);

        txtVBISWValueAddress.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueAddress.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        btnValueBlockInSectorWrite.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorWrite.setText("WRITE");
        btnValueBlockInSectorWrite.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorWrite.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorWriteActionPerformed(evt);
            }
        });

        chkBlockRead6.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead6.setText("Ascii");
        chkBlockRead6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorWrite.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorWrite.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorWrite.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorWrite.setText("ValueBlockInSector Write");
        lblValueBlockInSectorWrite.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorWrite.setOpaque(true);

        lblVBISWSectorAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWSectorAddress.setText("Sector Address");

        lblVBISWBlockAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWBlockAddress.setText("Block Address");

        lblVBISWValueData.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueData.setText("Value Data");

        lblVBISWValueAddress.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueAddress.setText("Value Address");

        javax.swing.GroupLayout pnlValueBlockInSectorWriteLayout = new javax.swing.GroupLayout(pnlValueBlockInSectorWrite);
        pnlValueBlockInSectorWrite.setLayout(pnlValueBlockInSectorWriteLayout);
        pnlValueBlockInSectorWriteLayout.setHorizontalGroup(
            pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                        .addComponent(lblVBISWValueData)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtVBISWValueData))
                    .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                                .addComponent(lblVBISWSectorAddress)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtVBISWSectorAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                                .addComponent(lblVBISWBlockAddress)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtVBISWBlockAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                                .addComponent(lblVBISWValueAddress)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWValueAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnValueBlockInSectorWrite, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBlockRead6, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addGap(17, 17, 17))
        );
        pnlValueBlockInSectorWriteLayout.setVerticalGroup(
            pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtVBISWValueData, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVBISWValueData))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorWriteLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblVBISWSectorAddress)
                            .addComponent(txtVBISWSectorAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblVBISWBlockAddress)
                            .addComponent(txtVBISWBlockAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblVBISWValueAddress)
                            .addComponent(txtVBISWValueAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlValueBlockInSectorWriteAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWValueDataAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueDataAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueDataAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWSectorAddressAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWSectorAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWSectorAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWBlockAddressAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWBlockAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWBlockAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISWBlockAddressAKM1.setFocusCycleRoot(true);

        txtVBISWValueAddressAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueAddressAKM1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueAddressAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        btnValueBlockInSectorWriteAKM1.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorWriteAKM1.setText("WRITE");
        btnValueBlockInSectorWriteAKM1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorWriteAKM1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorWriteAKM1ActionPerformed(evt);
            }
        });

        chkBlockRead7.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead7.setText("Ascii");
        chkBlockRead7.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorWriteAKM1.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorWriteAKM1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorWriteAKM1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorWriteAKM1.setText("ValueBlockInSectorWrite AKM1");
        lblValueBlockInSectorWriteAKM1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorWriteAKM1.setOpaque(true);

        lblVBISWSectorAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWSectorAddressAKM1.setText("Sector Address");

        lblVBISWBlockAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWBlockAddressAKM1.setText("Block Address");

        lblVBISWValueDataAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueDataAKM1.setText("Value Data");

        lblVBISWValueAddressAKM1.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueAddressAKM1.setText("Value Address");

        javax.swing.GroupLayout pnlValueBlockInSectorWriteAKM1Layout = new javax.swing.GroupLayout(pnlValueBlockInSectorWriteAKM1);
        pnlValueBlockInSectorWriteAKM1.setLayout(pnlValueBlockInSectorWriteAKM1Layout);
        pnlValueBlockInSectorWriteAKM1Layout.setHorizontalGroup(
            pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                        .addComponent(lblVBISWValueDataAKM1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtVBISWValueDataAKM1))
                    .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                                .addComponent(lblVBISWBlockAddressAKM1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWBlockAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                                .addComponent(lblVBISWSectorAddressAKM1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISWSectorAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                                .addComponent(lblVBISWValueAddressAKM1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWValueAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(9, 9, 9)
                        .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBlockRead7, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addGap(17, 17, 17))
        );
        pnlValueBlockInSectorWriteAKM1Layout.setVerticalGroup(
            pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtVBISWValueDataAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVBISWValueDataAKM1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWSectorAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWSectorAddressAKM1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWBlockAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWBlockAddressAKM1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteAKM1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblVBISWValueAddressAKM1)
                            .addComponent(txtVBISWValueAddressAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlValueBlockInSectorWriteAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWValueDataAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueDataAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueDataAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWSectorAddressAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWSectorAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWSectorAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWBlockAddressAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWBlockAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWBlockAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISWBlockAddressAKM2.setFocusCycleRoot(true);

        txtVBISWValueAddressAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueAddressAKM2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueAddressAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        btnValueBlockInSectorWriteAKM2.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorWriteAKM2.setText("WRITE");
        btnValueBlockInSectorWriteAKM2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorWriteAKM2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorWriteAKM2ActionPerformed(evt);
            }
        });

        chkBlockRead8.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead8.setText("Ascii");
        chkBlockRead8.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorWriteAKM2.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorWriteAKM2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorWriteAKM2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorWriteAKM2.setText("ValueBlockInSectorWrite AKM2");
        lblValueBlockInSectorWriteAKM2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorWriteAKM2.setOpaque(true);

        lblVBISWSectorAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWSectorAddressAKM2.setText("Sector Address");

        lblVBISWBlockAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWBlockAddressAKM2.setText("Block Address");

        lblVBISWValueDataAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueDataAKM2.setText("Value Data");

        lblVBISWValueAddressAKM2.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueAddressAKM2.setText("Value Address");

        javax.swing.GroupLayout pnlValueBlockInSectorWriteAKM2Layout = new javax.swing.GroupLayout(pnlValueBlockInSectorWriteAKM2);
        pnlValueBlockInSectorWriteAKM2.setLayout(pnlValueBlockInSectorWriteAKM2Layout);
        pnlValueBlockInSectorWriteAKM2Layout.setHorizontalGroup(
            pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                        .addComponent(lblVBISWValueDataAKM2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtVBISWValueDataAKM2))
                    .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                                .addComponent(lblVBISWSectorAddressAKM2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISWSectorAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                                .addComponent(lblVBISWBlockAddressAKM2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWBlockAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                                .addComponent(lblVBISWValueAddressAKM2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWValueAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBlockRead8, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addGap(17, 17, 17))
        );
        pnlValueBlockInSectorWriteAKM2Layout.setVerticalGroup(
            pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtVBISWValueDataAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVBISWValueDataAKM2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWSectorAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWSectorAddressAKM2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWBlockAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWBlockAddressAKM2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWriteAKM2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblVBISWValueAddressAKM2)
                            .addComponent(txtVBISWValueAddressAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(btnValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlValueBlockInSectorWritePK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWSectorAddressPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWSectorAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWSectorAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWBlockAddressPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWBlockAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWBlockAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        txtVBISWBlockAddressPK.setFocusCycleRoot(true);

        txtVBISWValueDataPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueDataPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueDataPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        txtVBISWValueAddressPK.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        txtVBISWValueAddressPK.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVBISWValueAddressPK.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        btnValueBlockInSectorWritePK.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        btnValueBlockInSectorWritePK.setText("WRITE");
        btnValueBlockInSectorWritePK.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnValueBlockInSectorWritePK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnValueBlockInSectorWritePKActionPerformed(evt);
            }
        });

        chkBlockRead9.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        chkBlockRead9.setText("Ascii");
        chkBlockRead9.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        lblValueBlockInSectorWrite3.setBackground(new java.awt.Color(153, 153, 153));
        lblValueBlockInSectorWrite3.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        lblValueBlockInSectorWrite3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblValueBlockInSectorWrite3.setText("ValueBlockInSector Write");
        lblValueBlockInSectorWrite3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblValueBlockInSectorWrite3.setOpaque(true);

        lblVBISWSectorAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWSectorAddressPK.setText("Sector Address");

        lblVBISWBlockAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWBlockAddressPK.setText("Block Address");

        lblVBISWValueDataPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueDataPK.setText("Value Data");

        lblVBISWValueAddressPK.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblVBISWValueAddressPK.setText("Value Address");

        javax.swing.GroupLayout pnlValueBlockInSectorWritePKLayout = new javax.swing.GroupLayout(pnlValueBlockInSectorWritePK);
        pnlValueBlockInSectorWritePK.setLayout(pnlValueBlockInSectorWritePKLayout);
        pnlValueBlockInSectorWritePKLayout.setHorizontalGroup(
            pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblValueBlockInSectorWrite3, javax.swing.GroupLayout.DEFAULT_SIZE, 254, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                        .addComponent(lblVBISWValueDataPK)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtVBISWValueDataPK))
                    .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                                .addComponent(lblVBISWSectorAddressPK)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVBISWSectorAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                                .addComponent(lblVBISWBlockAddressPK)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWBlockAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                                .addComponent(lblVBISWValueAddressPK)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVBISWValueAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnValueBlockInSectorWritePK, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBlockRead9, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addGap(17, 17, 17))
        );
        pnlValueBlockInSectorWritePKLayout.setVerticalGroup(
            pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                .addComponent(lblValueBlockInSectorWrite3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtVBISWValueDataPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVBISWValueDataPK))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlValueBlockInSectorWritePKLayout.createSequentialGroup()
                        .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWSectorAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWSectorAddressPK))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWBlockAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWBlockAddressPK))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlValueBlockInSectorWritePKLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVBISWValueAddressPK, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblVBISWValueAddressPK)))
                    .addComponent(btnValueBlockInSectorWritePK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkBlockRead9, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout tabValueBlockInSectorWriteLayout = new javax.swing.GroupLayout(tabValueBlockInSectorWrite);
        tabValueBlockInSectorWrite.setLayout(tabValueBlockInSectorWriteLayout);
        tabValueBlockInSectorWriteLayout.setHorizontalGroup(
            tabValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tabValueBlockInSectorWriteLayout.createSequentialGroup()
                .addGroup(tabValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(tabValueBlockInSectorWriteLayout.createSequentialGroup()
                        .addComponent(pnlValueBlockInSectorWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(pnlValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(tabValueBlockInSectorWriteLayout.createSequentialGroup()
                        .addComponent(pnlValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(pnlValueBlockInSectorWritePK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        tabValueBlockInSectorWriteLayout.setVerticalGroup(
            tabValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tabValueBlockInSectorWriteLayout.createSequentialGroup()
                .addGroup(tabValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorWriteAKM1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(tabValueBlockInSectorWriteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlValueBlockInSectorWriteAKM2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlValueBlockInSectorWritePK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pgValueBlockInSectorReadWrite.addTab("ValueBlockInSector Write", tabValueBlockInSectorWrite);

        getContentPane().add(pgValueBlockInSectorReadWrite, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 528, 307));

        lblFunction.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblFunction.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        lblFunction.setText("Function Error");
        getContentPane().add(lblFunction, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 340, 140, 20));

        txtFErrorCode.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        txtFErrorCode.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtFErrorCode.setText(" ");
        getContentPane().add(txtFErrorCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 340, 80, 20));

        txtFErrorExplain.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        txtFErrorExplain.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtFErrorExplain.setText(" ");
        getContentPane().add(txtFErrorExplain, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 340, 340, 20));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formInternalFrameActivated(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameActivated
        new Global().CreateKey(312, 5, 31, 29, "txtPKKey", pnlHeader);
    }//GEN-LAST:event_formInternalFrameActivated

    private void btnValueBlockInSectorReadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorReadActionPerformed
        frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);                                                  
          byte key_index                  = (byte) cboKeyIndex.getSelectedIndex() ;
          byte sector_address = 0;
          byte block_address = 0;
          IntByReference read_data = new IntByReference();
          ShortByReference value_address = new ShortByReference();

        
            if (txtVBISRSectorAddress.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRSectorAddress.requestFocus();
                return;
            }
            if (txtVBISRBlockAddress.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRBlockAddress.requestFocus();
                return;
            }
           
            sector_address = Byte.parseByte(txtVBISRSectorAddress.getText());
            block_address  = Byte.parseByte(txtVBISRBlockAddress.getText());
            txtValueBlockInSectorRead.setText("");
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorRead(read_data, value_address, sector_address, block_address, auth_mode, key_index);
            if (iFResult == DL_OK) {
                txtValueBlockInSectorRead.setText(Integer.toString(read_data.getValue()));
                txtValueAddress.setText(Short.toString(value_address.getValue()));
              Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
}//GEN-LAST:event_btnValueBlockInSectorReadActionPerformed

    private void btnValueBlockInSectorReadAKM1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorReadAKM1ActionPerformed
         frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);                                                            
          byte sector_address             = 0;
          byte block_address              = 0;
          IntByReference read_data = new IntByReference();
          ShortByReference value_address = new ShortByReference();

        
            if (txtVBISRSectorAddressAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRSectorAddressAKM1.requestFocus();
                return;
            }
            if (txtVBISRBlockAddressAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRBlockAddressAKM1.requestFocus();
                return;
            }

            sector_address = Byte.parseByte(txtVBISRSectorAddressAKM1.getText());
            block_address  = Byte.parseByte(txtVBISRBlockAddressAKM1.getText());
            txtValueBlockInSectorReadAKM1.setText("");
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorRead_AKM1(read_data, value_address, sector_address, block_address, auth_mode);
            if (iFResult == DL_OK) {
                txtValueBlockInSectorReadAKM1.setText(Integer.toString(read_data.getValue()));
                txtValueAddressAKM1.setText(Short.toString(value_address.getValue()));
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorReadAKM1ActionPerformed

    private void btnValueBlockInSectorReadAKM2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorReadAKM2ActionPerformed
         frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);                                                  
          byte key_index                  = (byte) cboKeyIndex.getSelectedIndex() ;
          byte sector_address             = 0;
          byte block_address              = 0;
          IntByReference read_data = new IntByReference();
          ShortByReference value_address = new ShortByReference();
        
            if (txtVBISRSectorAddressAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRSectorAddressAKM2.requestFocus();
                return;
            }
            if (txtVBISRBlockAddressAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRBlockAddressAKM2.requestFocus();
                return;
            }
            
            sector_address = Byte.parseByte(txtVBISRSectorAddressAKM2.getText());
            block_address  = Byte.parseByte(txtVBISRBlockAddressAKM2.getText());
            txtValueBlockInSectorReadAKM2.setText("");
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorRead_AKM2(read_data, value_address, sector_address, block_address, auth_mode);
            if (iFResult == DL_OK) {
                txtValueBlockInSectorReadAKM2.setText(Integer.toString(read_data.getValue()));
                txtValueAddressAKM2.setText(Short.toString(value_address.getValue()));
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorReadAKM2ActionPerformed

    private void btnValueBlockInSectorReadPKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorReadPKActionPerformed
         frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);                                                            
          byte sector_address             = 0;
          byte block_address              = 0;
          byte count                      = 0;
          byte[] pk_key = new byte[7];
        
          IntByReference read_data = new IntByReference();
          ShortByReference value_address = new ShortByReference();
        
            if (txtVBISRSectorAddressPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRSectorAddressPK.requestFocus();
                return;
            }
            if (txtVBISRBlockAddressPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISRBlockAddressPK.requestFocus();
                return;
            }
            for (int br = 0; br < pnlHeader.getComponentCount(); br++) {
                if (pnlHeader.getComponent(br).getName() == "txtPKKey") {
                    pk_key[count] = (byte) Integer.parseInt(((JTextField) (pnlHeader.getComponent(br))).getText());
                    count++;
                }
            }
           
            sector_address = Byte.parseByte(txtVBISRSectorAddressPK.getText());
            block_address  = Byte.parseByte(txtVBISRBlockAddressPK.getText());
            txtValueBlockInSectorReadPK.setText("");
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorRead_PK(read_data, value_address, sector_address, block_address, auth_mode, pk_key);
            if (iFResult == DL_OK) {
                txtValueBlockInSectorReadPK.setText(Integer.toString(read_data.getValue()));
                txtValueAddressPK.setText(Short.toString(value_address.getValue()));
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorReadPKActionPerformed

    private void btnValueBlockInSectorWriteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorWriteActionPerformed
        frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B); 
          byte key_index                  = (byte) cboKeyIndex.getSelectedIndex();
          byte sector_address             = 0;
          byte block_address              = 0;
          int write_data                  = 0;
          short value_address             = 0;
        
            if (txtVBISWValueData.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, ANY_DATA, "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueData.requestFocus();
                return;
            }

            if (txtVBISWSectorAddress.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWSectorAddress.requestFocus();
                return;
            }
            if (txtVBISWBlockAddress.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWBlockAddress.requestFocus();
                return;
            }
            if (txtVBISWValueAddress.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  VALUE ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueAddress.requestFocus();
                return;
            }
            
            
            sector_address = Byte.parseByte(txtVBISWSectorAddress.getText());
            block_address  = Byte.parseByte(txtVBISWBlockAddress.getText());
            write_data     = Integer.parseInt(txtVBISWValueData.getText());
            value_address  = Short.parseShort(txtVBISWValueAddress.getText());
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorWrite(write_data, value_address, sector_address, block_address, auth_mode, key_index);
            
            if (iFResult == DL_OK) {
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorWriteActionPerformed

    private void btnValueBlockInSectorWriteAKM1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorWriteAKM1ActionPerformed
        frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);
          byte sector_address             = 0;
          byte block_address              = 0;
          int write_data                  = 0;
          short value_address             = 0;
        
            if (txtVBISWValueDataAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, ANY_DATA, "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueDataAKM1.requestFocus();
                return;
            }

            if (txtVBISWSectorAddressAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWSectorAddressAKM1.requestFocus();
                return;
            }
            if (txtVBISWBlockAddressAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWBlockAddressAKM1.requestFocus();
                return;
            }
            if (txtVBISWValueAddressAKM1.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  VALUE ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueAddressAKM1.requestFocus();
                return;
            }
            
            sector_address = Byte.parseByte(txtVBISWSectorAddressAKM1.getText());
            block_address  = Byte.parseByte(txtVBISWBlockAddressAKM1.getText());
            write_data     = Integer.parseInt(txtVBISWValueDataAKM1.getText());
            value_address  = Short.parseShort(txtVBISWValueAddressAKM1.getText());
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorWrite_AKM1(write_data, value_address, sector_address, block_address, auth_mode);
            
             if (iFResult == DL_OK) {
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorWriteAKM1ActionPerformed

    private void btnValueBlockInSectorWriteAKM2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorWriteAKM2ActionPerformed
        frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);
          byte sector_address             = 0;
          byte block_address              = 0;
          int write_data                  = 0;
          short value_address             = 0;
        
            if (txtVBISWValueDataAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, ANY_DATA, "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueDataAKM2.requestFocus();
                return;
            }

            if (txtVBISWSectorAddressAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWSectorAddressAKM2.requestFocus();
                return;
            }
            if (txtVBISWBlockAddressAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWBlockAddressAKM2.requestFocus();
                return;
            }
            if (txtVBISWValueAddressAKM2.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  VALUE ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueAddressAKM2.requestFocus();
                return;
            }
           
            sector_address = Byte.parseByte(txtVBISWSectorAddressAKM2.getText());
            block_address  = Byte.parseByte(txtVBISWBlockAddressAKM2.getText());
            write_data     = Integer.parseInt(txtVBISWValueDataAKM2.getText());
            value_address  = Short.parseShort(txtVBISWValueAddressAKM2.getText());
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorWrite_AKM2(write_data, value_address, sector_address, block_address, auth_mode);
            
            if (iFResult == DL_OK) {
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorWriteAKM2ActionPerformed

    private void btnValueBlockInSectorWritePKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnValueBlockInSectorWritePKActionPerformed
        frmMain M = new frmMain();
        if (M.GetFunct() || M.GetLoop()) {
            return;
        }
        try
        {
          M.SetFunct(true);
          int iFResult                    = 0;
          byte auth_mode                  = (rbAUTH1A.isSelected() ? MIFARE_AUTHENT1A : MIFARE_AUTHENT1B);
          byte sector_address             = 0;
          byte block_address              = 0;
          int write_data                  = 0;
          short value_address             = 0;
        
            if (txtVBISWValueDataPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, ANY_DATA, "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueDataPK.requestFocus();
                return;
            }

            if (txtVBISWSectorAddressPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  SECTOR ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWSectorAddressPK.requestFocus();
                return;
            }
            if (txtVBISWBlockAddressPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  BLOCK ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWBlockAddressPK.requestFocus();
                return;
            }
            if (txtVBISWValueAddressPK.getText().trim().isEmpty()) {
                JOptionPane.showMessageDialog(rootPane, "You must enter the  VALUE ADDRESS !", "Warning !", JOptionPane.WARNING_MESSAGE);
                txtVBISWValueAddressPK.requestFocus();
                return;
            }
            
            sector_address = Byte.parseByte(txtVBISWSectorAddressPK.getText());
            block_address  = Byte.parseByte(txtVBISWBlockAddressPK.getText());
            write_data     = Integer.parseInt(txtVBISWValueDataPK.getText());
            value_address  = Short.parseShort(txtVBISWValueAddressPK.getText());
            
            iFResult = Declarations.UFrDeclarations.UFRInstance.ValueBlockInSectorWrite_PK(write_data, value_address, sector_address, block_address, auth_mode, new Global().PK_KEY(pnlHeader));
            
             if (iFResult == DL_OK) {
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_OK, FUNCT_SOUND_OK);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            } else {               
                Declarations.UFrDeclarations.UFRInstance.ReaderUISignal(FUNCT_LIGHT_ERROR,FUNCT_SOUND_ERROR);
                M.SetStatusBar(txtFErrorCode,txtFErrorExplain,iFResult);                
            }
        } catch (NumberFormatException e) {
            JOptionPane.showMessageDialog(rootPane, APPROPRIATE_FORMAT, "Error !", JOptionPane.ERROR_MESSAGE);
        } finally {
            M.SetFunct(false);            
        }
    }//GEN-LAST:event_btnValueBlockInSectorWritePKActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnValueBlockInSectorRead;
    private javax.swing.JButton btnValueBlockInSectorReadAKM1;
    private javax.swing.JButton btnValueBlockInSectorReadAKM2;
    private javax.swing.JButton btnValueBlockInSectorReadPK;
    private javax.swing.JButton btnValueBlockInSectorWrite;
    private javax.swing.JButton btnValueBlockInSectorWriteAKM1;
    private javax.swing.JButton btnValueBlockInSectorWriteAKM2;
    private javax.swing.JButton btnValueBlockInSectorWritePK;
    private javax.swing.ButtonGroup btngAUTH1AB;
    private javax.swing.JComboBox cboKeyIndex;
    private javax.swing.JCheckBox chkBlockRead2;
    private javax.swing.JCheckBox chkBlockRead3;
    private javax.swing.JCheckBox chkBlockRead4;
    private javax.swing.JCheckBox chkBlockRead5;
    private javax.swing.JCheckBox chkBlockRead6;
    private javax.swing.JCheckBox chkBlockRead7;
    private javax.swing.JCheckBox chkBlockRead8;
    private javax.swing.JCheckBox chkBlockRead9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JTextField lblFunction;
    private javax.swing.JLabel lblKeyIndex;
    private javax.swing.JLabel lblVBISRBlockAddress;
    private javax.swing.JLabel lblVBISRBlockAddressAKM1;
    private javax.swing.JLabel lblVBISRBlockAddressAKM2;
    private javax.swing.JLabel lblVBISRBlockAddressPK;
    private javax.swing.JLabel lblVBISRSectorAddress;
    private javax.swing.JLabel lblVBISRSectorAddressAKM1;
    private javax.swing.JLabel lblVBISRSectorAddressAKM2;
    private javax.swing.JLabel lblVBISRSectorAddressPK;
    private javax.swing.JLabel lblVBISReadData;
    private javax.swing.JLabel lblVBISReadDataAKM1;
    private javax.swing.JLabel lblVBISReadDataAKM2;
    private javax.swing.JLabel lblVBISReadDataPK;
    private javax.swing.JLabel lblVBISWBlockAddress;
    private javax.swing.JLabel lblVBISWBlockAddressAKM1;
    private javax.swing.JLabel lblVBISWBlockAddressAKM2;
    private javax.swing.JLabel lblVBISWBlockAddressPK;
    private javax.swing.JLabel lblVBISWSectorAddress;
    private javax.swing.JLabel lblVBISWSectorAddressAKM1;
    private javax.swing.JLabel lblVBISWSectorAddressAKM2;
    private javax.swing.JLabel lblVBISWSectorAddressPK;
    private javax.swing.JLabel lblVBISWValueAddress;
    private javax.swing.JLabel lblVBISWValueAddressAKM1;
    private javax.swing.JLabel lblVBISWValueAddressAKM2;
    private javax.swing.JLabel lblVBISWValueAddressPK;
    private javax.swing.JLabel lblVBISWValueData;
    private javax.swing.JLabel lblVBISWValueDataAKM1;
    private javax.swing.JLabel lblVBISWValueDataAKM2;
    private javax.swing.JLabel lblVBISWValueDataPK;
    private javax.swing.JLabel lblValueAddress;
    private javax.swing.JLabel lblValueAddressAKM1;
    private javax.swing.JLabel lblValueAddressAKM2;
    private javax.swing.JLabel lblValueAddressPK;
    private javax.swing.JLabel lblValueBlockInSectorRead;
    private javax.swing.JLabel lblValueBlockInSectorReadAKM1;
    private javax.swing.JLabel lblValueBlockInSectorReadAKM2;
    private javax.swing.JLabel lblValueBlockInSectorReadPK;
    private javax.swing.JLabel lblValueBlockInSectorWrite;
    private javax.swing.JLabel lblValueBlockInSectorWrite3;
    private javax.swing.JLabel lblValueBlockInSectorWriteAKM1;
    private javax.swing.JLabel lblValueBlockInSectorWriteAKM2;
    private javax.swing.JTabbedPane pgValueBlockInSectorReadWrite;
    private javax.swing.JPanel pnlHeader;
    private javax.swing.JPanel pnlValueBlockInSectorRead;
    private javax.swing.JPanel pnlValueBlockInSectorReadAKM1;
    private javax.swing.JPanel pnlValueBlockInSectorReadAKM2;
    private javax.swing.JPanel pnlValueBlockInSectorReadPK;
    private javax.swing.JPanel pnlValueBlockInSectorWrite;
    private javax.swing.JPanel pnlValueBlockInSectorWriteAKM1;
    private javax.swing.JPanel pnlValueBlockInSectorWriteAKM2;
    private javax.swing.JPanel pnlValueBlockInSectorWritePK;
    private javax.swing.JRadioButton rbAUTH1A;
    private javax.swing.JRadioButton rbAUTH1B;
    private javax.swing.JPanel tabValueBlockInSectorRead;
    private javax.swing.JPanel tabValueBlockInSectorWrite;
    private javax.swing.JTextField txtFErrorCode;
    private javax.swing.JTextField txtFErrorExplain;
    private javax.swing.JTextField txtVBISRBlockAddress;
    private javax.swing.JTextField txtVBISRBlockAddressAKM1;
    private javax.swing.JTextField txtVBISRBlockAddressAKM2;
    private javax.swing.JTextField txtVBISRBlockAddressPK;
    private javax.swing.JTextField txtVBISRSectorAddress;
    private javax.swing.JTextField txtVBISRSectorAddressAKM1;
    private javax.swing.JTextField txtVBISRSectorAddressAKM2;
    private javax.swing.JTextField txtVBISRSectorAddressPK;
    private javax.swing.JTextField txtVBISWBlockAddress;
    private javax.swing.JTextField txtVBISWBlockAddressAKM1;
    private javax.swing.JTextField txtVBISWBlockAddressAKM2;
    private javax.swing.JTextField txtVBISWBlockAddressPK;
    private javax.swing.JTextField txtVBISWSectorAddress;
    private javax.swing.JTextField txtVBISWSectorAddressAKM1;
    private javax.swing.JTextField txtVBISWSectorAddressAKM2;
    private javax.swing.JTextField txtVBISWSectorAddressPK;
    private javax.swing.JTextField txtVBISWValueAddress;
    private javax.swing.JTextField txtVBISWValueAddressAKM1;
    private javax.swing.JTextField txtVBISWValueAddressAKM2;
    private javax.swing.JTextField txtVBISWValueAddressPK;
    private javax.swing.JTextField txtVBISWValueData;
    private javax.swing.JTextField txtVBISWValueDataAKM1;
    private javax.swing.JTextField txtVBISWValueDataAKM2;
    private javax.swing.JTextField txtVBISWValueDataPK;
    private javax.swing.JTextField txtValueAddress;
    private javax.swing.JTextField txtValueAddressAKM1;
    private javax.swing.JTextField txtValueAddressAKM2;
    private javax.swing.JTextField txtValueAddressPK;
    private javax.swing.JTextField txtValueBlockInSectorRead;
    private javax.swing.JTextField txtValueBlockInSectorReadAKM1;
    private javax.swing.JTextField txtValueBlockInSectorReadAKM2;
    private javax.swing.JTextField txtValueBlockInSectorReadPK;
    // End of variables declaration//GEN-END:variables
}
