当前位置: 首页>>代码示例>>C#>>正文


C# CompoundButton类代码示例

本文整理汇总了C#中CompoundButton的典型用法代码示例。如果您正苦于以下问题:C# CompoundButton类的具体用法?C# CompoundButton怎么用?C# CompoundButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CompoundButton类属于命名空间,在下文中一共展示了CompoundButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCheckedChanged

		private void OnCheckedChanged(object sender, CompoundButton.CheckedChangeEventArgs e)
		{
			var preferences = PreferenceManager.GetDefaultSharedPreferences(SkillStoreApplication.AppContext);
			var prefEditor = preferences.Edit();
			prefEditor.PutBoolean(SettingsKey.ShowAgainPreference, e.IsChecked);
			prefEditor.Commit();
		}
开发者ID:mdanz92,项目名称:teco.SkillStore,代码行数:7,代码来源:AnalyzerTabFragment.cs

示例2: OnCheckedChange

 void CompoundButton.IOnCheckedChangeListener.OnCheckedChanged(CompoundButton buttonView, bool isChecked)
 {
     if (OnCheckedChange != null)
     {
         OnCheckedChange(buttonView, isChecked);
     }
 }
开发者ID:jlarsson,项目名称:Gas,代码行数:7,代码来源:OnCheckedChangeListenerForCompoundButton.cs

示例3: OnCheckedChanged

 public void OnCheckedChanged(IDrawerItem drawerItem, CompoundButton buttonView, bool isChecked)
 {
     if (drawerItem is INameable) {
     Log.Info("material-drawer", "DrawerItem: " + ((INameable) drawerItem).Name + " - toggleChecked: " + isChecked);
       } else {
     Log.Info("material-drawer", "toggleChecked: " + isChecked);
       }
 }
开发者ID:jwnace,项目名称:MaterialDrawer-Xamarin,代码行数:8,代码来源:MainActivity.cs

示例4: OnRadioButtonCheckedChange

 private void OnRadioButtonCheckedChange(object sender, CompoundButton.CheckedChangeEventArgs args)
 {
     var radionButton = (sender as RadioButton);
     if (radionButton != null)
     {
         this.Check(radionButton.Id);
     }
 }
开发者ID:Everbridge,项目名称:sm-MvvmCross,代码行数:8,代码来源:MvxRadioGroup.cs

示例5: checkBox_CheckedChange

        void checkBox_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            Agreed = e.IsChecked;

            if (e.IsChecked)
                NotifyCompleted();
            else
                NotifyIncomplete();
        }
开发者ID:pacificIT,项目名称:WizarDroid.Net,代码行数:9,代码来源:FormStep2.cs

示例6: OnSortingForSupplierIDChanged

		void OnSortingForSupplierIDChanged (object sender, CompoundButton.CheckedChangeEventArgs e)
		{
			var supplierId = sfGrid.Columns.FirstOrDefault (x => x.MappingName == "SupplierID");

			if (e.IsChecked)
				supplierId.AllowSorting = true;
			else
				supplierId.AllowSorting = false;
		}
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:9,代码来源:Sorting.cs

示例7: OnCheckedChanged

        public void OnCheckedChanged(CompoundButton buttonView, bool isChecked)
        {
            if (buttonView.Id == Resource.Id.lockDrawerButton) {
                this.drawer.IsLocked = isChecked;
            }

            if (buttonView.Id == Resource.Id.drawerTapOutsideButton) {
                this.drawer.TapOutsideToClose = isChecked;
            }
        }
开发者ID:bmccool,项目名称:Android-samples,代码行数:10,代码来源:DrawerInitialSetupFragment.cs

示例8: AlarmEnabledChange

		void AlarmEnabledChange (object sender, CompoundButton.CheckedChangeEventArgs e)
		{
			if (_selectedAlarm == null || _selectedAlarm.Enabled == e.IsChecked)
				return;

			EnableAlarm (_selectedAlarm, e.IsChecked);
			Mode = Mode.MarkerSelected;
			if (!e.IsChecked) {
				StopRinging ();
			}

			GoogleAnalyticsManager.ReportEvent (GACategory.MainScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled"));
		}
开发者ID:foxanna,项目名称:SimpleLocationAlarm,代码行数:13,代码来源:HomeActivityAddMode.cs

示例9: tgConnect_HandleCheckedChange

		void tgConnect_HandleCheckedChange (object sender, CompoundButton.CheckedChangeEventArgs e)
		{
			if (e.IsChecked) {
				Connect();
			} else {
				if (btSocket.IsConnected) {
					try {
						btSocket.Close();
					} catch (System.Exception ex) {
						Console.WriteLine (ex.Message);
					}
				}
			}
		}
开发者ID:EnriqueProinfo,项目名称:Mono,代码行数:14,代码来源:MainActivity.cs

示例10: Screen4Lobby_CheckedChange

 private void Screen4Lobby_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e)
 {
     var liftCheckBox = (CheckBox) sender;
     View.FindViewById<CheckBox>(Resource.Id.liftBrail).Enabled = liftCheckBox.Checked;
     View.FindViewById<CheckBox>(Resource.Id.liftDepth).Enabled = liftCheckBox.Checked;
     View.FindViewById<CheckBox>(Resource.Id.liftDoorWeight).Enabled = liftCheckBox.Checked;
     View.FindViewById<CheckBox>(Resource.Id.liftWight).Enabled = liftCheckBox.Checked;
     if (!liftCheckBox.Checked)
     {
         View.FindViewById<CheckBox>(Resource.Id.liftBrail).Checked = liftCheckBox.Checked;
         View.FindViewById<CheckBox>(Resource.Id.liftDepth).Checked = liftCheckBox.Checked;
         View.FindViewById<CheckBox>(Resource.Id.liftDoorWeight).Checked = liftCheckBox.Checked;
         View.FindViewById<CheckBox>(Resource.Id.liftWight).Checked = liftCheckBox.Checked;
     }
 }
开发者ID:Teplitsa,项目名称:bezpregrad,代码行数:15,代码来源:Screen4Lobby.cs

示例11:

		void CompoundButton.IOnCheckedChangeListener.OnCheckedChanged (CompoundButton buttonView, bool isChecked)
		{
			if (isChecked) {

				btnOne.Enabled=false;
				btnZero.Enabled=false;
				Animate (holoCircularProgressBar,this);
			}
			else {
				_animationHasEnded = true;
				_progressBarAnimator.Cancel();

				btnOne.Enabled=true;
				btnZero.Enabled=true;
			}
		}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:16,代码来源:MainActivity.cs

示例12: OnCreate

        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.camera_demo);

            animateToggle = FindViewById<CompoundButton> (Resource.Id.animate);
            customDurationToggle = FindViewById<CompoundButton> (Resource.Id.duration_toggle);
            customDurationBar = FindViewById<SeekBar> (Resource.Id.duration_bar);

            updateEnabledState ();

            var mapFragment =
                (SupportMapFragment) SupportFragmentManager.FindFragmentById (Resource.Id.map);
            mapFragment.GetMapAsync (this);
        }
开发者ID:ravensorb,项目名称:AdMobBuddy,代码行数:16,代码来源:CameraDemoActivity.cs

示例13: OnUseBillingAddress

        void OnUseBillingAddress(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            AddrLine1.Text = e.IsChecked ? Cust.BillingAddress.Line1 : "";
            AddrLine2.Text = e.IsChecked ? Cust.BillingAddress.Line2 : "";
            AddrCity.Text = e.IsChecked ? Cust.BillingAddress.City: "";
            AddrState.Text = e.IsChecked ? Cust.BillingAddress.State: "";
            AddrZipCode.Text = e.IsChecked ? Cust.BillingAddress.ZipCode: "";

            AddrLine1.Enabled = !e.IsChecked;
            AddrLine2.Enabled = !e.IsChecked;
            AddrCity.Enabled = !e.IsChecked;
            AddrState.Enabled = !e.IsChecked;
            AddrZipCode.Enabled = !e.IsChecked;

            if (e.IsChecked)
                NotifyCompleted();
            else
                NotifyIncomplete();
        }
开发者ID:cryptocoinx,项目名称:WizarDroid.Net,代码行数:19,代码来源:CustomerWizardStep3.cs

示例14: OnCreateView

		public override Android.Views.View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
		{
			
			mRootView = (ViewGroup)inflater.Inflate (Resource.Layout.fragment_vendor_detail, null);
			mName = mRootView.FindViewById<TextView> (Resource.Id.vendor_name);
			mStarred = mRootView.FindViewById<CompoundButton> (Resource.Id.star_button);
	
			mStarred.Focusable = true;
			mStarred.Clickable = true;
	
			// Larger target triggers star toggle
			View starParent = mRootView.FindViewById (Resource.Id.header_vendor);
				        
			FractionalTouchDelegate.SetupDelegate (starParent, mStarred, new RectF (0.6f, 0f, 1f, 0.8f));
	
			mLogo = mRootView.FindViewById<ImageView> (Resource.Id.vendor_logo);
			mUrl = mRootView.FindViewById<TextView> (Resource.Id.vendor_url);
			mDesc = mRootView.FindViewById<TextView> (Resource.Id.vendor_desc);
			mProductDesc = mRootView.FindViewById<TextView> (Resource.Id.vendor_product_desc);
	
			return mRootView;
		}
开发者ID:BratislavDimitrov,项目名称:monodroid-samples,代码行数:22,代码来源:VendorDetailFragment.cs

示例15: tgConnect_HandleCheckedChange

		void tgConnect_HandleCheckedChange (object sender, CompoundButton.CheckedChangeEventArgs e)
		{
			if (e.IsChecked) {
				driver = UsbSerialProber.Acquire(manager);
				if (driver != null) {
					driver.Open ();
					driver.SetBaudRate (9600);
					beginListenForData ();
					dataToSend = new Java.Lang.String("e");
					writeData(dataToSend);
				}
				else
				{
					Toast.MakeText (this, "Error Arduino no detectado", ToastLength.Short).Show();
				}
			} else {
					try {
						driver.Close();
					} catch (System.Exception ex) {
						Console.WriteLine (ex.Message);
					}
			}
		}
开发者ID:EnriqueProinfo,项目名称:Mono,代码行数:23,代码来源:MainActivity.cs


注:本文中的CompoundButton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。