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 frmgame9 extends Activity implements B4AActivity{
	public static frmgame9 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.frmgame9");
			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 (frmgame9).");
				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.frmgame9");
        
        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.frmgame9", processBA, activityBA, _activity, anywheresoftware.b4a.keywords.Common.Density, mostCurrent);
			_activity.reinitializeForShell(activityBA, "activity");
		}
        initializeProcessGlobals();		
        initializeGlobals();
        
        BA.LogInfo("** Activity (frmgame9) Create, isFirst = " + isFirst + " **");
        processBA.raiseEvent2(null, true, "activity_create", false, isFirst);
		isFirst = false;
		if (this != mostCurrent)
			return;
        processBA.setActivityPaused(false);
        BA.LogInfo("** Activity (frmgame9) 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 frmgame9.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 (frmgame9) 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 (frmgame9) 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 _tmr1 = null;
public static int _scorrect = 0;
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 String _sanswer = "";
public static String _squestion = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b3 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b4 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b5 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b6 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b7 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a10 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a11 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a12 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a13 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a14 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a15 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a16 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a17 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a18 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a19 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a20 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a21 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a22 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a23 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a24 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a25 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a26 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a27 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a28 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a29 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a3 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a30 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a31 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a32 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a4 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a5 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a6 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a7 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a8 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _a9 = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imgbackground = null;
public anywheresoftware.b4a.objects.LabelWrapper _lbltitle = 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.frmgame3 _frmgame3 = 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.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  _a1_click() throws Exception{
 //BA.debugLineNum = 257;BA.debugLine="Sub a1_Click";
 //BA.debugLineNum = 258;BA.debugLine="btnWord(a1)";
_btnword(mostCurrent._a1);
 //BA.debugLineNum = 259;BA.debugLine="End Sub";
return "";
}
public static String  _a10_click() throws Exception{
 //BA.debugLineNum = 284;BA.debugLine="Sub a10_Click";
 //BA.debugLineNum = 285;BA.debugLine="btnWord(a10)";
_btnword(mostCurrent._a10);
 //BA.debugLineNum = 286;BA.debugLine="End Sub";
return "";
}
public static String  _a11_click() throws Exception{
 //BA.debugLineNum = 287;BA.debugLine="Sub a11_Click";
 //BA.debugLineNum = 288;BA.debugLine="btnWord(a11)";
_btnword(mostCurrent._a11);
 //BA.debugLineNum = 289;BA.debugLine="End Sub";
return "";
}
public static String  _a12_click() throws Exception{
 //BA.debugLineNum = 290;BA.debugLine="Sub a12_Click";
 //BA.debugLineNum = 291;BA.debugLine="btnWord(a12)";
_btnword(mostCurrent._a12);
 //BA.debugLineNum = 292;BA.debugLine="End Sub";
return "";
}
public static String  _a13_click() throws Exception{
 //BA.debugLineNum = 293;BA.debugLine="Sub a13_Click";
 //BA.debugLineNum = 294;BA.debugLine="btnWord(a13)";
_btnword(mostCurrent._a13);
 //BA.debugLineNum = 295;BA.debugLine="End Sub";
return "";
}
public static String  _a14_click() throws Exception{
 //BA.debugLineNum = 296;BA.debugLine="Sub a14_Click";
 //BA.debugLineNum = 297;BA.debugLine="btnWord(a14)";
_btnword(mostCurrent._a14);
 //BA.debugLineNum = 298;BA.debugLine="End Sub";
return "";
}
public static String  _a15_click() throws Exception{
 //BA.debugLineNum = 299;BA.debugLine="Sub a15_Click";
 //BA.debugLineNum = 300;BA.debugLine="btnWord(a15)";
_btnword(mostCurrent._a15);
 //BA.debugLineNum = 301;BA.debugLine="End Sub";
return "";
}
public static String  _a16_click() throws Exception{
 //BA.debugLineNum = 302;BA.debugLine="Sub a16_Click";
 //BA.debugLineNum = 303;BA.debugLine="btnWord(a16)";
_btnword(mostCurrent._a16);
 //BA.debugLineNum = 304;BA.debugLine="End Sub";
return "";
}
public static String  _a17_click() throws Exception{
 //BA.debugLineNum = 305;BA.debugLine="Sub a17_Click";
 //BA.debugLineNum = 306;BA.debugLine="btnWord(a17)";
_btnword(mostCurrent._a17);
 //BA.debugLineNum = 307;BA.debugLine="End Sub";
return "";
}
public static String  _a18_click() throws Exception{
 //BA.debugLineNum = 308;BA.debugLine="Sub a18_Click";
 //BA.debugLineNum = 309;BA.debugLine="btnWord(a18)";
_btnword(mostCurrent._a18);
 //BA.debugLineNum = 310;BA.debugLine="End Sub";
return "";
}
public static String  _a19_click() throws Exception{
 //BA.debugLineNum = 311;BA.debugLine="Sub a19_Click";
 //BA.debugLineNum = 312;BA.debugLine="btnWord(a19)";
_btnword(mostCurrent._a19);
 //BA.debugLineNum = 313;BA.debugLine="End Sub";
return "";
}
public static String  _a2_click() throws Exception{
 //BA.debugLineNum = 260;BA.debugLine="Sub a2_Click";
 //BA.debugLineNum = 261;BA.debugLine="btnWord(a2)";
_btnword(mostCurrent._a2);
 //BA.debugLineNum = 262;BA.debugLine="End Sub";
return "";
}
public static String  _a20_click() throws Exception{
 //BA.debugLineNum = 314;BA.debugLine="Sub a20_Click";
 //BA.debugLineNum = 315;BA.debugLine="btnWord(a20)";
_btnword(mostCurrent._a20);
 //BA.debugLineNum = 316;BA.debugLine="End Sub";
return "";
}
public static String  _a21_click() throws Exception{
 //BA.debugLineNum = 317;BA.debugLine="Sub a21_Click";
 //BA.debugLineNum = 318;BA.debugLine="btnWord(a21)";
_btnword(mostCurrent._a21);
 //BA.debugLineNum = 319;BA.debugLine="End Sub";
return "";
}
public static String  _a22_click() throws Exception{
 //BA.debugLineNum = 320;BA.debugLine="Sub a22_Click";
 //BA.debugLineNum = 321;BA.debugLine="btnWord(a22)";
_btnword(mostCurrent._a22);
 //BA.debugLineNum = 322;BA.debugLine="End Sub";
return "";
}
public static String  _a23_click() throws Exception{
 //BA.debugLineNum = 323;BA.debugLine="Sub a23_Click";
 //BA.debugLineNum = 324;BA.debugLine="btnWord(a23)";
_btnword(mostCurrent._a23);
 //BA.debugLineNum = 325;BA.debugLine="End Sub";
return "";
}
public static String  _a24_click() throws Exception{
 //BA.debugLineNum = 326;BA.debugLine="Sub a24_Click";
 //BA.debugLineNum = 327;BA.debugLine="btnWord(a24)";
_btnword(mostCurrent._a24);
 //BA.debugLineNum = 328;BA.debugLine="End Sub";
return "";
}
public static String  _a25_click() throws Exception{
 //BA.debugLineNum = 329;BA.debugLine="Sub a25_Click";
 //BA.debugLineNum = 330;BA.debugLine="btnWord(a25)";
_btnword(mostCurrent._a25);
 //BA.debugLineNum = 331;BA.debugLine="End Sub";
return "";
}
public static String  _a26_click() throws Exception{
 //BA.debugLineNum = 332;BA.debugLine="Sub a26_Click";
 //BA.debugLineNum = 333;BA.debugLine="btnWord(a26)";
_btnword(mostCurrent._a26);
 //BA.debugLineNum = 334;BA.debugLine="End Sub";
return "";
}
public static String  _a27_click() throws Exception{
 //BA.debugLineNum = 335;BA.debugLine="Sub a27_Click";
 //BA.debugLineNum = 336;BA.debugLine="btnWord(a27)";
_btnword(mostCurrent._a27);
 //BA.debugLineNum = 337;BA.debugLine="End Sub";
return "";
}
public static String  _a28_click() throws Exception{
 //BA.debugLineNum = 338;BA.debugLine="Sub a28_Click";
 //BA.debugLineNum = 339;BA.debugLine="btnWord(a28)";
_btnword(mostCurrent._a28);
 //BA.debugLineNum = 340;BA.debugLine="End Sub";
return "";
}
public static String  _a29_click() throws Exception{
 //BA.debugLineNum = 341;BA.debugLine="Sub a29_Click";
 //BA.debugLineNum = 342;BA.debugLine="btnWord(a29)";
_btnword(mostCurrent._a29);
 //BA.debugLineNum = 343;BA.debugLine="End Sub";
return "";
}
public static String  _a3_click() throws Exception{
 //BA.debugLineNum = 263;BA.debugLine="Sub a3_Click";
 //BA.debugLineNum = 264;BA.debugLine="btnWord(a3)";
_btnword(mostCurrent._a3);
 //BA.debugLineNum = 265;BA.debugLine="End Sub";
return "";
}
public static String  _a30_click() throws Exception{
 //BA.debugLineNum = 344;BA.debugLine="Sub a30_Click";
 //BA.debugLineNum = 345;BA.debugLine="btnWord(a30)";
_btnword(mostCurrent._a30);
 //BA.debugLineNum = 346;BA.debugLine="End Sub";
return "";
}
public static String  _a31_click() throws Exception{
 //BA.debugLineNum = 347;BA.debugLine="Sub a31_Click";
 //BA.debugLineNum = 348;BA.debugLine="btnWord(a31)";
_btnword(mostCurrent._a31);
 //BA.debugLineNum = 349;BA.debugLine="End Sub";
return "";
}
public static String  _a32_click() throws Exception{
 //BA.debugLineNum = 350;BA.debugLine="Sub a32_Click";
 //BA.debugLineNum = 351;BA.debugLine="btnWord(a32)";
_btnword(mostCurrent._a32);
 //BA.debugLineNum = 352;BA.debugLine="End Sub";
return "";
}
public static String  _a4_click() throws Exception{
 //BA.debugLineNum = 266;BA.debugLine="Sub a4_Click";
 //BA.debugLineNum = 267;BA.debugLine="btnWord(a4)";
_btnword(mostCurrent._a4);
 //BA.debugLineNum = 268;BA.debugLine="End Sub";
return "";
}
public static String  _a5_click() throws Exception{
 //BA.debugLineNum = 269;BA.debugLine="Sub a5_Click";
 //BA.debugLineNum = 270;BA.debugLine="btnWord(a5)";
_btnword(mostCurrent._a5);
 //BA.debugLineNum = 271;BA.debugLine="End Sub";
return "";
}
public static String  _a6_click() throws Exception{
 //BA.debugLineNum = 272;BA.debugLine="Sub a6_Click";
 //BA.debugLineNum = 273;BA.debugLine="btnWord(a6)";
_btnword(mostCurrent._a6);
 //BA.debugLineNum = 274;BA.debugLine="End Sub";
return "";
}
public static String  _a7_click() throws Exception{
 //BA.debugLineNum = 275;BA.debugLine="Sub a7_Click";
 //BA.debugLineNum = 276;BA.debugLine="btnWord(a7)";
_btnword(mostCurrent._a7);
 //BA.debugLineNum = 277;BA.debugLine="End Sub";
return "";
}
public static String  _a8_click() throws Exception{
 //BA.debugLineNum = 278;BA.debugLine="Sub a8_Click";
 //BA.debugLineNum = 279;BA.debugLine="btnWord(a8)";
_btnword(mostCurrent._a8);
 //BA.debugLineNum = 280;BA.debugLine="End Sub";
return "";
}
public static String  _a9_click() throws Exception{
 //BA.debugLineNum = 281;BA.debugLine="Sub a9_Click";
 //BA.debugLineNum = 282;BA.debugLine="btnWord(a9)";
_btnword(mostCurrent._a9);
 //BA.debugLineNum = 283;BA.debugLine="End Sub";
return "";
}
public static String  _activity_create(boolean _firsttime) throws Exception{
anywheresoftware.b4a.objects.ButtonWrapper _bs1 = null;
anywheresoftware.b4a.objects.LabelWrapper _l1 = null;
int _i = 0;
anywheresoftware.b4a.objects.collections.List _lst1 = null;
 //BA.debugLineNum = 65;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
 //BA.debugLineNum = 66;BA.debugLine="Activity.LoadLayout(\"game9\")";
mostCurrent._activity.LoadLayout("game9",mostCurrent.activityBA);
 //BA.debugLineNum = 67;BA.debugLine="common.changeTheme(imgbackground)";
mostCurrent._common._changetheme(mostCurrent.activityBA,mostCurrent._imgbackground);
 //BA.debugLineNum = 68;BA.debugLine="Dim bs1 As Button";
_bs1 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 69;BA.debugLine="Dim l1 As Label";
_l1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 70;BA.debugLine="settings.loadDefaultSetting(\"9\")";
mostCurrent._settings._loaddefaultsetting(mostCurrent.activityBA,"9");
 //BA.debugLineNum = 71;BA.debugLine="For i = 0 To Activity.NumberOfViews - 1";
{
final int step60 = 1;
final int limit60 = (int) (mostCurrent._activity.getNumberOfViews()-1);
for (_i = (int) (0); (step60 > 0 && _i <= limit60) || (step60 < 0 && _i >= limit60); _i = ((int)(0 + _i + step60))) {
 //BA.debugLineNum = 72;BA.debugLine="If Activity.GetView(i) Is Button Then";
if (mostCurrent._activity.GetView(_i).getObjectOrNull() instanceof android.widget.Button) { 
 //BA.debugLineNum = 73;BA.debugLine="bs1 = Activity.GetView(i)";
_bs1.setObject((android.widget.Button)(mostCurrent._activity.GetView(_i).getObject()));
 //BA.debugLineNum = 74;BA.debugLine="bs1.Typeface = Typeface.LoadFromAssets(\"BNazanin";
_bs1.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 //BA.debugLineNum = 75;BA.debugLine="bs1.TextSize = 15";
_bs1.setTextSize((float) (15));
 }else if(mostCurrent._activity.GetView(_i).getObjectOrNull() instanceof android.widget.TextView) { 
 //BA.debugLineNum = 77;BA.debugLine="l1 = Activity.GetView(i)";
_l1.setObject((android.widget.TextView)(mostCurrent._activity.GetView(_i).getObject()));
 //BA.debugLineNum = 78;BA.debugLine="l1.Typeface = Typeface.LoadFromAssets(\"BNazanin.";
_l1.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.LoadFromAssets("BNazanin.ttf"));
 };
 }
};
 //BA.debugLineNum = 81;BA.debugLine="sTimeout = settings.getData(\"settingGame9.app\",\"ti";
_stimeout = (int)(Double.parseDouble(mostCurrent._settings._getdata(mostCurrent.activityBA,"settingGame9.app","timeout")));
 //BA.debugLineNum = 82;BA.debugLine="sTimeout = sTimeout - 1";
_stimeout = (int) (_stimeout-1);
 //BA.debugLineNum = 83;BA.debugLine="lblstage.Text = settings.getData(\"settingGame9.app";
mostCurrent._lblstage.setText((Object)(mostCurrent._settings._getdata(mostCurrent.activityBA,"settingGame9.app","stage")));
 //BA.debugLineNum = 84;BA.debugLine="Dim lst1 As List";
_lst1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 85;BA.debugLine="lst1.Initialize";
_lst1.Initialize();
 //BA.debugLineNum = 86;BA.debugLine="lst1 = common.getItemSql";
_lst1 = mostCurrent._common._getitemsql(mostCurrent.activityBA);
 //BA.debugLineNum = 87;BA.debugLine="sAnswer = lst1.Get(1)";
mostCurrent._sanswer = BA.ObjectToString(_lst1.Get((int) (1)));
 //BA.debugLineNum = 88;BA.debugLine="sQuestion = lst1.Get(0)";
mostCurrent._squestion = BA.ObjectToString(_lst1.Get((int) (0)));
 //BA.debugLineNum = 89;BA.debugLine="lbltitle.Text = sQuestion";
mostCurrent._lbltitle.setText((Object)(mostCurrent._squestion));
 //BA.debugLineNum = 90;BA.debugLine="defineBtnstate(sAnswer.Length)";
_definebtnstate(mostCurrent._sanswer.length());
 //BA.debugLineNum = 91;BA.debugLine="common.playbgGame1";
mostCurrent._common._playbggame1(mostCurrent.activityBA);
 //BA.debugLineNum = 92;BA.debugLine="tmr1.Initialize(\"tmr1\",1)";
_tmr1.Initialize(processBA,"tmr1",(long) (1));
 //BA.debugLineNum = 93;BA.debugLine="tmr1.Enabled = True";
_tmr1.setEnabled(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 94;BA.debugLine="loadMenu";
_loadmenu();
 //BA.debugLineNum = 95;BA.debugLine="End Sub";
return "";
}
public static boolean  _activity_keypress(int _keycode) throws Exception{
 //BA.debugLineNum = 353;BA.debugLine="Sub Activity_KeyPress (KeyCode As Int) As Boolean";
 //BA.debugLineNum = 354;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_BACK Then";
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { 
 //BA.debugLineNum = 355;BA.debugLine="tmr1.Enabled = False";
_tmr1.setEnabled(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 356;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 357;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 358;BA.debugLine="StartActivity(Main)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._main.getObject()));
 };
 //BA.debugLineNum = 360;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_MENU Then";
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_MENU) { 
 //BA.debugLineNum = 361;BA.debugLine="Activity.OpenMenu";
mostCurrent._activity.OpenMenu();
 };
 //BA.debugLineNum = 363;BA.debugLine="End Sub";
return false;
}
public static String  _activity_pause(boolean _userclosed) throws Exception{
 //BA.debugLineNum = 252;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
 //BA.debugLineNum = 254;BA.debugLine="End Sub";
return "";
}
public static String  _activity_resume() throws Exception{
 //BA.debugLineNum = 155;BA.debugLine="Sub Activity_Resume";
 //BA.debugLineNum = 157;BA.debugLine="End Sub";
return "";
}
public static String  _btnabout_click() throws Exception{
 //BA.debugLineNum = 105;BA.debugLine="Sub btnabout_Click";
 //BA.debugLineNum = 106;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 107;BA.debugLine="StartActivity(frmabout)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmabout.getObject()));
 //BA.debugLineNum = 108;BA.debugLine="End Sub";
return "";
}
public static String  _btnsetting_click() throws Exception{
 //BA.debugLineNum = 101;BA.debugLine="Sub btnsetting_Click";
 //BA.debugLineNum = 102;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 103;BA.debugLine="StartActivity(setting)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._setting.getObject()));
 //BA.debugLineNum = 104;BA.debugLine="End Sub";
return "";
}
public static String  _btnword(anywheresoftware.b4a.objects.ButtonWrapper _sb) throws Exception{
anywheresoftware.b4a.objects.collections.List _l1 = null;
String _s1 = "";
int _t2 = 0;
int _i = 0;
 //BA.debugLineNum = 159;BA.debugLine="Sub btnWord(sb As Button)";
 //BA.debugLineNum = 160;BA.debugLine="Dim l1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 161;BA.debugLine="Dim s1 As String";
_s1 = "";
 //BA.debugLineNum = 162;BA.debugLine="Dim t2 As Int";
_t2 = 0;
 //BA.debugLineNum = 163;BA.debugLine="l1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 164;BA.debugLine="If sAnswer.IndexOf(sb.Text) = -1 Then";
if (mostCurrent._sanswer.indexOf(_sb.getText())==-1) { 
 //BA.debugLineNum = 165;BA.debugLine="common.playAudio(\"wrong.wav\")";
mostCurrent._common._playaudio(mostCurrent.activityBA,"wrong.wav");
 //BA.debugLineNum = 166;BA.debugLine="t2 = lblscore.Text";
_t2 = (int)(Double.parseDouble(mostCurrent._lblscore.getText()));
 //BA.debugLineNum = 167;BA.debugLine="lblscore.Text = t2 - 10";
mostCurrent._lblscore.setText((Object)(_t2-10));
 //BA.debugLineNum = 168;BA.debugLine="common.playAnimation(sb,\"scale\",1000)";
mostCurrent._common._playanimation(mostCurrent.activityBA,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_sb.getObject())),"scale",(int) (1000));
 //BA.debugLineNum = 169;BA.debugLine="sb.Visible = False";
_sb.setVisible(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 170;BA.debugLine="common.vibrePhone";
mostCurrent._common._vibrephone(mostCurrent.activityBA);
 //BA.debugLineNum = 171;BA.debugLine="ToastMessageShow(\"اشتباه بود\",False)";
anywheresoftware.b4a.keywords.Common.ToastMessageShow("اشتباه بود",anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 172;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 174;BA.debugLine="l1 = getPositionWord(sAnswer,sb.Text)";
_l1 = _getpositionword(mostCurrent._sanswer,_sb.getText());
 //BA.debugLineNum = 175;BA.debugLine="For i=0 To l1.Size-1";
{
final int step160 = 1;
final int limit160 = (int) (_l1.getSize()-1);
for (_i = (int) (0); (step160 > 0 && _i <= limit160) || (step160 < 0 && _i >= limit160); _i = ((int)(0 + _i + step160))) {
 //BA.debugLineNum = 176;BA.debugLine="s1 = l1.Get(i)";
_s1 = BA.ObjectToString(_l1.Get(_i));
 //BA.debugLineNum = 177;BA.debugLine="Select Case s1";
switch (BA.switchObjectToInt(_s1,"0",BA.NumberToString(1),BA.NumberToString(2),BA.NumberToString(3),BA.NumberToString(4),BA.NumberToString(5),BA.NumberToString(6))) {
case 0:
 //BA.debugLineNum = 179;BA.debugLine="b1.Text = sb.Text";
mostCurrent._b1.setText((Object)(_sb.getText()));
 break;
case 1:
 //BA.debugLineNum = 181;BA.debugLine="b2.Text = sb.Text";
mostCurrent._b2.setText((Object)(_sb.getText()));
 break;
case 2:
 //BA.debugLineNum = 183;BA.debugLine="b3.Text = sb.Text";
mostCurrent._b3.setText((Object)(_sb.getText()));
 break;
case 3:
 //BA.debugLineNum = 185;BA.debugLine="b4.Text = sb.Text";
mostCurrent._b4.setText((Object)(_sb.getText()));
 break;
case 4:
 //BA.debugLineNum = 187;BA.debugLine="b5.Text = sb.Text";
mostCurrent._b5.setText((Object)(_sb.getText()));
 break;
case 5:
 //BA.debugLineNum = 189;BA.debugLine="b6.Text = sb.Text";
mostCurrent._b6.setText((Object)(_sb.getText()));
 break;
case 6:
 //BA.debugLineNum = 191;BA.debugLine="b7.Text = sb.Text";
mostCurrent._b7.setText((Object)(_sb.getText()));
 break;
}
;
 }
};
 //BA.debugLineNum = 194;BA.debugLine="If sCorrect >= sAnswer.Length Then";
if (_scorrect>=mostCurrent._sanswer.length()) { 
 //BA.debugLineNum = 195;BA.debugLine="tmr1.Enabled = False";
_tmr1.setEnabled(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 196;BA.debugLine="frmGame1_result.sTime = \"زمان سپری شده \"  & lbl";
mostCurrent._frmgame1_result._stime = "زمان سپری شده "+mostCurrent._lblsecond.getText()+" : "+mostCurrent._lblseconds.getText()+" ثانیه";
 //BA.debugLineNum = 197;BA.debugLine="frmGame1_result.sState = \"win\"";
mostCurrent._frmgame1_result._sstate = "win";
 //BA.debugLineNum = 198;BA.debugLine="frmGame1_result.sStage = lblstage.Text";
mostCurrent._frmgame1_result._sstage = mostCurrent._lblstage.getText();
 //BA.debugLineNum = 199;BA.debugLine="frmGame1_result.sGameNumber = \"9\"";
mostCurrent._frmgame1_result._sgamenumber = "9";
 //BA.debugLineNum = 200;BA.debugLine="frmGame1_result.sScore = lblscore.Text";
mostCurrent._frmgame1_result._sscore = mostCurrent._lblscore.getText();
 //BA.debugLineNum = 201;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 202;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 203;BA.debugLine="StartActivity(frmGame1_result)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmgame1_result.getObject()));
 };
 //BA.debugLineNum = 205;BA.debugLine="t2 = lblscore.Text";
_t2 = (int)(Double.parseDouble(mostCurrent._lblscore.getText()));
 //BA.debugLineNum = 206;BA.debugLine="lblscore.Text = t2 + 10";
mostCurrent._lblscore.setText((Object)(_t2+10));
 //BA.debugLineNum = 207;BA.debugLine="common.playAudio(\"star.mp3\")";
mostCurrent._common._playaudio(mostCurrent.activityBA,"star.mp3");
 //BA.debugLineNum = 208;BA.debugLine="common.playAnimation(sb,\"scale\",1000)";
mostCurrent._common._playanimation(mostCurrent.activityBA,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_sb.getObject())),"scale",(int) (1000));
 //BA.debugLineNum = 209;BA.debugLine="End Sub";
return "";
}
public static String  _definebtnstate(int _slenght) throws Exception{
 //BA.debugLineNum = 117;BA.debugLine="Sub defineBtnstate(sLenght As Int)";
 //BA.debugLineNum = 118;BA.debugLine="Select Case sLenght";
switch (_slenght) {
case 7:
 //BA.debugLineNum = 120;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 121;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 122;BA.debugLine="b3.Visible = True";
mostCurrent._b3.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 123;BA.debugLine="b4.Visible = True";
mostCurrent._b4.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 124;BA.debugLine="b5.Visible = True";
mostCurrent._b5.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 125;BA.debugLine="b6.Visible = True";
mostCurrent._b6.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 126;BA.debugLine="b7.Visible = True";
mostCurrent._b7.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
case 6:
 //BA.debugLineNum = 128;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 129;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 130;BA.debugLine="b3.Visible = True";
mostCurrent._b3.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 131;BA.debugLine="b4.Visible = True";
mostCurrent._b4.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 132;BA.debugLine="b5.Visible = True";
mostCurrent._b5.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 133;BA.debugLine="b6.Visible = True";
mostCurrent._b6.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
case 5:
 //BA.debugLineNum = 135;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 136;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 137;BA.debugLine="b3.Visible = True";
mostCurrent._b3.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 138;BA.debugLine="b4.Visible = True";
mostCurrent._b4.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 139;BA.debugLine="b5.Visible = True";
mostCurrent._b5.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
case 4:
 //BA.debugLineNum = 141;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 142;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 143;BA.debugLine="b3.Visible = True";
mostCurrent._b3.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 144;BA.debugLine="b4.Visible = True";
mostCurrent._b4.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
case 3:
 //BA.debugLineNum = 146;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 147;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 148;BA.debugLine="b3.Visible = True";
mostCurrent._b3.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
case 2:
 //BA.debugLineNum = 150;BA.debugLine="b1.Visible = True";
mostCurrent._b1.setVisible(anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 151;BA.debugLine="b2.Visible = True";
mostCurrent._b2.setVisible(anywheresoftware.b4a.keywords.Common.True);
 break;
}
;
 //BA.debugLineNum = 153;BA.debugLine="End Sub";
return "";
}
public static String  _exit1_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 109;BA.debugLine="Sub exit1_Click";
 //BA.debugLineNum = 110;BA.debugLine="Dim i As Int";
_i = 0;
 //BA.debugLineNum = 111;BA.debugLine="i = Msgbox2(\"آیا مایل به خروج هستید؟\",\"خروج\",\"آری\"";
_i = anywheresoftware.b4a.keywords.Common.Msgbox2("آیا مایل به خروج هستید؟","خروج","آری","خیر","",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.Null),mostCurrent.activityBA);
 //BA.debugLineNum = 112;BA.debugLine="If i = DialogResponse.POSITIVE Then";
if (_i==anywheresoftware.b4a.keywords.Common.DialogResponse.POSITIVE) { 
 //BA.debugLineNum = 113;BA.debugLine="ExitApplication";
anywheresoftware.b4a.keywords.Common.ExitApplication();
 };
 //BA.debugLineNum = 115;BA.debugLine="End Sub";
return "";
}
public static anywheresoftware.b4a.objects.collections.List  _getpositionword(String _sa,String _schar) throws Exception{
anywheresoftware.b4a.objects.collections.List _l1 = null;
int _i = 0;
String _stemp = "";
 //BA.debugLineNum = 211;BA.debugLine="Sub getPositionWord(sA As String,sChar As String)";
 //BA.debugLineNum = 212;BA.debugLine="Dim l1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 213;BA.debugLine="Dim i As Int";
_i = 0;
 //BA.debugLineNum = 214;BA.debugLine="Dim sTemp As String";
_stemp = "";
 //BA.debugLineNum = 215;BA.debugLine="sTemp = sAnswer";
_stemp = mostCurrent._sanswer;
 //BA.debugLineNum = 216;BA.debugLine="l1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 217;BA.debugLine="i = 0";
_i = (int) (0);
 //BA.debugLineNum = 218;BA.debugLine="Do While i <> -1";
while (_i!=-1) {
 //BA.debugLineNum = 219;BA.debugLine="i = sTemp.IndexOf2(sChar,i)";
_i = _stemp.indexOf(_schar,_i);
 //BA.debugLineNum = 220;BA.debugLine="If i <> -1 Then";
if (_i!=-1) { 
 //BA.debugLineNum = 221;BA.debugLine="l1.Add(i)";
_l1.Add((Object)(_i));
 //BA.debugLineNum = 222;BA.debugLine="i = i + 1";
_i = (int) (_i+1);
 //BA.debugLineNum = 223;BA.debugLine="sCorrect = sCorrect + 1";
_scorrect = (int) (_scorrect+1);
 };
 }
;
 //BA.debugLineNum = 226;BA.debugLine="Return l1";
if (true) return _l1;
 //BA.debugLineNum = 227;BA.debugLine="End Sub";
return null;
}
public static String  _globals() throws Exception{
 //BA.debugLineNum = 12;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 15;BA.debugLine="Dim sCorrect As Int : sCorrect = 0";
_scorrect = 0;
 //BA.debugLineNum = 15;BA.debugLine="Dim sCorrect As Int : sCorrect = 0";
_scorrect = (int) (0);
 //BA.debugLineNum = 16;BA.debugLine="Dim lblscore As Label";
mostCurrent._lblscore = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim lblstage As Label";
mostCurrent._lblstage = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim lblseconds As Label";
mostCurrent._lblseconds = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim lblsecond As Label";
mostCurrent._lblsecond = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim sTimeout As Int";
_stimeout = 0;
 //BA.debugLineNum = 21;BA.debugLine="Dim sAnswer,sQuestion As String";
mostCurrent._sanswer = "";
mostCurrent._squestion = "";
 //BA.debugLineNum = 22;BA.debugLine="Dim b1 As Button";
mostCurrent._b1 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim b2 As Button";
mostCurrent._b2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim b3 As Button";
mostCurrent._b3 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim b4 As Button";
mostCurrent._b4 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim b5 As Button";
mostCurrent._b5 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim b6 As Button";
mostCurrent._b6 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim b7 As Button";
mostCurrent._b7 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 29;BA.debugLine="Dim a1 As Button";
mostCurrent._a1 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim a10 As Button";
mostCurrent._a10 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 31;BA.debugLine="Dim a11 As Button";
mostCurrent._a11 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Dim a12 As Button";
mostCurrent._a12 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Dim a13 As Button";
mostCurrent._a13 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Dim a14 As Button";
mostCurrent._a14 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Dim a15 As Button";
mostCurrent._a15 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 36;BA.debugLine="Dim a16 As Button";
mostCurrent._a16 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 37;BA.debugLine="Dim a17 As Button";
mostCurrent._a17 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 38;BA.debugLine="Dim a18 As Button";
mostCurrent._a18 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim a19 As Button";
mostCurrent._a19 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Dim a2 As Button";
mostCurrent._a2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 41;BA.debugLine="Dim a20 As Button";
mostCurrent._a20 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Dim a21 As Button";
mostCurrent._a21 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 43;BA.debugLine="Dim a22 As Button";
mostCurrent._a22 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Dim a23 As Button";
mostCurrent._a23 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Dim a24 As Button";
mostCurrent._a24 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim a25 As Button";
mostCurrent._a25 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 47;BA.debugLine="Dim a26 As Button";
mostCurrent._a26 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 48;BA.debugLine="Dim a27 As Button";
mostCurrent._a27 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 49;BA.debugLine="Dim a28 As Button";
mostCurrent._a28 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 50;BA.debugLine="Dim a29 As Button";
mostCurrent._a29 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 51;BA.debugLine="Dim a3 As Button";
mostCurrent._a3 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 52;BA.debugLine="Dim a30 As Button";
mostCurrent._a30 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 53;BA.debugLine="Dim a31 As Button";
mostCurrent._a31 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 54;BA.debugLine="Dim a32 As Button";
mostCurrent._a32 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 55;BA.debugLine="Dim a4 As Button";
mostCurrent._a4 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 56;BA.debugLine="Dim a5 As Button";
mostCurrent._a5 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 57;BA.debugLine="Dim a6 As Button";
mostCurrent._a6 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 58;BA.debugLine="Dim a7 As Button";
mostCurrent._a7 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 59;BA.debugLine="Dim a8 As Button";
mostCurrent._a8 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 60;BA.debugLine="Dim a9 As Button";
mostCurrent._a9 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 61;BA.debugLine="Dim imgbackground As ImageView";
mostCurrent._imgbackground = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 62;BA.debugLine="Dim lbltitle As Label";
mostCurrent._lbltitle = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 63;BA.debugLine="End Sub";
return "";
}
public static String  _loadmenu() throws Exception{
 //BA.debugLineNum = 96;BA.debugLine="Sub loadMenu";
 //BA.debugLineNum = 97;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 = 98;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 = 99;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 = 100;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 tmr1 As Timer";
_tmr1 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 10;BA.debugLine="End Sub";
return "";
}
public static String  _tmr1_tick() throws Exception{
int _k1 = 0;
 //BA.debugLineNum = 229;BA.debugLine="Sub tmr1_Tick";
 //BA.debugLineNum = 230;BA.debugLine="Dim k1 As Int";
_k1 = 0;
 //BA.debugLineNum = 231;BA.debugLine="If lblsecond.Text > sTimeout Then";
if ((double)(Double.parseDouble(mostCurrent._lblsecond.getText()))>_stimeout) { 
 //BA.debugLineNum = 232;BA.debugLine="tmr1.Enabled = False";
_tmr1.setEnabled(anywheresoftware.b4a.keywords.Common.False);
 //BA.debugLineNum = 233;BA.debugLine="frmGame1_result.sTime = \"زمان سپری شده \"  & lbl";
mostCurrent._frmgame1_result._stime = "زمان سپری شده "+mostCurrent._lblsecond.getText()+" : "+mostCurrent._lblseconds.getText()+" ثانیه";
 //BA.debugLineNum = 234;BA.debugLine="frmGame1_result.sState = \"unwin\"";
mostCurrent._frmgame1_result._sstate = "unwin";
 //BA.debugLineNum = 235;BA.debugLine="frmGame1_result.sGameNumber = \"9\"";
mostCurrent._frmgame1_result._sgamenumber = "9";
 //BA.debugLineNum = 236;BA.debugLine="frmGame1_result.sScore = lblscore.Text";
mostCurrent._frmgame1_result._sscore = mostCurrent._lblscore.getText();
 //BA.debugLineNum = 237;BA.debugLine="common.stopAudio";
mostCurrent._common._stopaudio(mostCurrent.activityBA);
 //BA.debugLineNum = 238;BA.debugLine="Activity.Finish";
mostCurrent._activity.Finish();
 //BA.debugLineNum = 239;BA.debugLine="StartActivity(frmGame1_result)";
anywheresoftware.b4a.keywords.Common.StartActivity(mostCurrent.activityBA,(Object)(mostCurrent._frmgame1_result.getObject()));
 };
 //BA.debugLineNum = 242;BA.debugLine="k1 = lblseconds.Text + 1";
_k1 = (int) ((double)(Double.parseDouble(mostCurrent._lblseconds.getText()))+1);
 //BA.debugLineNum = 243;BA.debugLine="lblseconds.Text = k1";
mostCurrent._lblseconds.setText((Object)(_k1));
 //BA.debugLineNum = 244;BA.debugLine="If lblseconds.Text > 60 Then";
if ((double)(Double.parseDouble(mostCurrent._lblseconds.getText()))>60) { 
 //BA.debugLineNum = 245;BA.debugLine="lblseconds.Text = 0";
mostCurrent._lblseconds.setText((Object)(0));
 //BA.debugLineNum = 246;BA.debugLine="k1 = lblsecond.Text + 1";
_k1 = (int) ((double)(Double.parseDouble(mostCurrent._lblsecond.getText()))+1);
 //BA.debugLineNum = 247;BA.debugLine="lblsecond.Text = k1";
mostCurrent._lblsecond.setText((Object)(_k1));
 };
 //BA.debugLineNum = 250;BA.debugLine="End Sub";
return "";
}
}
