コード例 #1
0
        public void OnStartAddon()
        {
            if (SelectedItem == null)
            {
                if (!TrySelectFirstPossibleItem())
                {
                    return;
                }
            }

            string parameters = ParametersBuilder.BuildStartParameter(SelectedItem, _allAddons);

            // Change date for single selected item.
            SelectedItem.ChangeLastUseDateToNow();

            // Change date for all selected items.
            foreach (var item in _allAddons)
            {
                if (item != SelectedItem && item.Selected)
                {
                    item.ChangeLastUseDateToNow();
                }
            }

            ProcessStart.StartProcess(parameters);
            _history.UpdateHistoryFromList(Addons);
        }