Exemplo n.º 1
0
        public override async Task Execute(params object[] args)
        {
            // check for replay
            var element = args?.FirstOrDefault(a => a is XElement e && e.Name.LocalName == "codes") as XElement;

            if (!string.IsNullOrEmpty(element?.Value))
            {
                codes = element.Value.Split(',');
            }

            if (codes == null)
            {
                using (var dialog = new AddTitleIconDialog())
                {
                    if (dialog.ShowDialog(owner) == DialogResult.Cancel)
                    {
                        IsCancelled = true;
                        return;
                    }

                    codes = dialog.GetSelectedCodes();
                }
            }

            await AddIcons(codes);
        }
Exemplo n.º 2
0
        public override async Task Execute(params object[] args)
        {
            string[] codes = null;

            using (var dialog = new AddTitleIconDialog())
            {
                if (dialog.ShowDialog(owner) == DialogResult.Cancel)
                {
                    return;
                }

                codes = dialog.GetSelectedCodes();
            }

            await AddIcons(codes);
        }