package student.tutorial;


import anywheresoftware.b4a.B4AMenuItem;
import android.app.Activity;
import android.os.Bundle;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.B4AActivity;
import anywheresoftware.b4a.ObjectWrapper;
import anywheresoftware.b4a.objects.ActivityWrapper;
import java.lang.reflect.InvocationTargetException;
import anywheresoftware.b4a.B4AUncaughtException;
import anywheresoftware.b4a.debug.*;
import java.lang.ref.WeakReference;

public class frmgame3 extends Activity implements B4AActivity{
	public static frmgame3 mostCurrent;
	static boolean afterFirstLayout;
	static boolean isFirst = true;
    private static boolean processGlobalsRun = false;
	BALayout layout;
	public static BA processBA;
	BA activityBA;
    ActivityWrapper _activity;
    java.util.ArrayList<B4AMenuItem> menuItems;
	public static final boolean fullScreen = false;
	public static final boolean includeTitle = false;
    public static WeakReference<Activity> previousOne;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (isFirst) {
			processBA = new BA(this.getApplicationContext(), null, null, "student.tutorial", "student.tutorial.frmgame3");
			processBA.loadHtSubs(this.getClass());
	        float deviceScale = getApplicationContext().getResources().getDisplayMetrics().density;
	        BALayout.setDeviceScale(deviceScale);
            
		}
		else if (previousOne != null) {
			Activity p = previousOne.get();
			if (p != null && p != this) {
                BA.LogInfo("Killing previous instance (frmgame3).");
				p.finish();
			}
		}
        processBA.runHook("oncreate", this, null);
		if (!includeTitle) {
        	this.getWindow().requestFeature(android.view.Window.FEATURE_NO_TITLE);
        }
        if (fullScreen) {
        	getWindow().setFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN,   
        			android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }
		mostCurrent = this;
        processBA.sharedProcessBA.activityBA = null;
		layout = new BALayout(this);
		setContentView(layout);
		afterFirstLayout = false;
		BA.handler.postDelayed(new WaitForLayout(), 5);

	}
	private static class WaitForLayout implements Runnable {
		public void run() {
			if (afterFirstLayout)
				return;
			if (mostCurrent == null)
				return;
            
			if (mostCurrent.layout.getWidth() == 0) {
				BA.handler.postDelayed(this, 5);
				return;
			}
			mostCurrent.layout.getLayoutParams().height = mostCurrent.layout.getHeight();
			mostCurrent.layout.getLayoutParams().width = mostCurrent.layout.getWidth();
			afterFirstLayout = true;
			mostCurrent.afterFirstLayout();
		}
	}
	private void afterFirstLayout() {
        if (this != mostCurrent)
			return;
		activityBA = new BA(this, layout, processBA, "student.tutorial", "student.tutorial.frmgame3");
        
        processBA.sharedProcessBA.activityBA = new java.lang.ref.WeakReference<BA>(activityBA);
        anywheresoftware.b4a.objects.ViewWrapper.lastId = 0;
        _activity = new ActivityWrapper(activityBA, "activity");
        anywheresoftware.b4a.Msgbox.isDismissing = false;
        if (BA.isShellModeRuntimeCheck(processBA)) {
			if (isFirst)
				processBA.raiseEvent2(null, true, "SHELL", false);
			processBA.raiseEvent2(null, true, "CREATE", true, "student.tutorial.frmgame3", processBA, activityBA, _activity, anywheresoftware.b4a.keywords.Common.Density, mostCurrent);
			_activity.reinitializeForShell(activityBA, "activity");
		}
        initializeProcessGlobals();		
        initializeGlobals();
        
        BA.LogInfo("** Activity (frmgame3) Create, isFirst = " + isFirst + " **");
        processBA.raiseEvent2(null, true, "activity_create", false, isFirst);
		isFirst = false;
		if (this != mostCurrent)
			return;
        processBA.setActivityPaused(false);
        BA.LogInfo("** Activity (frmgame3) Resume **");
        processBA.raiseEvent(null, "activity_resume");
        if (android.os.Build.VERSION.SDK_INT >= 11) {
			try {
				android.app.Activity.class.getMethod("invalidateOptionsMenu").invoke(this,(Object[]) null);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

	}
	public void addMenuItem(B4AMenuItem item) {
		if (menuItems == null)
			menuItems = new java.util.ArrayList<B4AMenuItem>();
		menuItems.add(item);
	}
	@Override
	public boolean onCreateOptionsMenu(android.view.Menu menu) {
		super.onCreateOptionsMenu(menu);
        try {
            if (processBA.subExists("activity_actionbarhomeclick")) {
                Class.forName("android.app.ActionBar").getMethod("setHomeButtonEnabled", boolean.class).invoke(
                    getClass().getMethod("getActionBar").invoke(this), true);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (processBA.runHook("oncreateoptionsmenu", this, new Object[] {menu}))
            return true;
		if (menuItems == null)
			return false;
		for (B4AMenuItem bmi : menuItems) {
			android.view.MenuItem mi = menu.add(bmi.title);
			if (bmi.drawable != null)
				mi.setIcon(bmi.drawable);
            if (android.os.Build.VERSION.SDK_INT >= 11) {
				try {
                    if (bmi.addToBar) {
				        android.view.MenuItem.class.getMethod("setShowAsAction", int.class).invoke(mi, 1);
                    }
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			mi.setOnMenuItemClickListener(new B4AMenuItemsClickListener(bmi.eventName.toLowerCase(BA.cul)));
		}
        
		return true;
	}   
 @Override
 public boolean onOptionsItemSelected(android.view.MenuItem item) {
    if (item.getItemId() == 16908332) {
        processBA.raiseEvent(null, "activity_actionbarhomeclick");
        return true;
    }
    else
        return super.onOptionsItemSelected(item); 
}
@Override
 public boolean onPrepareOptionsMenu(android.view.Menu menu) {
    super.onPrepareOptionsMenu(menu);
    processBA.runHook("onprepareoptionsmenu", this, new Object[] {menu});
    return true;
    
 }
 protected void onStart() {
    super.onStart();
    processBA.runHook("onstart", this, null);
}
 protected void onStop() {
    super.onStop();
    processBA.runHook("onstop", this, null);
}
    public void onWindowFocusChanged(boolean hasFocus) {
       super.onWindowFocusChanged(hasFocus);
       if (processBA.subExists("activity_windowfocuschanged"))
           processBA.raiseEvent2(null, true, "activity_windowfocuschanged", false, hasFocus);
    }
	private class B4AMenuItemsClickListener implements android.view.MenuItem.OnMenuItemClickListener {
		private final String eventName;
		public B4AMenuItemsClickListener(String eventName) {
			this.eventName = eventName;
		}
		public boolean onMenuItemClick(android.view.MenuItem item) {
			processBA.raiseEvent(item.getTitle(), eventName + "_click");
			return true;
		}
	}
    public static Class<?> getObject() {
		return frmgame3.class;
	}
    private Boolean onKeySubExist = null;
    private Boolean onKeyUpSubExist = null;
	@Override
	public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
		if (onKeySubExist == null)
			onKeySubExist = processBA.subExists("activity_keypress");
		if (onKeySubExist) {
			if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK &&
					android.os.Build.VERSION.SDK_INT >= 18) {
				HandleKeyDelayed hk = new HandleKeyDelayed();
				hk.kc = keyCode;
				BA.handler.post(hk);
				return true;
			}
			else {
				boolean res = new HandleKeyDelayed().runDirectly(keyCode);
				if (res)
					return true;
			}
		}
		return super.onKeyDown(keyCode, event);
	}
	private class HandleKeyDelayed implements Runnable {
		int kc;
		public void run() {
			runDirectly(kc);
		}
		public boolean runDirectly(int keyCode) {
			Boolean res =  (Boolean)processBA.raiseEvent2(_activity, false, "activity_keypress", false, keyCode);
			if (res == null || res == true) {
                return true;
            }
            else if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK) {
				finish();
				return true;
			}
            return false;
		}
		
	}
    @Override
	public boolean onKeyUp(int keyCode, android.view.KeyEvent event) {
		if (onKeyUpSubExist == null)
			onKeyUpSubExist = processBA.subExists("activity_keyup");
		if (onKeyUpSubExist) {
			Boolean res =  (Boolean)processBA.raiseEvent2(_activity, false, "activity_keyup", false, keyCode);
			if (res == null || res == true)
				return true;
		}
		return super.onKeyUp(keyCode, event);
	}
	@Override
	public void onNewIntent(android.content.Intent intent) {
        super.onNewIntent(intent);
		this.setIntent(intent);
        processBA.runHook("onnewintent", this, new Object[] {intent});
	}
    @Override 
	public void onPause() {
		super.onPause();
        if (_activity == null) //workaround for emulator bug (Issue 2423)
            return;
		anywheresoftware.b4a.Msgbox.dismiss(true);
        BA.LogInfo("** Activity (frmgame3) Pause, UserClosed = " + activityBA.activity.isFinishing() + " **");
        processBA.raiseEvent2(_activity, true, "activity_pause", false, activityBA.activity.isFinishing());		
        processBA.setActivityPaused(true);
        mostCurrent = null;
        if (!activityBA.activity.isFinishing())
			previousOne = new WeakReference<Activity>(this);
        anywheresoftware.b4a.Msgbox.isDismissing = false;
        processBA.runHook("onpause", this, null);
	}

	@Override
	public void onDestroy() {
        super.onDestroy();
		previousOne = null;
        processBA.runHook("ondestroy", this, null);
	}
    @Override 
	public void onResume() {
		super.onResume();
        mostCurrent = this;
        anywheresoftware.b4a.Msgbox.isDismissing = false;
        if (activityBA != null) { //will be null during activity create (which waits for AfterLayout).
        	ResumeMessage rm = new ResumeMessage(mostCurrent);
        	BA.handler.post(rm);
        }
        processBA.runHook("onresume", this, null);
	}
    private static class ResumeMessage implements Runnable {
    	private final WeakReference<Activity> activity;
    	public ResumeMessage(Activity activity) {
    		this.activity = new WeakReference<Activity>(activity);
    	}
		public void run() {
			if (mostCurrent == null || mostCurrent != activity.get())
				return;
			processBA.setActivityPaused(false);
            BA.LogInfo("** Activity (frmgame3) Resume **");
		    processBA.raiseEvent(mostCurrent._activity, "activity_resume", (Object[])null);
		}
    }
	@Override
	protected void onActivityResult(int requestCode, int resultCode,
	      android.content.Intent data) {
		processBA.onActivityResult(requestCode, resultCode, data);
        processBA.runHook("onactivityresult", this, new Object[] {requestCode, resultCode});
	}
	private static void initializeGlobals() {
		processBA.raiseEvent2(null, true, "globals", false, (Object[])null);
	}

public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4a.objects.Timer _tmr2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblnum1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblnum2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblresult = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn3 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn4 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn5 = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblscore = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblstage = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblseconds = null;
public anywheresoftware.b4a.objects.LabelWrapper _lblsecond = null;
public static int _stimeout = 0;
public static int _num1 = 0;
public static int _num2 = 0;
public static int _res = 0;
public static String _operating = "";
public anywheresoftware.b4a.objects.LabelWrapper _lblop = null;
public anywheresoftware.b4a.objects.LabelWrapper _lbldivid = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imgbackground = null;
public student.tutorial.main _main = null;
public student.tutorial.frmgame1 _frmgame1 = null;
public student.tutorial.common _common = null;
public student.tutorial.settings _settings = null;
public student.tutorial.frmgame1_result _frmgame1_result = null;
public student.tutorial.frmgame1_final _frmgame1_final = null;
public student.tutorial.frmgame2 _frmgame2 = null;
public student.tutorial.frmgame4 _frmgame4 = null;
public student.tutorial.frmgame5 _frmgame5 = null;
public student.tutorial.frmgame6 _frmgame6 = null;
public student.tutorial.frmgame7 _frmgame7 = null;
public student.tutorial.frmcontact _frmcontact = null;
public student.tutorial.frmgame8 _frmgame8 = null;
public student.tutorial.frmabout _frmabout = null;
public student.tutorial.frmgame9 _frmgame9 = null;
public student.tutorial.setting _setting = null;
public student.tutorial.frmstatistic _frmstatistic = null;

public static void initializeProcessGlobals() {
             try {
                Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
}
public static String  _activity_create(boolean _firsttime) throws Exception{
int _op1 = 0;
 //BA.debugLineNum = 36;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
 //BA.debugLineNum = 37;BA.debugLine="Dim op1 As Int";
_op1 = 0;
 //BA.debugLineNum = 38;BA.debugLine="common.playbgGame1";
mostCurrent._common._playbggame1(mostCurrent.activityBA);
 //BA.debugLineNum = 39;BA.debugLine="Activity.LoadLayout(\"game2\")";
mostCurrent._activity.LoadLayout("game2",mostCurrent.activityBA);
 //BA.debugLineNum = 40;BA.debugLine="common.changeTheme(imgbackground)";
mostCurrent._common._changetheme(mostCurrent.activityBA,mostCurrent._imgbackground);
 //BA.debugLineNum = 41;BA.debugLine="lblnum1.Typeface = Typeface.LoadFromAssets(\"BNazan";
mostCurrent._lblnum1.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 42;BA.debugLine="lblnum2.Typeface = Typeface.LoadFromAssets(\"BNazan";
mostCurrent._lblnum2.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 43;BA.debugLine="lblresult.Typeface = Typeface.LoadFromAssets(\"BNaz";
mostCurrent._lblresult.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 44;BA.debugLine="lblscore.Typeface = Typeface.LoadFromAssets(\"BNaza";
mostCurrent._lblscore.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 45;BA.debugLine="lblsecond.Typeface = Typeface.LoadFromAssets(\"BNaz";
mostCurrent._lblsecond.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 46;BA.debugLine="lblseconds.Typeface = Typeface.LoadFromAssets(\"BNa";
mostCurrent._lblseconds.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 47;BA.debugLine="lblscore.Typeface = Typeface.LoadFromAssets(\"BNaza";
mostCurrent._lblscore.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 48;BA.debugLine="lblstage.Typeface = Typeface.LoadFromAssets(\"BNaza";
mostCurrent._lblstage.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 49;BA.debugLine="btn1.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
mostCurrent._btn1.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 50;BA.debugLine="btn2.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
mostCurrent._btn2.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 51;BA.debugLine="btn3.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
mostCurrent._btn3.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 52;BA.debugLine="btn4.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
mostCurrent._btn4.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 53;BA.debugLine="btn5.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
mostCurrent._btn5.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 54;BA.debugLine="settings.loadDefaultSetting(\"3\")";
mostCurrent._settings._loaddefaultsetting(mostCurrent.activityBA,"3");
 //BA.debugLineNum = 55;BA.debugLine="sTimeout = settings.getData(\"settingGame3.app\",\"ti";
_stimeout = (int)(Double.parseDouble(mostCurrent._settings._getdata(mostCurrent.activityBA,"settingGame3.app","timeout")));
 //BA.debugLineNum = 56;BA.debugLine="lblstage.Text = settings.getData(\"settingGame3.app";
mostCurrent._lblstage.setText((Object)(mostCurrent._settings._getdata(mostCurrent.activityBA,"settingGame3.app","stage")));
 //BA.debugLineNum = 57;BA.debugLine="If tmr2.IsInitialized = False Then";
if (_tmr2.IsInitialized()==anywheresoftware.b4a.keywords.Common.False) { 
 //BA.debugLineNum = 58;BA.debugLine="tmr2.Initialize(\"tmr2\",1)";
_tmr2.Initialize(processBA,"tmr2",(long) (1));
 };
 //BA.debugLineNum = 60;BA.debugLine="tmr2.Enabled = True";
_tmr2.setEnabled(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 61;BA.debugLine="Select Case lblstage.Text";
switch (BA.switchObjectToInt(mostCurrent._lblstage.getText(),BA.NumberToString(1),BA.NumberToString(0),BA.NumberToString(2),BA.NumberToString(3),BA.NumberToString(4),BA.NumberToString(5),BA.NumberToString(6),BA.NumberToString(7),BA.NumberToString(8),BA.NumberToString(9),BA.NumberToString(10),BA.NumberToString(11),BA.NumberToString(12))) {
case 0:
 break;
case 1:
 //BA.debugLineNum = 64;BA.debugLine="lblnum1.Text = Rnd(0,5)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (5))));
 //BA.debugLineNum = 65;BA.debugLine="lblnum2.Text = Rnd(0,5)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (5))));
 break;
case 2:
 //BA.debugLineNum = 67;BA.debugLine="lblnum1.Text = Rnd(0,10)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (10))));
 //BA.debugLineNum = 68;BA.debugLine="lblnum2.Text = Rnd(0,10)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (10))));
 break;
case 3:
 //BA.debugLineNum = 70;BA.debugLine="lblnum1.Text = Rnd(0,20)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (20))));
 //BA.debugLineNum = 71;BA.debugLine="lblnum2.Text = Rnd(0,20)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (20))));
 break;
case 4:
 //BA.debugLineNum = 73;BA.debugLine="lblnum1.Text = Rnd(0,25)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (25))));
 //BA.debugLineNum = 74;BA.debugLine="lblnum2.Text = Rnd(0,25)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (25))));
 break;
case 5:
 //BA.debugLineNum = 76;BA.debugLine="lblnum1.Text = Rnd(0,35)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (35))));
 //BA.debugLineNum = 77;BA.debugLine="lblnum2.Text = Rnd(0,35)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (35))));
 break;
case 6:
 //BA.debugLineNum = 79;BA.debugLine="lblnum1.Text = Rnd(0,45)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (45))));
 //BA.debugLineNum = 80;BA.debugLine="lblnum2.Text = Rnd(0,45)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (45))));
 break;
case 7:
 //BA.debugLineNum = 82;BA.debugLine="lblnum1.Text = Rnd(0,65)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (65))));
 //BA.debugLineNum = 83;BA.debugLine="lblnum2.Text = Rnd(0,65)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (65))));
 break;
case 8:
 //BA.debugLineNum = 85;BA.debugLine="lblnum1.Text = Rnd(0,75)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (75))));
 //BA.debugLineNum = 86;BA.debugLine="lblnum2.Text = Rnd(0,75)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (75))));
 break;
case 9:
 //BA.debugLineNum = 88;BA.debugLine="lblnum1.Text = Rnd(0,85)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (85))));
 //BA.debugLineNum = 89;BA.debugLine="lblnum2.Text = Rnd(0,85)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (85))));
 break;
case 10:
 //BA.debugLineNum = 91;BA.debugLine="lblnum1.Text = Rnd(0,95)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (95))));
 //BA.debugLineNum = 92;BA.debugLine="lblnum2.Text = Rnd(0,95)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (95))));
 break;
case 11:
 //BA.debugLineNum = 94;BA.debugLine="lblnum1.Text = Rnd(0,150)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (150))));
 //BA.debugLineNum = 95;BA.debugLine="lblnum2.Text = Rnd(0,150)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (150))));
 break;
case 12:
 //BA.debugLineNum = 97;BA.debugLine="lblnum1.Text = Rnd(0,250)";
mostCurrent._lblnum1.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (250))));
 //BA.debugLineNum = 98;BA.debugLine="lblnum2.Text = Rnd(0,250)";
mostCurrent._lblnum2.setText((Object)(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (250))));
 break;
}
;
 //BA.debugLineNum = 100;BA.debugLine="num1 = lblnum1.Text";
_num1 = (int)(Double.parseDouble(mostCurrent._lblnum1.getText()));
 //BA.debugLineNum = 101;BA.debugLine="num2 = lblnum2.Text";
_num2 = (int)(Double.parseDouble(mostCurrent._lblnum2.getText()));
 //BA.debugLineNum = 102;BA.debugLine="If lblstage.Text > 5 Then";
if ((double)(Double.parseDouble(mostCurrent._lblstage.getText()))>5) { 
 //BA.debugLineNum = 103;BA.debugLine="op1 = Rnd(1,4)";
_op1 = anywheresoftware.b4a.keywords.Common.Rnd((int) (1),(int) (4));
 }else {
 //BA.debugLineNum = 105;BA.debugLine="op1 = Rnd(1,2)";
_op1 = anywheresoftware.b4a.keywords.Common.Rnd((int) (1),(int) (2));
 };
 //BA.debugLineNum = 107;BA.debugLine="Select Case op1";
switch (_op1) {
case 1:
 //BA.debugLineNum = 109;BA.debugLine="res = num1+num2";
_res = (int) (_num1+_num2);
 //BA.debugLineNum = 110;BA.debugLine="lblop.Text = \"+\"";
mostCurrent._lblop.setText((Object)("+"));
 //BA.debugLineNum = 111;BA.debugLine="operating = \"+\"";
mostCurrent._operating = "+";
 break;
case 2:
 //BA.debugLineNum = 113;BA.debugLine="res = num1-num2";
_res = (int) (_num1-_num2);
 //BA.debugLineNum = 114;BA.debugLine="lblop.Text = \"-\"";
mostCurrent._lblop.setText((Object)("-"));
 //BA.debugLineNum = 115;BA.debugLine="operating = \"-\"";
mostCurrent._operating = "-";
 break;
case 3:
 //BA.debugLineNum = 117;BA.debugLine="res = num1*num2";
_res = (int) (_num1*_num2);
 //BA.debugLineNum = 118;BA.debugLine="lblop.Text = \"*\"";
mostCurrent._lblop.setText((Object)("*"));
 //BA.debugLineNum = 119;BA.debugLine="operating = \"*\"";
mostCurrent._operating = "*";
 break;
case 4:
 //BA.debugLineNum = 121;BA.debugLine="res = num1/num2";
_res = (int) (_num1/(double)_num2);
 //BA.debugLineNum = 122;BA.debugLine="lblop.Text = \"/\"";
mostCurrent._lblop.setText((Object)("/"));
 //BA.debugLineNum = 123;BA.debugLine="operating = \"/\"";
mostCurrent._operating = "/";
 break;
}
;
 //BA.debugLineNum = 125;BA.debugLine="loadResultAction";
_loadresultaction();
 //BA.debugLineNum = 131;BA.debugLine="loadMenu";
_loadmenu();
 //BA.debugLineNum = 132;BA.debugLine="End Sub";
return "";
}
public static boolean  _activity_keypress(int _keycode) throws Exception{
 //BA.debugLineNum = 269;BA.debugLine="Sub Activity_KeyPress (KeyCode As Int) As Boolean";
 //BA.debugLineNum = 270;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_BACK Then";
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { 
 //BA.debugLineNum = 271;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 272;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 273;BA.debugLine="StartActivity(Main)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._main.getObject()));
 };
 //BA.debugLineNum = 275;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_MENU Then";
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_MENU) { 
 //BA.debugLineNum = 276;BA.debugLine="Activity.OpenMenu";
mostCurrent._activity.OpenMenu();
 };
 //BA.debugLineNum = 278;BA.debugLine="End Sub";
return false;
}
public static String  _activity_pause(boolean _userclosed) throws Exception{
 //BA.debugLineNum = 210;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
 //BA.debugLineNum = 212;BA.debugLine="End Sub";
return "";
}
public static String  _activity_resume() throws Exception{
 //BA.debugLineNum = 206;BA.debugLine="Sub Activity_Resume";
 //BA.debugLineNum = 208;BA.debugLine="End Sub";
return "";
}
public static String  _btn1_click() throws Exception{
 //BA.debugLineNum = 242;BA.debugLine="Sub btn1_Click";
 //BA.debugLineNum = 243;BA.debugLine="If res <> btn1.Text Then";
if (_res!=(double)(Double.parseDouble(mostCurrent._btn1.getText()))) { 
 //BA.debugLineNum = 244;BA.debugLine="wrongItem(btn1)";
_wrongitem(mostCurrent._btn1);
 }else {
 //BA.debugLineNum = 246;BA.debugLine="stateGame(\"win\")";
_stategame("win");
 };
 //BA.debugLineNum = 248;BA.debugLine="End Sub";
return "";
}
public static String  _btn2_click() throws Exception{
 //BA.debugLineNum = 235;BA.debugLine="Sub btn2_Click";
 //BA.debugLineNum = 236;BA.debugLine="If res <> btn2.Text Then";
if (_res!=(double)(Double.parseDouble(mostCurrent._btn2.getText()))) { 
 //BA.debugLineNum = 237;BA.debugLine="wrongItem(btn2)";
_wrongitem(mostCurrent._btn2);
 }else {
 //BA.debugLineNum = 239;BA.debugLine="stateGame(\"win\")";
_stategame("win");
 };
 //BA.debugLineNum = 241;BA.debugLine="End Sub";
return "";
}
public static String  _btn3_click() throws Exception{
 //BA.debugLineNum = 228;BA.debugLine="Sub btn3_Click";
 //BA.debugLineNum = 229;BA.debugLine="If res <> btn3.Text Then";
if (_res!=(double)(Double.parseDouble(mostCurrent._btn3.getText()))) { 
 //BA.debugLineNum = 230;BA.debugLine="wrongItem(btn3)";
_wrongitem(mostCurrent._btn3);
 }else {
 //BA.debugLineNum = 232;BA.debugLine="stateGame(\"win\")";
_stategame("win");
 };
 //BA.debugLineNum = 234;BA.debugLine="End Sub";
return "";
}
public static String  _btn4_click() throws Exception{
 //BA.debugLineNum = 221;BA.debugLine="Sub btn4_Click";
 //BA.debugLineNum = 222;BA.debugLine="If res <> btn4.Text Then";
if (_res!=(double)(Double.parseDouble(mostCurrent._btn4.getText()))) { 
 //BA.debugLineNum = 223;BA.debugLine="wrongItem(btn4)";
_wrongitem(mostCurrent._btn4);
 }else {
 //BA.debugLineNum = 225;BA.debugLine="stateGame(\"win\")";
_stategame("win");
 };
 //BA.debugLineNum = 227;BA.debugLine="End Sub";
return "";
}
public static String  _btn5_click() throws Exception{
 //BA.debugLineNum = 214;BA.debugLine="Sub btn5_Click";
 //BA.debugLineNum = 215;BA.debugLine="If res <> btn5.Text Then";
if (_res!=(double)(Double.parseDouble(mostCurrent._btn5.getText()))) { 
 //BA.debugLineNum = 216;BA.debugLine="wrongItem(btn5)";
_wrongitem(mostCurrent._btn5);
 }else {
 //BA.debugLineNum = 218;BA.debugLine="stateGame(\"win\")";
_stategame("win");
 };
 //BA.debugLineNum = 220;BA.debugLine="End Sub";
return "";
}
public static String  _btnabout_click() throws Exception{
 //BA.debugLineNum = 142;BA.debugLine="Sub btnabout_Click";
 //BA.debugLineNum = 143;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 144;BA.debugLine="StartActivity(frmabout)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmabout.getObject()));
 //BA.debugLineNum = 145;BA.debugLine="End Sub";
return "";
}
public static String  _btnsetting_click() throws Exception{
 //BA.debugLineNum = 138;BA.debugLine="Sub btnsetting_Click";
 //BA.debugLineNum = 139;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 140;BA.debugLine="StartActivity(setting)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._setting.getObject()));
 //BA.debugLineNum = 141;BA.debugLine="End Sub";
return "";
}
public static String  _exit1_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 146;BA.debugLine="Sub exit1_Click";
 //BA.debugLineNum = 147;BA.debugLine="Dim i As Int";
_i = 0;
 //BA.debugLineNum = 148;BA.debugLine="i = Msgbox2(\"آیا مایل به خروج هستید؟\",\"خروج\",\"آری\"";
_i = anywheresoftware.b4a.keywords.Common.Msgbox2("آیا مایل به خروج هستید؟","خروج","آری","خیر","",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.Null),mostCurrent.activityBA);
 //BA.debugLineNum = 149;BA.debugLine="If i = DialogResponse.POSITIVE Then";
if (_i==anywheresoftware.b4a.keywords.Common.DialogResponse.POSITIVE) { 
 //BA.debugLineNum = 150;BA.debugLine="ExitApplication";
anywheresoftware.b4a.keywords.Common.ExitApplication();
 };
 //BA.debugLineNum = 152;BA.debugLine="End Sub";
return "";
}
public static String  _globals() throws Exception{
 //BA.debugLineNum = 12;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 16;BA.debugLine="Dim lblnum1 As Label";
mostCurrent._lblnum1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim lblnum2 As Label";
mostCurrent._lblnum2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim lblresult As Label";
mostCurrent._lblresult = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim btn1 As Button";
mostCurrent._btn1 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim btn2 As Button";
mostCurrent._btn2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim btn3 As Button";
mostCurrent._btn3 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim btn4 As Button";
mostCurrent._btn4 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim btn5 As Button";
mostCurrent._btn5 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim lblscore As Label";
mostCurrent._lblscore = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim lblstage As Label";
mostCurrent._lblstage = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim lblseconds As Label";
mostCurrent._lblseconds = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim lblsecond As Label";
mostCurrent._lblsecond = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim sTimeout As Int";
_stimeout = 0;
 //BA.debugLineNum = 29;BA.debugLine="Dim num1,num2,res As Int";
_num1 = 0;
_num2 = 0;
_res = 0;
 //BA.debugLineNum = 30;BA.debugLine="Dim operating As String";
mostCurrent._operating = "";
 //BA.debugLineNum = 31;BA.debugLine="Dim lblop As Label";
mostCurrent._lblop = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Dim lbldivid As Label";
mostCurrent._lbldivid = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Dim imgbackground As ImageView";
mostCurrent._imgbackground = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 34;BA.debugLine="End Sub";
return "";
}
public static String  _loadmenu() throws Exception{
 //BA.debugLineNum = 133;BA.debugLine="Sub loadMenu";
 //BA.debugLineNum = 134;BA.debugLine="Activity.AddMenuItem2(\"تنظیمات\",\"btnsetting\",LoadB";
mostCurrent._activity.AddMenuItem2("تنظیمات","btnsetting",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),"setting.png").getObject()));
 //BA.debugLineNum = 135;BA.debugLine="Activity.AddMenuItem2(\"درباره ما\",\"btnabout\",LoadB";
mostCurrent._activity.AddMenuItem2("درباره ما","btnabout",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),"about.png").getObject()));
 //BA.debugLineNum = 136;BA.debugLine="Activity.AddMenuItem2(\"خروج\",\"exit1\",LoadBitmap(Fi";
mostCurrent._activity.AddMenuItem2("خروج","exit1",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),"exit.png").getObject()));
 //BA.debugLineNum = 137;BA.debugLine="End Sub";
return "";
}
public static String  _loadresultaction() throws Exception{
String[] _k1 = null;
 //BA.debugLineNum = 175;BA.debugLine="Sub loadResultAction";
 //BA.debugLineNum = 176;BA.debugLine="Dim k1(5) As String";
_k1 = new String[(int) (5)];
java.util.Arrays.fill(_k1,"");
 //BA.debugLineNum = 177;BA.debugLine="k1(0) = Rnd(0,99)";
_k1[(int) (0)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (99)));
 //BA.debugLineNum = 178;BA.debugLine="If num1 > 0 Then";
if (_num1>0) { 
 //BA.debugLineNum = 179;BA.debugLine="k1(1) = Rnd(0,num1)";
_k1[(int) (1)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),_num1));
 }else {
 //BA.debugLineNum = 181;BA.debugLine="k1(1) = Rnd(0,num1+10)";
_k1[(int) (1)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (_num1+10)));
 };
 //BA.debugLineNum = 183;BA.debugLine="If num2 > 0 Then";
if (_num2>0) { 
 //BA.debugLineNum = 184;BA.debugLine="k1(2) = Rnd(0,num2)";
_k1[(int) (2)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),_num2));
 }else {
 //BA.debugLineNum = 186;BA.debugLine="k1(2) = Rnd(0,num2+10)";
_k1[(int) (2)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (0),(int) (_num2+10)));
 };
 //BA.debugLineNum = 188;BA.debugLine="Select Case operating";
switch (BA.switchObjectToInt(mostCurrent._operating,"+","-","/","*")) {
case 0:
 //BA.debugLineNum = 190;BA.debugLine="k1(3) = num1 + num2";
_k1[(int) (3)] = BA.NumberToString(_num1+_num2);
 break;
case 1:
 //BA.debugLineNum = 192;BA.debugLine="k1(3) = num1 - num2";
_k1[(int) (3)] = BA.NumberToString(_num1-_num2);
 break;
case 2:
 //BA.debugLineNum = 194;BA.debugLine="k1(3) = num1 / num2";
_k1[(int) (3)] = BA.NumberToString(_num1/(double)_num2);
 break;
case 3:
 //BA.debugLineNum = 196;BA.debugLine="k1(3) = num1 * num2";
_k1[(int) (3)] = BA.NumberToString(_num1*_num2);
 break;
}
;
 //BA.debugLineNum = 198;BA.debugLine="k1(4) = Rnd(num1,99+num1)";
_k1[(int) (4)] = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd(_num1,(int) (99+_num1)));
 //BA.debugLineNum = 199;BA.debugLine="common.ShuffleArray(k1)";
mostCurrent._common._shufflearray(mostCurrent.activityBA,_k1);
 //BA.debugLineNum = 200;BA.debugLine="btn1.Text = k1(0)";
mostCurrent._btn1.setText((Object)(_k1[(int) (0)]));
 //BA.debugLineNum = 201;BA.debugLine="btn2.Text = k1(1)";
mostCurrent._btn2.setText((Object)(_k1[(int) (1)]));
 //BA.debugLineNum = 202;BA.debugLine="btn3.Text = k1(2)";
mostCurrent._btn3.setText((Object)(_k1[(int) (2)]));
 //BA.debugLineNum = 203;BA.debugLine="btn4.Text = k1(3)";
mostCurrent._btn4.setText((Object)(_k1[(int) (3)]));
 //BA.debugLineNum = 204;BA.debugLine="btn5.Text = k1(4)";
mostCurrent._btn5.setText((Object)(_k1[(int) (4)]));
 //BA.debugLineNum = 205;BA.debugLine="End Sub";
return "";
}
public static String  _process_globals() throws Exception{
 //BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 9;BA.debugLine="Dim tmr2 As Timer";
_tmr2 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 10;BA.debugLine="End Sub";
return "";
}
public static String  _stategame(String _sstate1) throws Exception{
 //BA.debugLineNum = 258;BA.debugLine="Sub stateGame(sState1 As String)";
 //BA.debugLineNum = 259;BA.debugLine="tmr2.Enabled = False";
_tmr2.setEnabled(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 260;BA.debugLine="frmGame1_result.sStage = lblstage.Text";
mostCurrent._frmgame1_result._sstage = mostCurrent._lblstage.getText();
 //BA.debugLineNum = 261;BA.debugLine="frmGame1_result.sTime = \"زمان سپری شده \"  & lbl";
mostCurrent._frmgame1_result._stime = "زمان سپری شده "+mostCurrent._lblsecond.getText()+" : "+mostCurrent._lblseconds.getText()+" ثانیه";
 //BA.debugLineNum = 262;BA.debugLine="frmGame1_result.sState = sState1";
mostCurrent._frmgame1_result._sstate = _sstate1;
 //BA.debugLineNum = 263;BA.debugLine="frmGame1_result.sScore = lblscore.Text";
mostCurrent._frmgame1_result._sscore = mostCurrent._lblscore.getText();
 //BA.debugLineNum = 264;BA.debugLine="frmGame1_result.sGameNumber = \"3\"";
mostCurrent._frmgame1_result._sgamenumber = "3";
 //BA.debugLineNum = 265;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 266;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 267;BA.debugLine="StartActivity(frmGame1_result)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmgame1_result.getObject()));
 //BA.debugLineNum = 268;BA.debugLine="End Sub";
return "";
}
public static String  _tmr2_tick() throws Exception{
int _k1 = 0;
 //BA.debugLineNum = 153;BA.debugLine="Sub tmr2_Tick";
 //BA.debugLineNum = 154;BA.debugLine="Dim k1 As Int";
_k1 = 0;
 //BA.debugLineNum = 155;BA.debugLine="If lblsecond.Text > sTimeout Then";
if ((double)(Double.parseDouble(mostCurrent._lblsecond.getText()))>_stimeout) { 
 //BA.debugLineNum = 156;BA.debugLine="tmr2.Enabled = False";
_tmr2.setEnabled(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 157;BA.debugLine="frmGame1_result.sTime = \"زمان سپری شده \"  & lbl";
mostCurrent._frmgame1_result._stime = "زمان سپری شده "+mostCurrent._lblsecond.getText()+" : "+mostCurrent._lblseconds.getText()+" ثانیه";
 //BA.debugLineNum = 158;BA.debugLine="frmGame1_result.sState = \"unwin\"";
mostCurrent._frmgame1_result._sstate = "unwin";
 //BA.debugLineNum = 159;BA.debugLine="frmGame1_result.sScore = lblscore.Text";
mostCurrent._frmgame1_result._sscore = mostCurrent._lblscore.getText();
 //BA.debugLineNum = 160;BA.debugLine="frmGame1_result.sGameNumber = \"3\"";
mostCurrent._frmgame1_result._sgamenumber = "3";
 //BA.debugLineNum = 161;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 162;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 163;BA.debugLine="StartActivity(frmGame1_result)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmgame1_result.getObject()));
 };
 //BA.debugLineNum = 166;BA.debugLine="k1 = lblseconds.Text + 1";
_k1 = (int) ((double)(Double.parseDouble(mostCurrent._lblseconds.getText()))+1);
 //BA.debugLineNum = 167;BA.debugLine="lblseconds.Text = k1";
mostCurrent._lblseconds.setText((Object)(_k1));
 //BA.debugLineNum = 168;BA.debugLine="If lblseconds.Text > 60 Then";
if ((double)(Double.parseDouble(mostCurrent._lblseconds.getText()))>60) { 
 //BA.debugLineNum = 169;BA.debugLine="lblseconds.Text = 0";
mostCurrent._lblseconds.setText((Object)(0));
 //BA.debugLineNum = 170;BA.debugLine="k1 = lblsecond.Text + 1";
_k1 = (int) ((double)(Double.parseDouble(mostCurrent._lblsecond.getText()))+1);
 //BA.debugLineNum = 171;BA.debugLine="lblsecond.Text = k1";
mostCurrent._lblsecond.setText((Object)(_k1));
 };
 //BA.debugLineNum = 174;BA.debugLine="End Sub";
return "";
}
public static String  _wrongitem(anywheresoftware.b4a.objects.ButtonWrapper _c1) throws Exception{
int _t1 = 0;
 //BA.debugLineNum = 249;BA.debugLine="Sub wrongItem(c1 As Button)";
 //BA.debugLineNum = 250;BA.debugLine="Dim t1 As Int";
_t1 = 0;
 //BA.debugLineNum = 251;BA.debugLine="common.playAudio(\"wrong.wav\")";
mostCurrent._common._playaudio(mostCurrent.activityBA,"wrong.wav");
 //BA.debugLineNum = 252;BA.debugLine="common.playAnimation(c1,\"scale\",1000)";
mostCurrent._common._playanimation(mostCurrent.activityBA,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_c1.getObject())),"scale",(int) (1000));
 //BA.debugLineNum = 253;BA.debugLine="c1.Visible = False";
_c1.setVisible(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 254;BA.debugLine="t1 = lblscore.Text";
_t1 = (int)(Double.parseDouble(mostCurrent._lblscore.getText()));
 //BA.debugLineNum = 255;BA.debugLine="lblscore.Text = t1 - 10";
mostCurrent._lblscore.setText((Object)(_t1-10));
 //BA.debugLineNum = 256;BA.debugLine="common.vibrePhone";
mostCurrent._common._vibrephone(mostCurrent.activityBA);
 //BA.debugLineNum = 257;BA.debugLine="End Sub";
return "";
}
}
