Exemple #1
0
        private void FindingApm(object sender, WidgetIdEventArgs e)
        {
            BeginEventHandler beginAsync = (sa, ea, cb, state) => BeginFind(e.Id, sa, ea, cb, state);

            AsyncManager.RegisterAsyncTask(beginAsync, EndFind, null);
            AsyncManager.ExecuteRegisteredAsyncTasks();
        }
Exemple #2
0
        private void DeletingWidget(object sender, WidgetIdEventArgs e)
        {
            var widget = _dbContext.Widgets.Find(e.Id);

            if (widget != null)
            {
                _dbContext.Widgets.Remove(widget);
                _dbContext.SaveChanges();
            }
        }
Exemple #3
0
        private void Finding(object sender, WidgetIdEventArgs e)
        {
            using (var context = new MvpWebFormsContext())
            {
                var widget = context.Widgets.Find(e.Id);

                if (widget != null)
                {
                    View.Model.Widgets.Add(widget);
                    View.Model.ShowResult = true;
                }
            }
        }
Exemple #4
0
 private void FindingTap(object sender, WidgetIdEventArgs e)
 {
     AsyncManager.RegisterAsyncTask(() => FindingAsync(e.Id));
     AsyncManager.ExecuteRegisteredAsyncTasks();
 }