示例#1
0
        private void OnStatusItemClicked(Item item)
        {
            switch (item.Type)
            {
            case ItemType.RunScriptAction:
            case ItemType.RunScriptInTerminalAction:
                ProcessHelpers.ExecuteCommand(item.BashScript, item.Params, item.Terminal);
                break;

            case ItemType.Link:
                ProcessHelpers.ExecuteCommand("open", new string[] { item.Href });
                break;

            case ItemType.RefreshAction:
                Plugin.Execute();
                break;

            default:
                System.Diagnostics.Debug.WriteLine($"No action registered for item {item.Title} with type {item.Type}.");
                break;
            }
        }