Beispiel #1
0
        public JKey SaveKey()
        {
            JKey jk = new JKey();

            jk.KeyName         = _keyName;
            jk.Enabled         = _enabled;
            jk.KeyTag          = _keyTag;
            jk.ExecuteLocation = _executeLocation;
            jk.KeyState        = EventState;
            jk.Task            = KeyTaskAction.SaveTask();

            return(jk);
        }
Beispiel #2
0
        public Key(JKey jk)
        {
            _keyName         = jk.KeyName;
            EventState       = jk.KeyState;
            _keyTag          = jk.KeyTag;
            _enabled         = jk.Enabled;
            _executeLocation = jk.ExecuteLocation;
            KeyTaskAction    = new KeyTask(jk.Task);

            if (jk.Task == null)
            {
                MigrateToTask();
            }

            _timer.Interval = _defInterval;
            _timer.Elapsed += TimerOnElapsed;
            _timer.Stop();
        }