Exemple #1
0
        private void Select(PackageItem packageItem)
        {
            if (packageItem == selectedItem)
            {
                if (selectedItem != null)
                {
                    selectedItem.SetSelected(true);
                }
                return;
            }

            var selectedPackageName = packageItem != null ? packageItem.package.Name : null;

            PackageCollection.Instance.SelectedPackage = selectedPackageName;

            if (selectedItem != null)
            {
                selectedItem.SetSelected(false); // Clear Previous selection
            }
            selectedItem = packageItem;
            if (selectedItem == null)
            {
                OnSelected(null);
                return;
            }

            selectedItem.SetSelected(true);
            ScrollIfNeeded();
            OnSelected(selectedItem.package);
        }
Exemple #2
0
        private void Select(PackageItem packageItem)
        {
            if (packageItem == selectedItem)
            {
                return;
            }

            if (selectedItem != null)
            {
                selectedItem.SetSelected(false);        // Clear Previous selection
            }
            selectedItem = packageItem;
            if (selectedItem == null)
            {
                return;
            }

            selectedItem.SetSelected(true);
            OnSelected(selectedItem.package);
        }