示例#1
0
 private void AddCandidate(GroupCandidateDto data) => Candidates.Children.Add(ComponentsBuilder.BuildAcceptableFrame(data.UserLogin, data, OnCandidateAccept, OnCandidateReject));
示例#2
0
        private bool BuildAndDisplay(DirectoryInfo directory)
        {
            Topmost = true;
            Topmost = false;

            //// Step 1 : Model creation
            Model = new Model();

            if (SpecWindow.ExcludeDefaultCSGraphicLibAssemblies)
            {
                ExcludeDotNETFrameworkAssemblies();
                Model.AddRegex("PresentationCore");
                Model.AddRegex("PresentationFramework");
                Model.AddRegex("WindowsBase");
                Model.AddRegex("System.Deployment");
                Model.AddRegex("System.Drawing");
                Model.AddRegex("System.Windows.Forms");
            }
            else if (SpecWindow.ExcludeDefaultCSLibAssemblies)
            {
                ExcludeDotNETFrameworkAssemblies();
            }

            try
            {
                Model.Build(directory);
                ModelCommonDataOrganizer.Organize(Model);
            }
            catch (Exception e)
            {
                System.Windows.MessageBox.Show("Grapher can analyze only DLLs built with .NET assemblies: " + e.Message);
            }

            //// Step 2 : Specifications adding

            if (!string.IsNullOrEmpty(SpecWindow.SpecFilePath))
            {
                try
                {
                    ComponentsBuilder builder = new ComponentsBuilder(SpecWindow.SpecFilePath);
                    builder.Build(Model);
                    Model
                    .SoftwareComponents
                    .Where(x => x.Name != "System Assemblies")
                    .ToList()
                    .ForEach(x => ModelCommonDataOrganizer.UpdateGroups(Model, x));
                }
                catch
                {
                    return(false); // an exception is raised in JSONParser or in a SoftwareComponent constructor
                }
            }

            //// Step 3 : Model representation
            ResetViews();
            DrawGraph();
            UpdateTreeView();
            analysis.Visibility   = Visibility.Visible;
            hideErrors.Visibility = Visibility.Visible;
            startLabel.Visibility = Visibility.Hidden;

            return(true);
        }
示例#3
0
 private void AddInvitesElement(GroupTileDto data) => Invites.Children.Add(ComponentsBuilder.BuildAcceptableFrame(data.Name, data, OnInviteAccept, OnInviteReject));