public MainWindowViewModel( IContainerProvider container, IScriptDialogs scriptService, IPersonMethods personMethods, IFieldMethods fieldMethods) { this.container = container; this.scriptService = scriptService; this.personScriptMethods = scriptService as IPersonMethods; GotFocusAction = new GotFocusToScriptAction <Person>(fieldMethods); ActivatedAction = new EventAction() { FirstTimeActivatedAction = OnNewPerson }; stateInfoTimer = new DispatcherTimer(new TimeSpan(0, 0, stateInfoTimeout), DispatcherPriority.Background, (sender, args) => StateInfo = string.Empty, Dispatcher.CurrentDispatcher); fieldInfoTimer = new DispatcherTimer(new TimeSpan(0, 0, fieldInfoTimeout), DispatcherPriority.Background, (sender, args) => FieldInfo = string.Empty, Dispatcher.CurrentDispatcher); persons = new ObservableCollection <Person>(); ApplyTitle(); }
public GotFocusToScriptAction(IFieldMethods scriptService) { this.scriptService = scriptService; }