Beispiel #1
0
        private void ContextItemMouseover_OnEvent(object sender, IControlHtmlEventArgs e)
        {
            var src = e.EventObj.srcElement;

            src.style.backgroundColor = "lightblue";
            src.style.color           = "black";
        }
Beispiel #2
0
        private void ContextItemClicked_OnEvent(object sender, IControlHtmlEventArgs e)
        {
            var eventObj    = e?.EventObj;
            var contextItem = eventObj?.srcElement;

            if (contextItem.IsNull())
            {
                return;
            }

            CurrentPopup?.Hide();

            // Get innerText and find Action
            string cmd = contextItem.innerText;

            if (!cmd.IsNullOrEmpty() && PluginCmdActionMap.TryGetValue(cmd, out var action))
            {
                action.Invoke();
            }
        }
Beispiel #3
0
        private void ContextItemMouseout_OnEvent(object sender, IControlHtmlEventArgs e)
        {
            var src = e.EventObj.srcElement;

            src.style.backgroundColor = "white";
        }