Exemplo n.º 1
0
 /// <summary>
 /// Selecteds the row view configuration.
 /// </summary>
 /// <returns></returns>
 public static UPMCoITextRowViewConfig SelectedRowViewConfig()
 {
     return(new UPMCoITextRowViewConfig
     {
         Color = AureaColor.UpCurrentSystemColor(),
         Font = UIFont.FontWithNameSize("HelveticaNeue", 10),
         ShadowColor = AureaColor.RedGreenBlue(1.0, 1.0, 1.0),
         ShadowOffset = new Size(0, 1)
     });
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPMCoIViewConfigProvider"/> class.
        /// </summary>
        public UPMCoIViewConfigProvider()
        {
            var systemColor = AureaColor.UpCurrentSystemColor();

            this.configurations        = new List <UPMCoIViewConfig>();
            this.NodesViewType         = UPNodesViewType.Circle;
            this.EdgeViewType          = UPEdgeViewType.Line;
            this.ChildMoveType         = UPChildNodeMoveType.Always;
            this.MinNodes              = 3;
            this.PreAnimationDuration  = 0.25f;
            this.PostAnimationDuration = 0.25f;
            this.AnimationDuration     = 0.25f;
            this.FrameAndLabelAsBase   = true;
            this.LessOrMoreChildrenAnimationDuration = 0.4f;

            var parentEdgeConfigurationLevel1 = new UPMCoIEdgeViewConfig(UIFont.SystemFontOfSize(12), 5.0f,
                                                                         AureaColor.RedGreenBlue(2.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0), AureaColor.RedGreenBlue(238.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f),
                                                                         5.0f, 0.2f, /*kCALineJoinMiter*/ null, null, 0.0f, 1.0f, 0.4f, 0.0f, new Size(0, 1), AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f),
                                                                         1.0f, 1.0f, new Size(0, 1), AureaColor.RedGreenBlue(1.0, 1.0, 1.0), null, 12.0f, AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f),
                                                                         AureaColor.RedGreenBlue(255.0 / 255.0, 90.0 / 255.0, 16.0 / 255.0), null, null, null, null, 1.0f, 1.0f, null, null, null, null, null, null, null, null);

            var parentEdgeConfigurationLevel2 = new UPMCoIEdgeViewConfig(UIFont.SystemFontOfSize(12), 5.0f,
                                                                         AureaColor.RedGreenBlue(2.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0), AureaColor.RedGreenBlue(238.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f),
                                                                         3.0f, 0.2f, /*kCALineJoinMiter*/ null, null, 0.0f, 1.0f, 0.4f, 0.0f, new Size(0, 1), AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f),
                                                                         1.0f, 1.0f, new Size(0, 1), AureaColor.RedGreenBlue(1.0, 1.0, 1.0), null, 12.0f, AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f),
                                                                         AureaColor.RedGreenBlue(255.0 / 255.0f, 90.0 / 255.0f, 16.0 / 255.0f), null, null, null, null, 1.0f, 1.0f, null, null, null, null, null, null, null, null);

            var additionalEdgeConfiguration = new UPMCoIEdgeViewConfig(UIFont.SystemFontOfSize(12), 5.0f,
                                                                       AureaColor.RedGreenBlue(2.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0), AureaColor.RedGreenBlue(238.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f),
                                                                       3.0f, 0.2f, /*kCALineJoinMiter*/ null, new List <int> {
                5, 5
            }, 0.0f, 1.0f, 0.4f, 0.0f, new Size(0, 1),
                                                                       AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f), 1.0f, 1, new Size(0, 1), AureaColor.RedGreenBlue(1.0, 1.0, 1.0),
                                                                       null, null, AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f), AureaColor.RedGreenBlue(255.0 / 255.0f, 90.0 / 255.0f, 16.0 / 255.0f),
                                                                       null, null, null, null, 1.0f, 1.0f, null, null, null, null, null, null, null, null);

            var config = new UPMCoIViewConfig();

            this.configurations.Add(config);

            Level0Config(systemColor, additionalEdgeConfiguration, config);
            Level1Config(systemColor, parentEdgeConfigurationLevel1, additionalEdgeConfiguration, config);
            Level2Config(systemColor, parentEdgeConfigurationLevel2, additionalEdgeConfiguration, config);
            Level3Config(systemColor, parentEdgeConfigurationLevel2, additionalEdgeConfiguration, config);
            Level4Config(systemColor, parentEdgeConfigurationLevel2, additionalEdgeConfiguration, config);
        }