コード例 #1
0
        private void OnChangeTrigger()
        {
            try
            {
                var items     = this.view.SelectedItems;
                var viewModel = new TriggerViewModel();

                var  wnd = new TriggerWindow(viewModel);
                bool?res = wnd.ShowDialog();
                if (res.HasValue && res.Value)
                {
                    ////using (new WaitCursor())
                    ////{
                    ////    this.repository.UpdateTrigger(items.Select(bd => bd.Uri), wnd.Trigger.TriggerType);
                    ////    this.OnRefresh(new EventArgs());
                    ////}
                }
            }
            catch (Exception ex)
            {
                this.view.DisplayError(ex);
            }
        }
コード例 #2
0
        private void OnChangeTrigger()
        {
            try
            {
                var items = this.view.SelectedItems;
                var viewModel = new TriggerViewModel();

                var wnd = new TriggerWindow(viewModel);
                bool? res = wnd.ShowDialog();
                if (res.HasValue && res.Value)
                {
                    using (new WaitCursor())
                    {
                        this.repository.UpdateTrigger(items.Select(bd => bd.Uri), wnd.Trigger.Minutes, wnd.Trigger.Submissions, wnd.Trigger.TriggerType);
                        this.OnRefresh(new EventArgs());
                    }
                }
            }
            catch (Exception ex)
            {
                this.view.DisplayError(ex);
            }
        }