Exemplo n.º 1
0
        private void OnHotkeyTextInputValueChanged(string text)
        {
            if (ChangingVisibility || _changingSelectedAction)
            {
                return;
            }

            UpdateHotkeyPanelWithText(_activeActionPanel, text);

            var textAction = GetHotkeyActionForPanel <HotkeyTextAction>(_activeActionPanel);

            if (text.Length == 0)
            {
                if (textAction != null)
                {
                    SetHotketActionForPanel <HotkeyAction>(_activeActionPanel, null);
                }
            }
            else if (textAction == null)
            {
                textAction = new HotkeyTextAction(text, _autoSendCheckbox.checkbox.Checked);
                SetHotketActionForPanel(_activeActionPanel, textAction);
            }
            else
            {
                textAction.Text = text;
            }
        }
Exemplo n.º 2
0
        private void OnAutoSendValueChanged(bool value)
        {
            if (_changingSelectedAction)
            {
                return;
            }

            _activeActionPanel.textColor = value ? Core.Colors.White : Core.Colors.Default;
            var textAction = GetHotkeyActionForPanel <HotkeyTextAction>(_activeActionPanel);

            if (textAction == null)
            {
                textAction = new HotkeyTextAction(_inputField.text, value);
                SetHotketActionForPanel(_activeActionPanel, textAction);
            }
            else
            {
                textAction.AutoSend = value;
            }
        }