public TriggerWindow(TriggerViewModel trigger) { this.Trigger = trigger; this.InitializeComponent(); this.DataContext = this.Trigger; this.SetTimeZoneInfo(); }
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); } }