public void LoadProjects()
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            using (var solutionProcessor = new SolutionProcessor(mCurrentSolution))
            {
                var projVers = solutionProcessor.BuildVersions(mCurrentSolution);


                ShowUnloadedWarning = solutionProcessor.DetectedUnloadedProjects;
                FailedProjects      = solutionProcessor.FailedProjects;

                foreach (var item in projVers.OrderBy(projver => projver.Name))
                {
                    this.Items.Add(item);
                }


                ShowIos     = projVers.HasIosMac;
                ShowAndroid = projVers.HasAndroid;

                Version outVersion = null;

                if (System.Version.TryParse(AssemblyVersion, out outVersion))
                {
                    if (ShowIos)
                    {
                        CocoaShortVersion = CocoaAppVersion.ToShortVersion(outVersion);
                    }

                    if (ShowAndroid)
                    {
                        AndroidBuild = AndroidAppVersion.ToBuild(outVersion);
                    }
                }
            }


            LoadAssVersion();

            LoadAssFileVersion();
        }
示例#2
0
        public void LoadProjects()
        {
            try
            {
                ThreadHelper.ThrowIfNotOnUIThread();



                using (var solutionProcessor = new SolutionProcessor(mCurrentSolution))
                {
                    solutionProcessor.OnLoadedProjects += (s, e) =>
                    {
                        TotalProjects = e;

                        LoadingProgressUpdated(this, null);
                    };

                    solutionProcessor.OnStartingProject += (s, e) =>
                    {
                        CurrentProject     = e.Item1;
                        CurrentProjectName = e.Item2;

                        LoadingProgressUpdated(this, null);
                    };

                    var projVers = solutionProcessor.BuildVersions(mCurrentSolution);
                    ShowUnloadedWarning = solutionProcessor.DetectedUnloadedProjects;
                    FailedProjects      = solutionProcessor.FailedProjects;

                    foreach (var item in projVers.OrderBy(projver => projver.Name))
                    {
                        this.Items.Add(item);
                    }


                    ShowIos     = projVers.HasIosMac;
                    ShowAndroid = projVers.HasAndroid;

                    Version outVersion = null;

                    if (System.Version.TryParse(AssemblyVersion, out outVersion))
                    {
                        if (ShowIos)
                        {
                            CocoaShortVersion = CocoaAppVersion.ToShortVersion(outVersion);
                        }

                        if (ShowAndroid)
                        {
                            AndroidBuild = AndroidAppVersion.ToBuild(outVersion);
                        }
                    }
                }


                LoadAssVersion();

                LoadAssFileVersion();

                IsLoaded = true;

                IsBusy = false;
            }
            catch (Exception ex)
            {
                System.Windows.MessageBox.Show(ex.Message, "Error loading projects");
            }
        }