本文整理汇总了C#中Spinner.PerformClick方法的典型用法代码示例。如果您正苦于以下问题:C# Spinner.PerformClick方法的具体用法?C# Spinner.PerformClick怎么用?C# Spinner.PerformClick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spinner
的用法示例。
在下文中一共展示了Spinner.PerformClick方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
//.........这里部分代码省略.........
imgBtnPlus.Click += (object sender, EventArgs e) => {
if (SetTag == 1) {
imgBtnPlus.SetImageResource (Resource.Drawable.Multsign);
txtidofNewPanel.Visibility = ViewStates.Visible;
tRowSaveCancel.Visibility = ViewStates.Visible;
spinMasterPanel.Visibility = ViewStates.Visible;
SetTag = 0;
} else if (SetTag == 0) {
imgBtnPlus.SetImageResource (Resource.Drawable.plussign);
txtidofNewPanel.Visibility = ViewStates.Gone;
tRowSaveCancel.Visibility = ViewStates.Gone;
spinMasterPanel.Visibility = ViewStates.Gone;
SetTag = 1;
}
};
btnCancel.Click += delegate {
imgBtnPlus.SetImageResource (Resource.Drawable.plussign);
tRowSaveCancel.Visibility = ViewStates.Gone;
txtidofNewPanel.Visibility = ViewStates.Gone;
spinMasterPanel.Visibility = ViewStates.Gone;
};
#region SavePanelCLickActivity
btnSavePanel.Click += (object sender, EventArgs e) => {
imgBtnPlus.SetImageResource (Resource.Drawable.plussign);
tRowSaveCancel.Visibility = ViewStates.Gone;
txtidofNewPanel.Visibility = ViewStates.Gone;
spinMasterPanel.Visibility = ViewStates.Gone;
string newPanelText = txtidofNewPanel.Text.Trim ();
if (newPanelText != "") {
string spinnerItem = spinMasterPanel.SelectedItem.ToString (); // Selected item in the spinner
if (spinnerItem != "Select Parent Panel") {
child = new List<string> ();
child.Add (newPanelText);
if (NewParentItems.ContainsKey (spinnerItem)) {
NewParentItems [spinnerItem].AddRange (child);
dictPanelItemsForMail [spinnerItem].AddRange (child);
} else {
NewParentItems [spinnerItem] = child;
dictPanelItemsForMail [spinnerItem] = child;
}
} else {
child = new List<string> ();
NewParentItems [newPanelText] = child;
dictPanelItemsForMail [newPanelText] = child;
appendSpinner (spinMasterPanel, newListForSpin, spinnerArrayAdapter, First);
}
child = new List<string> ();
childItems.Add (child);
myListViewAdap adapterNew = new myListViewAdap (NewParentItems);
adapterNew.setInflater ((LayoutInflater)GetSystemService (Context.LayoutInflaterService), this);
mListExView.SetAdapter (adapter); //Inflate Expandable Adapter
txtidofNewPanel.Text = "";
InputMethodManager inputmanager = (InputMethodManager)GetSystemService (Context.InputMethodService);
inputmanager.HideSoftInputFromWindow (txtidofNewPanel.WindowToken, HideSoftInputFlags.None); // To hide the keyboard
spinMasterPanel.SetSelection (0, true);
}
};
#endregion SavePanelActivityEnd
// Code to hide keyboard on spinner touch
spinMasterPanel.Touch += (object sender, View.TouchEventArgs e) => {
InputMethodManager inputmanager = (InputMethodManager)GetSystemService (Context.InputMethodService);
inputmanager.HideSoftInputFromWindow (spinMasterPanel.WindowToken, HideSoftInputFlags.None);
spinMasterPanel.PerformClick ();
};
// code to handle ChildClick Event
mListExView.ChildClick += mListExView_ChildClick;
connectMaster (1);
}