コード例 #1
0
        /// <summary>
        /// Load all github tags in the background.
        /// </summary>
        private async void LoadData()
        {
            var client         = new GitHubClient(new ProductHeaderValue("RockLauncher"));
            var tags           = client.Repository.GetAllTags("SparkDevNetwork", "Rock");
            var minimumVersion = new Version(1, 1, 0);

            var vsList = Support.GetVisualStudioInstances();

            var list = ( await tags )
                       .Select(t => new GitHubTag(t))
                       .Where(t => t.Version >= minimumVersion)
                       .OrderByDescending(t => t.Version)
                       .ToList();

            list.Insert(0, new GitHubTag());

            Dispatcher.Invoke(() =>
            {
                cbTags.ItemsSource   = list;
                txtStatus.Text       = string.Empty;
                cbTags.SelectedIndex = 0;

                cbVisualStudio.ItemsSource = vsList;
                if (vsList.Count > 0)
                {
                    cbVisualStudio.SelectedIndex = 0;
                }
            });
        }
コード例 #2
0
        /// <summary>
        /// Load all github tags in the background.
        /// </summary>
        private void LoadData()
        {
            var vsList = Support.GetVisualStudioInstances();

            cbVisualStudio.ItemsSource = vsList;
            if (vsList.Count > 0)
            {
                cbVisualStudio.SelectedIndex = 0;
            }

            UpdateState();
        }