本文整理汇总了C#中DialogClickEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DialogClickEventArgs类的具体用法?C# DialogClickEventArgs怎么用?C# DialogClickEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DialogClickEventArgs类属于命名空间,在下文中一共展示了DialogClickEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OkClicked
private void OkClicked(object sender, DialogClickEventArgs dialogClickEventArgs)
{
var dialog = sender as AlertDialog;
if (null != dialog)
{
}
}
示例2: AddClicked
private void AddClicked(object sender, DialogClickEventArgs e)
{
var feedName = this._view.FindViewById<EditText> (Resource.Id.FeedName).Text;
var feedUri = this._view.FindViewById<EditText> (Resource.Id.FeedUri).Text;
var newFeed = new Feed { Name = feedName, FeedLocation = new Uri (feedUri) };
this._feedManager.AddFeed (newFeed);
}
示例3: HandleNeutralButtonClick
// TODO: Currently Does Not Work
// TODO: Need To Override Custom OnClickListener To Keep Dialog Open
private void HandleNeutralButtonClick(object sender, DialogClickEventArgs e)
{
var dialog = (AlertDialog) sender;
breakfastEditText.Text = String.Empty;
lunchEditText.Text = String.Empty;
dinnerEditText.Text = String.Empty;
dialog.Wait();
}
示例4: Dialog_Click
private void Dialog_Click(object sender, DialogClickEventArgs e)
{
var clickedItem = ItemsSource.Cast<object>().ElementAtOrDefault(e.Which);
if (clickedItem != null)
{
SelectedItem = clickedItem;
OnSelectedItemChanged(EventArgs.Empty);
dialog.Dismiss();
}
}
示例5: HandlePositiveButtonClick
private void HandlePositiveButtonClick(object sender, DialogClickEventArgs e)
{
var dialog = (AlertDialog)sender;
ReminderItem reminder = new ReminderItem();
reminder.Date = date;
reminder.Text = ReminderEditText.Text;
reminderAdapter.Add(reminder);
dialog.Dismiss();
}
示例6: OnSelectItemForCreation
public void OnSelectItemForCreation(object sender, DialogClickEventArgs args)
{
var selected = itemsForEditList[args.Which];
if (selected == Strings.EditLabel)
{
tcs.SetResult(ModifyOperation.Edit);
}
else if (selected == Strings.DeleteLabel)
{
tcs.SetResult(ModifyOperation.Delete);
}
}
示例7: OnItemSelected
private async void OnItemSelected (object sender, DialogClickEventArgs args)
{
if (modelLoaded && model != null) {
var m = adapter.GetEntry (args.Which);
TaskModel task = null;
ProjectModel project = null;
WorkspaceModel workspace = null;
if (m is TaskData) {
task = (TaskModel)(TaskData)m;
if (task.Project != null) {
await task.Project.LoadAsync ();
project = task.Project;
workspace = project.Workspace ?? task.Workspace;
} else {
workspace = task.Workspace;
}
} else if (m is ProjectAndTaskView.Project) {
var wrap = (ProjectAndTaskView.Project)m;
if (wrap.IsNoProject) {
workspace = new WorkspaceModel (wrap.WorkspaceId);
} else if (wrap.IsNewProject) {
var data = wrap.Data;
var ws = new WorkspaceModel (data.WorkspaceId);
// Show create project dialog instead
new CreateProjectDialogFragment (model, ws, data.Color)
.Show (FragmentManager, "new_project_dialog");
} else {
project = (ProjectModel)wrap.Data;
workspace = project.Workspace;
}
} else if (m is ProjectAndTaskView.Workspace) {
var wrap = (ProjectAndTaskView.Workspace)m;
workspace = (WorkspaceModel)wrap.Data;
}
if (project != null || task != null || workspace != null) {
model.Workspace = workspace;
model.Project = project;
model.Task = task;
await model.SaveAsync ();
}
}
}
示例8: HandlePositiveButtonClick
private void HandlePositiveButtonClick(object sender, DialogClickEventArgs e)
{
var dialog = (AlertDialog)sender;
// Determine Routing Activity
switch (ActivityID)
{
// TODO: Add Real Password Verification
case Constants.EDIT_SCRIBE_DATA:
{
if (PasswordEditText.Text.Equals(Password))
{
// Launch New Activity
Console.WriteLine("Edit Scribe Password Correct");
Intent editScribeActivity = new Intent(Application.Context, typeof(EditDataScribeActivity));
StartActivity(editScribeActivity);
}
else
{
Toast.MakeText(Application.Context, "Edit Scribe Data Password Wrong", ToastLength.Short).Show();
dialog.Dismiss();
}
break;
}
case Constants.EDIT_IM_DATA:
{
if (PasswordEditText.Text.Equals(Password))
{
// Launch New Activity
Console.WriteLine("Edit IM Password Correct");
Intent editIMActivity = new Intent(Application.Context, typeof(EditDataIMActivity));
StartActivity(editIMActivity);
}
else
{
Toast.MakeText(Application.Context, "Edit IM Data Password Wrong", ToastLength.Short).Show();
dialog.Dismiss();
}
break;
}
}
}
示例9: OnItemSelected
private void OnItemSelected (object sender, DialogClickEventArgs args)
{
if (model != null) {
var m = adapter.GetEntry (args.Which);
TaskModel task = null;
ProjectModel project = null;
WorkspaceModel workspace = null;
if (m is TaskModel) {
task = (TaskModel)m;
project = task != null ? task.Project : null;
workspace = project != null ? project.Workspace : null;
} else if (m is ProjectAndTaskView.Project) {
var wrap = (ProjectAndTaskView.Project)m;
if (wrap.IsNoProject) {
workspace = wrap.WorkspaceModel;
} else if (wrap.IsNewProject) {
var proj = wrap.Model;
// Show create project dialog instead
new CreateProjectDialogFragment (model, proj.Workspace, proj.Color)
.Show (FragmentManager, "new_project_dialog");
} else {
project = wrap.Model;
workspace = project != null ? project.Workspace : null;
}
} else if (m is ProjectAndTaskView.Workspace) {
var wrap = (ProjectAndTaskView.Workspace)m;
workspace = wrap.Model;
}
if (project != null || task != null || workspace != null) {
model.Workspace = workspace;
model.Project = project;
model.Task = task;
}
}
Dismiss ();
}
示例10: clickFoodDialogList
private void clickFoodDialogList(object sender, DialogClickEventArgs args)
{
listChoice = choices [args.Which];
Console.WriteLine ("Selected: {0}", args.Which);
// Open a confirmation alert
AlertDialog.Builder confirmFoodDialogBuilder = new AlertDialog.Builder(this);
confirmFoodDialogBuilder.SetTitle ("Confirm selection");
confirmFoodDialogBuilder.SetMessage ("You are adding the following choice: " +
listChoice + ". Do you wish to proceed?");
// Insert the selection into the database on confirmation
confirmFoodDialogBuilder.SetPositiveButton ("Confirm", delegate {
dismissAddFoodDialog ();
LogEntry newLog = new LogEntry {
LoggedAt = DateTime.Now,
Level = LogEntry.MapToLevel(args.Which)
};
using (var db = new SQLiteConnection(dbPath)) {
db.Insert (newLog);
var count = db.ExecuteScalar<int> ("Select COUNT(*) from LogEntry");
Console.WriteLine("There are now {0} Log Entries", count);
}
});
// Close all alerts if the user cancels at this point
confirmFoodDialogBuilder.SetNegativeButton ("Cancel", delegate {
dismissAddFoodDialog ();
});
confirmFoodDialog = confirmFoodDialogBuilder.Create ();
confirmFoodDialog.Show ();
}
示例11: OnCancelButtonClicked
private void OnCancelButtonClicked (object sender, DialogClickEventArgs args)
{
}
示例12: OnCreateButtonClicked
private void OnCreateButtonClicked (object sender, DialogClickEventArgs args)
{
// Commit changes the user has made thusfar
if (updateTagHandler != null) {
updateTagHandler.OnModifyTagList (SelectedTags);
}
CreateTagDialogFragment.NewInstance (WorkspaceId)
.SetCreateNewTagHandler (updateTagHandler)
.Show (FragmentManager, "new_tag_dialog");
Dismiss ();
}
示例13: OnPositiveClick
private void OnPositiveClick (object sender, DialogClickEventArgs e)
{
var ctx = ServiceContainer.Resolve<Context> ();
var clipboard = (ClipboardManager)ctx.GetSystemService (Context.ClipboardService);
var clip = ClipData.NewPlainText (Resources.GetString (Resource.String.AppName), UserMessage);
clipboard.PrimaryClip = clip;
var toast = Toast.MakeText (ctx, Resource.String.FeedbackCopiedToClipboardToast, ToastLength.Short);
toast.Show ();
StartActivity (new Intent (
Intent.ActionView,
Android.Net.Uri.Parse (Toggl.Phoebe.Build.GooglePlayUrl)
));
}
示例14: handllerNotingButton
void handllerNotingButton(object sender, DialogClickEventArgs e)
{
AlertDialog objAlertDialog = sender as AlertDialog;
Button btnClicked = objAlertDialog.GetButton(e.Which);
Toast.MakeText(this, "you cliked on " + btnClicked.Text, ToastLength.Long).Show();
}
示例15: DownloadInfobases
private void DownloadInfobases(object sender, DialogClickEventArgs e)
{
string customerCode;
using (var editText = ((AlertDialog)sender).FindViewById<EditText>(0))
customerCode = editText.Text;
string password;
using (var editPassword = ((AlertDialog)sender).FindViewById<EditText>(1))
password = editPassword.Text;
string url = string.Format("http://192.168.0.2/bitmobile/test/script/locator/products?code={0}&pwd={1}"
, customerCode, password);
if (_manager.DownloadInfobases(url))
LoadList();
else
Toast.MakeText(Activity, D.ERROR, ToastLength.Long).Show();
}