Exemple #1
0
        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();
        }
Exemple #2
0
 public GotFocusToScriptAction(IFieldMethods scriptService)
 {
     this.scriptService = scriptService;
 }