コード例 #1
0
        public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
        {
            switch (buttonView.Id)
            {
            case R.id.checkBoxDeviceEnabled:
                try
                {
                    posPrinter.DeviceEnabled = isChecked;
                }
                catch (JposException e)
                {
                    Console.WriteLine(e.ToString());
                    Console.Write(e.StackTrace);
                    try
                    {
                        posPrinter.DeviceEnabled = !isChecked;
                    }
                    catch (JposException e1)
                    {
                        // TODO Auto-generated catch block
                        Console.WriteLine(e1.ToString());
                        Console.Write(e1.StackTrace);
                    }
                    MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
                }
                break;

            case R.id.checkBoxAsyncMode:
                try
                {
                    posPrinter.AsyncMode = isChecked;
                }
                catch (JposException e)
                {
                    Console.WriteLine(e.ToString());
                    Console.Write(e.StackTrace);
                    try
                    {
                        posPrinter.AsyncMode = !isChecked;
                    }
                    catch (JposException e1)
                    {
                        // TODO Auto-generated catch block
                        Console.WriteLine(e1.ToString());
                        Console.Write(e1.StackTrace);
                    }
                    MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
                }
                break;
            }
        }
コード例 #2
0
ファイル: RadioGroup.cs プロジェクト: zhouweiaccp/XobotOS
            public virtual void onCheckedChanged(android.widget.CompoundButton buttonView, bool
                                                 isChecked)
            {
                // prevents from infinite recursion
                if (this._enclosing.mProtectFromCheckedChange)
                {
                    return;
                }
                this._enclosing.mProtectFromCheckedChange = true;
                if (this._enclosing.mCheckedId != -1)
                {
                    this._enclosing.setCheckedStateForView(this._enclosing.mCheckedId, false);
                }
                this._enclosing.mProtectFromCheckedChange = false;
                int id = buttonView.getId();

                this._enclosing.setCheckedId(id);
            }
コード例 #3
0
 public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
 {
     try
     {
         if (buttonView.Id == R.id.checkBoxDeviceEnabled)
         {
             smartCardRW.DeviceEnabled = isChecked;
             if (isChecked)
             {
                 smartCardRW.SCSlot = 0x01 << (sizeof(int) - 1);
             }
         }
     }
     catch (JposException e)
     {
         Console.WriteLine(e.ToString());
         Console.Write(e.StackTrace);
         MessageDialogFragment.showDialog(FragmentManager, "Excepction", e.Message);
     }
 }
コード例 #4
0
 public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
 {
     try
     {
         cashDrawer.DeviceEnabled = isChecked;
     }
     catch (JposException e)
     {
         Console.WriteLine(e.ToString());
         Console.Write(e.StackTrace);
         try
         {
             cashDrawer.DeviceEnabled = !isChecked;
         }
         catch (JposException e1)
         {
             // TODO Auto-generated catch block
             Console.WriteLine(e1.ToString());
             Console.Write(e1.StackTrace);
         }
         MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
     }
 }
コード例 #5
0
		public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
		{
			try
			{
				cashDrawer.DeviceEnabled = isChecked;
			}
			catch (JposException e)
			{
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
				try
				{
					cashDrawer.DeviceEnabled = !isChecked;
				}
				catch (JposException e1)
				{
					// TODO Auto-generated catch block
					Console.WriteLine(e1.ToString());
					Console.Write(e1.StackTrace);
				}
				MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
			}
		}
コード例 #6
0
ファイル: CompoundButton.cs プロジェクト: zffl/androidmono
 void android.widget.CompoundButton.OnCheckedChangeListener.onCheckedChanged(android.widget.CompoundButton arg0, bool arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.widget.CompoundButton.OnCheckedChangeListener_._onCheckedChanged11088, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.CompoundButton.OnCheckedChangeListener_.staticClass, global::android.widget.CompoundButton.OnCheckedChangeListener_._onCheckedChanged11088, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }
コード例 #7
0
 public virtual void onCheckedChanged(CompoundButton buttonView, bool isChecked)
 {
     outerInstance.mResponseLengthEdit.Enabled = isChecked;
 }
コード例 #8
0
			public virtual void onCheckedChanged(CompoundButton buttonView, bool isChecked)
			{
				outerInstance.mResponseLengthEdit.Enabled = isChecked;
			}
コード例 #9
0
		public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
		{
			try
			{
				if (buttonView.Id == R.id.checkBoxDeviceEnabled)
				{
					smartCardRW.DeviceEnabled = isChecked;
					if (isChecked)
					{
						smartCardRW.SCSlot = 0x01 << (sizeof(int) - 1);
					}
				}
			}
			catch (JposException e)
			{
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
				MessageDialogFragment.showDialog(FragmentManager, "Excepction", e.Message);
			}
		}
コード例 #10
0
		public override void onCheckedChanged(CompoundButton buttonView, bool isChecked)
		{
			switch (buttonView.Id)
			{
			case R.id.checkBoxDeviceEnabled:
				try
				{
					posPrinter.DeviceEnabled = isChecked;
				}
				catch (JposException e)
				{
					Console.WriteLine(e.ToString());
					Console.Write(e.StackTrace);
					try
					{
						posPrinter.DeviceEnabled = !isChecked;
					}
					catch (JposException e1)
					{
						// TODO Auto-generated catch block
						Console.WriteLine(e1.ToString());
						Console.Write(e1.StackTrace);
					}
					MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
				}
				break;

			case R.id.checkBoxAsyncMode:
				try
				{
					posPrinter.AsyncMode = isChecked;
				}
				catch (JposException e)
				{
					Console.WriteLine(e.ToString());
					Console.Write(e.StackTrace);
					try
					{
						posPrinter.AsyncMode = !isChecked;
					}
					catch (JposException e1)
					{
						// TODO Auto-generated catch block
						Console.WriteLine(e1.ToString());
						Console.Write(e1.StackTrace);
					}
					MessageDialogFragment.showDialog(FragmentManager, "Exception", e.Message);
				}
				break;
			}

		}