Exemple #1
0
        /// <summary>
        /// adds the currently selected process to the favorites
        /// </summary>
        private void AddFavoriteClick(object sender, EventArgs e)
        {
            if (this.processList.SelectedItem == null)
            {
                return;
            }

            var process = this.processList.GetItemText(this.processList.SelectedItem);

            if (Favorites.CanAdd(process))
            {
                Favorites.AddGame(process);

                this.favoritesList.DataSource = null;
                this.favoritesList.DataSource = Favorites.List;
            }
        }