Ejemplo n.º 1
0
        /// <summary>
        /// Get command executer and lock builder
        /// </summary>
        /// <param name="keyTag"></param>
        /// <param name="paramaters"></param>
        /// <param name="locker"> Use to lock builder after get command executer</param>
        /// <param name="isViewModelOnKey"> True if create a command executer with a view model</param>
        /// <param name="windowTag"></param>
        /// <returns></returns>
        protected virtual ICommandExecuter OnKey(string keyTag, object paramaters, BuilderLocker locker, bool isViewModelOnKey, string windowTag)
        {
            logger.I("OnKey: keyTag = " + keyTag + " windowTag = " + windowTag);

#if DEBUG
            Stopwatch onKeyWatcher = Stopwatch.StartNew();
#endif

            var action = _keyActionListener.OnKey(isViewModelOnKey ? ParentsModel : null
                                                  , logger
                                                  , windowTag
                                                  , keyTag
                                                  , paramaters
                                                  , locker);
#if DEBUG
            onKeyWatcher.Stop();
            var timeExecuted = onKeyWatcher.ElapsedMilliseconds;
            logger.D("Time executed on key = " + timeExecuted + "(ms)");
#endif
            logger.I("Done: keyTag = " + keyTag + " windowTag = " + windowTag);

            return(action as ICommandExecuter);
        }
Ejemplo n.º 2
0
 protected override ICommandExecuter OnKey(string keyTag, object paramaters, BuilderLocker locker, bool isViewModelOnKey = true, string windowTag = WindowTag.WINDOW_TAG_MAIN_SCREEN)
 {
     return(base.OnKey(keyTag, paramaters, locker, isViewModelOnKey, windowTag));
 }
Ejemplo n.º 3
0
        public IAction OnKey(BaseViewModel viewModel, ILogger logger, string windowTag, string keyFeature, object dataTransfer, BuilderLocker locker)
        {
            IAction action = GetKeyActionAndLockFactory(windowTag, keyFeature, locker.IsLock, locker.Status, viewModel, logger);

            return(action);
        }
Ejemplo n.º 4
0
        public IAction OnKey(string windowTag, string keyFeature, object dataTransfer, BuilderLocker locker)
        {
            IAction action = GetKeyActionAndLockFactory(windowTag, keyFeature, locker.IsLock, locker.Status);

            return(action);
        }