本文整理汇总了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();
}
示例2: OnCheckedChange
void CompoundButton.IOnCheckedChangeListener.OnCheckedChanged(CompoundButton buttonView, bool isChecked)
{
if (OnCheckedChange != null)
{
OnCheckedChange(buttonView, isChecked);
}
}
示例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);
}
}
示例4: OnRadioButtonCheckedChange
private void OnRadioButtonCheckedChange(object sender, CompoundButton.CheckedChangeEventArgs args)
{
var radionButton = (sender as RadioButton);
if (radionButton != null)
{
this.Check(radionButton.Id);
}
}
示例5: checkBox_CheckedChange
void checkBox_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e)
{
Agreed = e.IsChecked;
if (e.IsChecked)
NotifyCompleted();
else
NotifyIncomplete();
}
示例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;
}
示例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;
}
}
示例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"));
}
示例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);
}
}
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}
}
}