public ActionView(ActionBag actionBag) { if (actionBag == null) return; var context = new ActionViewContext(actionBag); this.DataContext = context; InitializeComponent(); context.Changed += (o, e) => RaiseChanged(); this.tbParams.MouseLeftButtonDown += (o, e) => { context.BeginActionUserSettings(); }; this.btCheck.Click += (o, e) => { context.ExecuteCurrentAction(); }; this.btDelete.Click += (o, e) => { RaiseRemove(); }; this.KeyDown += (o, e) => { if (e.Key == Key.Delete) RaiseRemove(); }; }
public ActionViewExtended(ActionBag actionBag) { if (actionBag == null) return; var context = new ActionViewContext(actionBag); this.DataContext = context; InitializeComponent(); context.ActionStringSplitter = "\r\n"; context.Changed += (o, e) => RaiseChanged(); this.tbParams.MouseLeftButtonDown += (o, e) => { context.BeginActionUserSettings(); }; this.btCheck.Click += (o, e) => { context.ExecuteCurrentAction(); }; }