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(); }
void CompoundButton.IOnCheckedChangeListener.OnCheckedChanged(CompoundButton buttonView, bool isChecked) { if (OnCheckedChange != null) { OnCheckedChange(buttonView, isChecked); } }
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); } }
private void OnRadioButtonCheckedChange(object sender, CompoundButton.CheckedChangeEventArgs args) { var radionButton = (sender as RadioButton); if (radionButton != null) { this.Check(radionButton.Id); } }
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; }
void checkBox_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e) { Agreed = e.IsChecked; if (e.IsChecked) NotifyCompleted(); else NotifyIncomplete(); }
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; } }
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")); }
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); } } } }
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; } }
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; } }
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); }
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(); }
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; }
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); } } }
public override Android.Views.View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2) { mRootView = (ViewGroup)inflater.Inflate (Resource.Layout.fragment_session_detail, null); mTabHost = mRootView.FindViewById<TabHost> (Android.Resource.Id.TabHost); mTabHost.Setup (); mTitle = mRootView.FindViewById<TextView> (Resource.Id.session_title); mSubtitle = mRootView.FindViewById<TextView> (Resource.Id.session_subtitle); mStarred = mRootView.FindViewById<CompoundButton> (Resource.Id.star_button); mStarred.CheckedChange += HandleCheckedChange; mStarred.Focusable = true; mStarred.Clickable = true; // Larger target triggers star toggle View starParent = mRootView.FindViewById<View> (Resource.Id.header_session); FractionalTouchDelegate.SetupDelegate (starParent, mStarred, new RectF (0.6f, 0f, 1f, 0.8f)); mAbstract = mRootView.FindViewById<TextView> (Resource.Id.session_abstract); mRequirements = mRootView.FindViewById<TextView> (Resource.Id.session_requirements); SetupSummaryTab (); SetupNotesTab (); SetupLinksTab (); return mRootView; }
public void OnCheckedChanged(CompoundButton buttonView, bool isChecked) { slidingMenu.setFadeEnabled(isChecked); }
public void OnCheckedChanged(CompoundButton buttonView, bool isChecked) { this.Value = isChecked; }
void HandleCheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e) { if (e.IsChecked && Player != null) { switch (((Button)sender).Id) { case Resource.Id.style_default: Player.SetPlayerStyle(YouTubePlayerPlayerStyle.Default); break; case Resource.Id.style_minimal: Player.SetPlayerStyle(YouTubePlayerPlayerStyle.Minimal); break; case Resource.Id.style_chromeless: Player.SetPlayerStyle(YouTubePlayerPlayerStyle.Chromeless); break; } } }
/// <summary> /// Includes the specified compoundButton. /// </summary> /// <param name="compoundButton">The compoundButton.</param> public void Include(CompoundButton compoundButton) { compoundButton.CheckedChange += (sender, args) => compoundButton.Checked = !compoundButton.Checked; }
private async void OnToggleSensorSection(object sender, CompoundButton.CheckedChangeEventArgs e) { if (!Model.Instance.Connected) { return; } EnsureSensorsCreated(); Switch sw = (Switch)sender; TableLayout table = mSensorMap[sw]; if (e.IsChecked) { table.Visibility = ViewStates.Visible; if (table == mTableAccelerometer) { mRadioGroupAccelerometer.Enabled = false; SetChildrenEnabled(mRadioGroupAccelerometer, false); } else if (table == mTableGyro) { mRadioGroupGyro.Enabled = false; SetChildrenEnabled(mRadioGroupGyro, false); } // Turn on the appropriate sensor try { if (sw == mSwitchAccelerometer) { SampleRate rate; if (mRadioAcc16.Checked) { rate = SampleRate.Ms16; } else if (mRadioAcc32.Checked) { rate = SampleRate.Ms32; } else { rate = SampleRate.Ms128; } mTextAccX.Text = ""; mTextAccY.Text = ""; mTextAccZ.Text = ""; accelerometerSensor.StartReadings(rate); } else if (sw == mSwitchGyro) { SampleRate rate; if (mRadioGyro16.Checked) { rate = SampleRate.Ms16; } else if (mRadioGyro32.Checked) { rate = SampleRate.Ms32; } else { rate = SampleRate.Ms128; } mTextGyroAccX.Text = ""; mTextGyroAccY.Text = ""; mTextGyroAccZ.Text = ""; mTextGyroAngX.Text = ""; mTextGyroAngY.Text = ""; mTextGyroAngZ.Text = ""; gyroscopeSensor.StartReadings(rate); } else if (sw == mSwitchDistance) { mTextTotalDistance.Text = ""; mTextSpeed.Text = ""; mTextPace.Text = ""; mTextPedometerMode.Text = ""; distanceSensor.StartReadings(); } else if (sw == mSwitchHeartRate) { var sensorMngr = Model.Instance.Client.SensorManager; if (await sensorMngr.RequestHeartRateConsentTaskAsync(Activity)) { mTextHeartRate.Text = ""; mTextHeartRateQuality.Text = ""; heartRateSensor.StartReadings(); } else { Util.ShowExceptionAlert(Activity, "Start heart rate sensor", new Exception("User declined permission.")); } } else if (sw == mSwitchContact) { mTextContact.Text = ""; contactSensor.StartReadings(); } else if (sw == mSwitchSkinTemperature) { mTextSkinTemperature.Text = ""; skinTemperatureSensor.StartReadings(); } else if (sw == mSwitchUltraviolet) { mTextUltraviolet.Text = ""; uvSensor.StartReadings(); } else if (sw == mSwitchPedometer) { mTextTotalSteps.Text = ""; pedometerSensor.StartReadings(); } } catch (BandException ex) { Util.ShowExceptionAlert(Activity, "Register sensor listener", ex); } } else { table.Visibility = ViewStates.Gone; if (table == mTableAccelerometer) { mRadioGroupAccelerometer.Enabled = true; SetChildrenEnabled(mRadioGroupAccelerometer, true); } else if (table == mTableGyro) { mRadioGroupGyro.Enabled = true; SetChildrenEnabled(mRadioGroupGyro, true); } // Turn off the appropriate sensor try { if (sw == mSwitchAccelerometer) { accelerometerSensor.StopReadings(); } else if (sw == mSwitchGyro) { gyroscopeSensor.StopReadings(); } else if (sw == mSwitchDistance) { distanceSensor.StopReadings(); } else if (sw == mSwitchHeartRate) { heartRateSensor.StopReadings(); } else if (sw == mSwitchContact) { contactSensor.StopReadings(); } else if (sw == mSwitchSkinTemperature) { skinTemperatureSensor.StopReadings(); } else if (sw == mSwitchUltraviolet) { uvSensor.StopReadings(); } else if (sw == mSwitchPedometer) { pedometerSensor.StopReadings(); } } catch (BandException ex) { Util.ShowExceptionAlert(Activity, "Unregister sensor listener", ex); } } }
void CompoundButton.IOnCheckedChangeListener.OnCheckedChanged(CompoundButton buttonView, bool isChecked) { ((IViewController)Element).SetValueFromRenderer(Switch.IsToggledProperty, isChecked); }
public void Include(CompoundButton cb) { cb.CheckedChange += (sender, args) => cb.Checked = !cb.Checked; }
void HandleCheckedChange (object sender, CompoundButton.CheckedChangeEventArgs e) { var values = new ContentValues (); values.Put (ScheduleContract.Sessions.SESSION_STARRED, e.IsChecked ? 1 : 0); mHandler.StartUpdate (mSessionUri, values); // Because change listener is set to null during initialization, these won't fire on // pageview. //AnalyticsUtils.getInstance(getActivity()).trackEvent("Sandbox", isChecked ? "Starred" : "Unstarred", mTitleString, 0); }
public void OnCheckedChanged(CompoundButton buttonView, bool isChecked) { OnUserValueChanged(isChecked); }
private void OnCustomThemeCheckChanged(object sender, CompoundButton.CheckedChangeEventArgs e) { mThemeView.Visibility = e.IsChecked ? ViewStates.Visible : ViewStates.Gone; }
private void OnBillableCheckBoxCheckedChange (object sender, CompoundButton.CheckedChangeEventArgs e) { if (TimeEntry == null) return; var isBillable = !BillableCheckBox.Checked; if (TimeEntry.IsBillable != isBillable) { TimeEntry.IsBillable = isBillable; SaveTimeEntry (); } }
void AlarmEnabledChange(object sender, CompoundButton.CheckedChangeEventArgs e) { GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled")); EnableAlarm(_selectedAlarm, e.IsChecked); if (!e.IsChecked) { StopRinging(); } }
void ProxyCheckedChanged (object sender, CompoundButton.CheckedChangeEventArgs e) { if (e.IsChecked) { proxyUsername.Enabled = true; proxyPassword.Enabled = true; proxyServer.Enabled = true; proxyPort.Enabled = true; } else { proxyUsername.Enabled = false; proxyUsername.Text = ""; proxyPassword.Enabled = false; proxyPassword.Text = ""; proxyServer.Enabled = false; proxyServer.Text = ""; proxyPort.Enabled = false; proxyPort.Text = ""; proxy = null; } }
public override void onCheckedChanged(CompoundButton buttonView, bool isChecked) { string str = ""; if (isChecked) { input.Hint = SchordManager.SECURE_PREFIX + CHORD_SECURE_TEST_CHANNEL; if (!(input.Text.ToString().Equals(""))) { str = SchordManager.SECURE_PREFIX + input.Text.ToString(); } } else { input.Hint = CHORD_SECURE_TEST_CHANNEL; if (!(input.Text.ToString().Equals(""))) { str = input.Text.ToString().Substring(1); } } input.Text = str; input.Selection = input.length(); }
public void OnCheckedChanged(CompoundButton buttonView, bool isChecked) { if (isChecked) slidingMenu.setShadowDrawable( slidingMenu.Mode == SlidingMenuMode.LEFT ? R.Drawable.shadow : R.Drawable.shadowright); else slidingMenu.setShadowDrawable(null); }