Skip to content

Instantly share code, notes, and snippets.

@dmitrybubyakin
Created March 19, 2015 10:59
Show Gist options
  • Save dmitrybubyakin/4782db87614f16e29ac5 to your computer and use it in GitHub Desktop.
Save dmitrybubyakin/4782db87614f16e29ac5 to your computer and use it in GitHub Desktop.
Code
public void Click() {
int tf1 = Integer.parseInt(TF1.getText());
int tf2 = Integer.parseInt(TF2.getText());
int tf3 = Integer.parseInt(TF3.getText());
int tf4 = Integer.parseInt(TF4.getText());
int tf5 = Integer.parseInt(TF5.getText());
int tf6 = Integer.parseInt(TF6.getText());
int tf7 = Integer.parseInt(TF7.getText());
int tf8 = Integer.parseInt(TF8.getText());
int tf9 = Integer.parseInt(TF9.getText());
int tf10 = Integer.parseInt(TF10.getText());
int tf11 = Integer.parseInt(TF11.getText());
int tf12 = Integer.parseInt(TF12.getText());
int tf13 = Integer.parseInt(TF13.getText());
int tf14 = Integer.parseInt(TF14.getText());
int tf15 = Integer.parseInt(TF15.getText());
int tf16 = Integer.parseInt(TF16.getText());
int tf17 = Integer.parseInt(TF17.getText());
int tf18 = Integer.parseInt(TF18.getText());
int tf19 = Integer.parseInt(TF19.getText());
int tf20 = Integer.parseInt(TF20.getText());
int tf21 = Integer.parseInt(TF21.getText());
int tf22 = Integer.parseInt(TF22.getText());
int tf23 = Integer.parseInt(TF23.getText());
int tf24 = Integer.parseInt(TF24.getText());
String s1 = tf1 + tf3 + tf4 + tf5 + tf6 + tf7 + tf8 + tf9 + tf14 - tf15 + 2 * tf20 + "";
String s2 = tf2 + tf12 + tf19 + tf10 - tf11 + "";
String s3 = tf1 + tf3 + tf4 + tf5 + tf6 + tf7 + tf8 + tf9 + tf14 - tf15 + tf20 + "";
String s4 = tf1 + tf3 + tf4 + tf5 + tf6 + tf7 + tf9 + tf14 + tf20 + "";
String s5 = tf1 + tf3 + tf5 + tf9 + tf14 + tf16 + tf17 + tf18 + tf20 + "";
String s6 = tf1 + tf3 + tf5 + tf9 + tf14 + tf16 + tf17 + tf18 + tf20 - tf21 - tf22 + "";
String s7 = tf1 + tf3 + tf5 + tf9 + tf14 + tf16 + tf17 + tf18 + tf20 - tf21 - tf22 - tf19 + "";
String s8 = tf1 + tf3 + tf4 + tf5 + tf6 + tf7 + tf8 + tf9 + tf14 - tf15 + 2 * tf20 + tf23 - tf24 + "";
String s9 = tf20 + tf13 + "";
AP2.setVisible(false);
AP1.setVisible(true);
if (CB11.isSelected()) {
CB1.setSelected(true);
L1.setVisible(true);
L1.setText(s1);
}
if (CB12.isSelected()) {
CB2.setSelected(true);
L2.setVisible(true);
L2.setText(s2);
}
if (CB13.isSelected()) {
CB3.setSelected(true);
L3.setVisible(true);
L3.setText(s3);
}
if (CB14.isSelected()) {
CB4.setSelected(true);
L4.setVisible(true);
L4.setText(s4);
}
if (CB15.isSelected()) {
CB5.setSelected(true);
L5.setVisible(true);
L5.setText(s5);
}
if (CB16.isSelected()) {
CB6.setSelected(true);
L6.setVisible(true);
L6.setText(s6);
}
if (CB17.isSelected()) {
CB7.setSelected(true);
L7.setVisible(true);
L7.setText(s7);
}
if (CB18.isSelected()) {
CB8.setSelected(true);
L8.setVisible(true);
L8.setText(s8);
}
if (CB19.isSelected()) {
CB9.setSelected(true);
L9.setVisible(true);
L9.setText(s9);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment