/// <summary>
        /// Builds Tabs for Forms
        /// </summary>
        /// <param name="dashboardOrganizer">
        /// UPMOrganizer
        /// </param>
        /// <param name="form">
        /// Form
        /// </param>
        private void BuildFormTabs(UPMOrganizer dashboardOrganizer, Form form)
        {
            var count = form.NumberOfTabs;

            for (int i = 0; i < count; i++)
            {
                var parameterDictionary = new Dictionary <string, object> {
                    { "ConfigTabNr", i.ToString() }
                };
                var pageViewReference = ViewReference.ViewReferenceWith(parameterDictionary);
                pageViewReference = pageViewReference.ViewReferenceWith(RecordIdentification);
                var pageModelController = PageForViewReference(pageViewReference);
                if (pageModelController != null)
                {
                    FormTab tab = form.TabAtIndex(i);
                    if (i == 0 && tab.AttributeForKey("Color") != null)
                    {
                        Organizer.OrganizerColor = AureaColor.ColorWithString(tab.AttributeForKey("Color"));
                    }

                    pageModelController.Page.Parent    = dashboardOrganizer;
                    pageModelController.Page.LabelText = tab.Label;
                    AddPageModelController(pageModelController);
                    dashboardOrganizer.AddPage(pageModelController.Page);
                }
            }
        }
        /// <summary>
        /// Builds the detail organizer pages.
        /// </summary>
        protected override void BuildDetailOrganizerPages()
        {
            UPMOrganizer detailOrganizer = new UPMOrganizer(StringIdentifier.IdentifierWithStringId("Documemnts"));

            detailOrganizer.ExpandFound = true;
            this.TopLevelElement        = detailOrganizer;
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;
            string organizerColorKey            = this.ViewReference.ContextValueForKey("OrganizerColor");

            if (!string.IsNullOrEmpty(organizerColorKey))
            {
                this.Organizer.OrganizerColor = AureaColor.ColorWithString(organizerColorKey);
            }

            string         headerName = this.ViewReference.ContextValueForKey("HeaderName");
            UPConfigHeader header     = null;

            if (!string.IsNullOrEmpty(headerName))
            {
                header = configStore.HeaderByName(headerName);
            }

            detailOrganizer.SubtitleText = header != null ? header.Label : LocalizedString.TextProcessDocuments;

            this.ShouldShowTabsForSingleTab = false;
            DocumentPageModelController docPageModelController = new DocumentPageModelController(this.ViewReference);

            this.AddPageModelController(docPageModelController);
        }
        private static void Level1Config(AureaColor systemColor, UPMCoIEdgeViewConfig parentEdgeConfigurationLevel1, UPMCoIEdgeViewConfig additionalEdgeConfiguration, UPMCoIViewConfig config)
        {
            var level = new UPMCoILevelViewConfig();

            var node = new UPMCoINodeViewConfig(AureaColor.RedGreenBlue(1.0, 1.0, 1.0), new Size(58, 58),
                                                AureaColor.RedGreenBlueAlpha(100.0 / 255.0, 162.0 / 255.0, 160.0 / 255.0, 1.0), 5.0f, 50.0f, true, true, true, new Size(75, 75),
                                                new Size(175, 175), int.MaxValue, new Size(150, 60), new Size(25, 40), new Size(0, 0), new Size(0, 0), 0.0f, new Size(0, 1), 1.0f,
                                                AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f), false, new Size(150, 100), 60.0f, 55, true,
                                                parentEdgeConfigurationLevel1, additionalEdgeConfiguration, 5, UPNodeViewAction.SelectNodeAndExpandCollapse, UPNodeViewAction.SelectNode,
                                                UPNodeViewAction.CustomViaDelegate, AureaColor.RedGreenBlueAlpha(187.0f / 255.0f, 187.0f / 255.0f, 187.0f / 255.0f, 1.0),
                                                AureaColor.RedGreenBlueAlpha(1.0, 1.0, 1.0, 1.0), 1.5f, 5, 17, AureaColor.RedGreenBlue(1.0, 1.0, 1.0), null, systemColor,
                                                null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                                                null, null, null, null, null, null, null, null, null, null);

            level.AddConfig(node);

            UpdateRowConfig(
                systemColor,
                node,
                UIFont.FontWithNameSize(HelveticaNeue, 12),
                UIFont.FontWithNameSize(HelveticaNeue, 12),
                UIFont.FontWithNameSize(HelveticaNeue, 12),
                UIFont.FontWithNameSize(HelveticaNeue, 12));

            config.AddConfig(level);
        }
Пример #4
0
        /// <summary>
        /// Builds the pages from view reference.
        /// </summary>
        public override void BuildPagesFromViewReference()
        {
            UPMOrganizer detailOrganizer = new UPMOrganizer(StringIdentifier.IdentifierWithStringId("History"));

            this.TopLevelElement        = detailOrganizer;
            detailOrganizer.ExpandFound = true;
            string organizerColorKey = this.ViewReference.ContextValueForKey("OrganizerColor");

            if (!string.IsNullOrEmpty(organizerColorKey))
            {
                this.Organizer.OrganizerColor = AureaColor.ColorWithString(organizerColorKey);
            }

            string headerName              = this.ViewReference.ContextValueForKey("HeaderName");
            IConfigurationUnitStore store  = ConfigurationUnitStore.DefaultStore;
            UPConfigHeader          header = store.HeaderByName(headerName);

            if (!string.IsNullOrEmpty(header.Label))
            {
                detailOrganizer.TitleText = header.Label;
            }

            this.ShouldShowTabsForSingleTab = false;
            UPHistorySearchPageModelController docPageModelController = new UPHistorySearchPageModelController(this.ViewReference);

            this.AddPageModelController(docPageModelController);
        }
        /// <summary>
        /// Applies the json dictionary.
        /// </summary>
        /// <param name="dict">The dictionary.</param>
        public void ApplyJsonDictionary(Dictionary <string, object> dict)
        {
#if PORTING
            foreach (string key in dict.Keys)
            {
                //SEL sel = NSSelectorFromString(key);
                if (key.StartsWith("field") || key.StartsWith("selectedfield"))
                {
                    this.SetValueForKey(dict[key], key);
                }

                const char type = this.TypeOfPropertyNamed(key);
                if (type)
                {
                    string typeInfo = NSString.StringWithCStringEncoding(type, NSUTF8StringEncoding);
                    object value;
                    if (typeInfo.HasPrefix("T@\"UPColor\""))
                    {
                        // UPColor conversion
                        AureaColor upcolor = AureaColor.ColorWithString((string)dict[key]);
                        value = upcolor;
                    }
                    else if (typeInfo.HasPrefix("T{CGSize=ff}"))
                    {
                        ArrayList array  = (ArrayList)dict[key];
                        NSNumber  width  = array[0];
                        NSNumber  height = array[1];
                        value = NSValue.ValueWithCGSize(CGSizeMake(width.FloatValue(), height.FloatValue()));
                    }
                    else if (typeInfo.HasPrefix("T@\"UIFont\""))
                    {
                        ArrayList array      = (ArrayList)dict.ObjectForKey(key);
                        string    familyName = array[0];
                        NSNumber  size       = array[1];
                        value = UIFont.FontWithNameSize(familyName, size.FloatValue());
                    }
                    else if (typeInfo.HasPrefix("T@\"UPMCoIEdgeViewConfig\"") || typeInfo.HasPrefix("T@\"UPMCoINodeViewConfig\""))
                    {
                        UPMCoIConfigBase base = this.ValueForKey(key);
                        value = dict.ObjectForKey(key);
                        if (value.IsKindOfClass(NSDictionary.TheClass))
                        {
                            base.ApplyJsonDictionary(value);
                        }

                        continue;
                    }
                    else
                    {
                        value = dict[key];
                    }

                    this.SetValueForKey(value, key);
                }
            }
#endif
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMCoIEdgeViewConfig"/> class.
 /// </summary>
 public UPMCoIEdgeViewConfig()
     : this(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, 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)
 {
 }
        /// <summary>
        /// Builds the detail organizer pages.
        /// </summary>
        public void BuildDetailOrganizerPages()
        {
            UPMOrganizer detailOrganizer = new UPMOrganizer(StringIdentifier.IdentifierWithStringId("Details"));

            this.TopLevelElement        = detailOrganizer;
            detailOrganizer.ExpandFound = true;
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;
            string          configName          = this.ViewReference.ContextValueForKey("LayoutName");
            WebConfigLayout layout = configStore.WebConfigLayoutByName(configName);

            if (layout == null)
            {
                return;
            }

            string organizerColorKey = this.ViewReference.ContextValueForKey("OrganizerColor");

            if (!string.IsNullOrEmpty(organizerColorKey))
            {
                this.Organizer.OrganizerColor = AureaColor.ColorWithString(organizerColorKey);
            }

            string         headerName = this.ViewReference.ContextValueForKey("HeaderName");
            UPConfigHeader header     = null;

            if (!string.IsNullOrEmpty(headerName))
            {
                header = configStore.HeaderByName(headerName);
            }

            if (header == null)
            {
                headerName = "SYSTEMINFO.Expand";
                header     = configStore.HeaderByName(headerName);
            }

            if (header != null)
            {
                detailOrganizer.SubtitleText = header.Label;
                this.AddActionButtonsFromHeaderRecordIdentification(header, null);
            }
            else
            {
                detailOrganizer.SubtitleText = LocalizedString.TextSettings;
                UPMOrganizerAction action = new UPMOrganizerAction(StringIdentifier.IdentifierWithStringId("action.edit"));
                action.SetTargetAction(this, this.SwitchToEdit);
                action.LabelText = LocalizedString.TextEdit;
                action.IconName  = "Button:Edit";
                this.AddOrganizerHeaderActionItem(action);
            }

            SettingsViewPageModelController detailPageModelController = new SettingsViewPageModelController(this.ViewReference);
            Page overviewPage = detailPageModelController.Page;

            this.AddPageModelController(detailPageModelController);
            detailOrganizer.AddPage(overviewPage);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPMResultSection"/> class.
        /// </summary>
        /// <param name="identifier">
        /// The identifier.
        /// </param>
        public UPMResultSection(IIdentifier identifier)
            : base(identifier)
        {
            // Default Style Initialization
            // this.SectionField.valueFontStyle = UPMFontStylePlain;
            // this.SectionField.ValueFontColor = AureaColor.ColorWithString(@"0.33;0.33;0.33;1.0"); // dark Grey
            this.BarColor = AureaColor.ColorWithString(@"1.0;0.0;0.0;1.0");

            // this.SectionField.valueFontSize = 19.0f;
        }
Пример #9
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)
     });
 }
Пример #10
0
 /// <summary>
 /// Rows the view configuration.
 /// </summary>
 /// <returns></returns>
 public static UPMCoITextRowViewConfig RowViewConfig()
 {
     return(new UPMCoITextRowViewConfig
     {
         Color = AureaColor.RedGreenBlue(102.0 / 255.0f, 102.0 / 255.0f, 102.0 / 255.0f),
         Font = UIFont.FontWithNameSize("HelveticaNeue", 10),
         ShadowColor = AureaColor.RedGreenBlue(1.0, 1.0, 1.0),
         ShadowOffset = new Size(0, 1)
     });
 }
        /// <summary>
        /// Results the section for search result.
        /// </summary>
        /// <param name="preparedSearch">The prepared search.</param>
        /// <param name="result">The result.</param>
        /// <returns></returns>
        public virtual UPMResultSection ResultSectionForSearchResult(UPSearchPageModelControllerPreparedSearch preparedSearch, UPCRMResult result)
        {
            var configStore   = ConfigurationUnitStore.DefaultStore;
            var resultContext = new UPCoreMappingResultContext(result, preparedSearch.CombinedControl, preparedSearch.ListFieldControl.NumberOfFields);

            this.SectionContexts.SetObjectForKey(resultContext, preparedSearch.InfoAreaId);
            var resultSection  = new UPMResultSection(StringIdentifier.IdentifierWithStringId($"Search_{preparedSearch.InfoAreaId}"));
            var infoAreaConfig = configStore.InfoAreaConfigById(preparedSearch.InfoAreaId);

            if (infoAreaConfig != null)
            {
                var colorKey = infoAreaConfig.ColorKey;
                if (!string.IsNullOrEmpty(colorKey))
                {
                    resultSection.BarColor = AureaColor.ColorWithString(colorKey);
                }

                var imageName = infoAreaConfig.ImageName;
                if (!string.IsNullOrEmpty(imageName))
                {
                    var fileResource = configStore.ResourceByName(imageName);
                    if (fileResource != null)
                    {
                        resultSection.GlobalSearchIconName = fileResource.FileName;
                    }
                }
            }

            resultSection.SectionField = new UPMField(StringIdentifier.IdentifierWithStringId("SectionLabel"));
            var sectionName = infoAreaConfig?.PluralName;

            if (string.IsNullOrEmpty(sectionName))
            {
                var tableInfo = UPCRMDataStore.DefaultStore.TableInfoForInfoArea(preparedSearch.InfoAreaId);
                sectionName = tableInfo != null ? tableInfo.Label : preparedSearch.InfoAreaId;
            }

            resultSection.SectionField.FieldValue = sectionName;
            var count = result.RowCount;

            for (var j = 0; j < count; j++)
            {
                var dataRow    = result.ResultRowAtIndex(j) as UPCRMResultRow;
                var identifier = new RecordIdentifier(preparedSearch.InfoAreaId, dataRow.RecordIdAtIndex(0));
                var resultRow  = new UPMResultRow(identifier);
                resultContext.RowDictionary.Add(resultRow.Key, new UPCoreMappingResultRowContext(dataRow, resultContext));
                resultContext.ExpandMapper = preparedSearch.ExpandSettings;
                resultRow.Invalid          = true;
                resultRow.DataValid        = true;
                resultSection.AddResultRow(resultRow);
            }

            return(resultSection);
        }
        /// <summary>
        /// Searches the operation did finish with count.
        /// </summary>
        /// <param name="operation">The operation.</param>
        /// <param name="count">The count.</param>
        public void SearchOperationDidFinishWithCount(Operation operation, int count)
        {
            this.ControllerState = GroupModelControllerState.Finished;
            UPMInsightBoardItem item = (UPMInsightBoardItem)this.Group.Children[0];

            item.Countable = true;
            item.Count     = count;
            item.SortIndex = this.SortIndex;
            IConfigurationUnitStore configStore   = ConfigurationUnitStore.DefaultStore;
            SearchAndList           searchAndList = configStore.SearchAndListByName(this.searchAndListConfigurationName);

            this.infoAreaid = searchAndList.InfoAreaId;
            InfoArea infoAreaConfig = configStore.InfoAreaConfigById(this.infoAreaid);

            if (!string.IsNullOrEmpty(infoAreaConfig.ColorKey))
            {
                item.Color = AureaColor.ColorWithString(infoAreaConfig.ColorKey);
            }

            if (!string.IsNullOrEmpty(this.Menu.DisplayName))
            {
                item.Title = this.Menu.DisplayName;
            }
            else
            {
                item.Title = item.Count > 1 ? infoAreaConfig.PluralName : infoAreaConfig.SingularName;
            }

            item.ImageName = this.Menu.ImageName ?? infoAreaConfig.ImageName;
            UPMAction action = new UPMAction(null);

            if (count == 1)
            {
                this.crmQuery.Find(this.requestOption, this);
                action.SetTargetAction(this, this.SwitchToDetailOrganizer);
            }
            else
            {
                action.SetTargetAction(this, this.SwitchToListOrganizer);
            }

            item.Action = action;
            if (count != 1)
            {
                this.Delegate.GroupModelControllerFinished(this);
            }
        }
        /// <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);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMCoIEdgeViewConfig"/> class.
 /// </summary>
 /// <param name="edgeTextFont">The edge text font.</param>
 /// <param name="edgeTextMinFontSize">Size of the edge text minimum font.</param>
 /// <param name="edgeTextColor">Color of the edge text.</param>
 /// <param name="edgeColor">Color of the edge.</param>
 /// <param name="edgeLineWidth">Width of the edge line.</param>
 /// <param name="edgeLineWidthForFactor">The edge line width for factor.</param>
 /// <param name="edgeLineJoin">The edge line join.</param>
 /// <param name="edgeDashPattern">The edge dash pattern.</param>
 /// <param name="edgeTextOpacity">The edge text opacity.</param>
 /// <param name="edgeOpacity">The edge opacity.</param>
 /// <param name="shadowOpacity">The shadow opacity.</param>
 /// <param name="shadowRadius">The shadow radius.</param>
 /// <param name="shadowOffset">The shadow offset.</param>
 /// <param name="shadowColor">Color of the shadow.</param>
 /// <param name="textShadowOpacity">The text shadow opacity.</param>
 /// <param name="textShadowRadius">The text shadow radius.</param>
 /// <param name="textShadowOffset">The text shadow offset.</param>
 /// <param name="textShadowColor">Color of the text shadow.</param>
 /// <param name="selectedEdgeTextFont">The selected edge text font.</param>
 /// <param name="selectedEdgeTextMinFontSize">Size of the selected edge text minimum font.</param>
 /// <param name="selectedEdgeTextColor">Color of the selected edge text.</param>
 /// <param name="selectedEdgeColor">Color of the selected edge.</param>
 /// <param name="selectedEdgeLineWidth">Width of the selected edge line.</param>
 /// <param name="selectedEdgeLineWidthForFactor">The selected edge line width for factor.</param>
 /// <param name="selectedEdgeLineJoin">The selected edge line join.</param>
 /// <param name="selectedEdgeDashPattern">The selected edge dash pattern.</param>
 /// <param name="selectedEdgeTextOpacity">The selected edge text opacity.</param>
 /// <param name="selectedEdgeOpacity">The selected edge opacity.</param>
 /// <param name="selectedShadowOpacity">The selected shadow opacity.</param>
 /// <param name="selectedShadowRadius">The selected shadow radius.</param>
 /// <param name="selectedShadowOffset">The selected shadow offset.</param>
 /// <param name="selectedShadowColor">Color of the selected shadow.</param>
 /// <param name="selectedTextShadowOpacity">The selected text shadow opacity.</param>
 /// <param name="selectedTextShadowRadius">The selected text shadow radius.</param>
 /// <param name="selectedTextShadowOffset">The selected text shadow offset.</param>
 /// <param name="selectedTextShadowColor">Color of the selected text shadow.</param>
 public UPMCoIEdgeViewConfig(UIFont edgeTextFont, float edgeTextMinFontSize, AureaColor edgeTextColor, AureaColor edgeColor, float edgeLineWidth,
                             float edgeLineWidthForFactor, string edgeLineJoin, List <int> edgeDashPattern, float edgeTextOpacity, float edgeOpacity, float shadowOpacity,
                             float shadowRadius, Size shadowOffset, AureaColor shadowColor, float textShadowOpacity, float textShadowRadius, Size textShadowOffset,
                             AureaColor textShadowColor, UIFont selectedEdgeTextFont, float?selectedEdgeTextMinFontSize, AureaColor selectedEdgeTextColor,
                             AureaColor selectedEdgeColor, float?selectedEdgeLineWidth, float?selectedEdgeLineWidthForFactor, string selectedEdgeLineJoin,
                             List <int> selectedEdgeDashPattern, float?selectedEdgeTextOpacity, float?selectedEdgeOpacity, float?selectedShadowOpacity,
                             float?selectedShadowRadius, Size?selectedShadowOffset, AureaColor selectedShadowColor, float?selectedTextShadowOpacity,
                             float?selectedTextShadowRadius, Size?selectedTextShadowOffset, AureaColor selectedTextShadowColor)
 {
     this.EdgeTextFont                   = edgeTextFont;
     this.EdgeTextMinFontSize            = edgeTextMinFontSize;
     this.EdgeTextColor                  = edgeTextColor;
     this.EdgeColor                      = edgeColor;
     this.EdgeLineWidth                  = edgeLineWidth;
     this.EdgeLineWidthForFactor         = edgeLineWidthForFactor;
     this.EdgeLineJoin                   = edgeLineJoin;
     this.EdgeDashPattern                = edgeDashPattern;
     this.EdgeTextOpacity                = edgeTextOpacity;
     this.EdgeOpacity                    = edgeOpacity;
     this.ShadowOpacity                  = shadowOpacity;
     this.ShadowRadius                   = shadowRadius;
     this.ShadowOffset                   = shadowOffset;
     this.ShadowColor                    = shadowColor;
     this.TextShadowOpacity              = textShadowOpacity;
     this.TextShadowRadius               = textShadowRadius;
     this.TextShadowOffset               = textShadowOffset;
     this.TextShadowColor                = textShadowColor;
     this.SelectedEdgeTextFont           = selectedEdgeTextFont ?? edgeTextFont;
     this.SelectedEdgeTextMinFontSize    = selectedEdgeTextMinFontSize ?? edgeTextMinFontSize;
     this.SelectedEdgeTextColor          = selectedEdgeTextColor ?? edgeTextColor;
     this.SelectedEdgeColor              = selectedEdgeColor ?? edgeColor;
     this.SelectedEdgeLineWidth          = selectedEdgeLineWidth ?? edgeLineWidth;
     this.SelectedEdgeLineWidthForFactor = selectedEdgeLineWidthForFactor ?? edgeLineWidthForFactor;
     this.SelectedEdgeLineJoin           = selectedEdgeLineJoin ?? edgeLineJoin;
     this.SelectedEdgeDashPattern        = selectedEdgeDashPattern ?? edgeDashPattern;
     this.SelectedEdgeTextOpacity        = selectedEdgeTextOpacity ?? edgeTextOpacity;
     this.SelectedEdgeOpacity            = selectedEdgeOpacity ?? edgeOpacity;
     this.SelectedShadowOpacity          = selectedShadowOpacity ?? shadowOpacity;
     this.SelectedShadowRadius           = selectedShadowRadius ?? shadowRadius;
     this.SelectedShadowOffset           = selectedShadowOffset ?? shadowOffset;
     this.SelectedShadowColor            = selectedShadowColor ?? shadowColor;
     this.SelectedTextShadowOpacity      = selectedTextShadowOpacity ?? textShadowOpacity;
     this.SelectedTextShadowRadius       = selectedTextShadowRadius ?? textShadowRadius;
     this.SelectedTextShadowOffset       = selectedTextShadowOffset ?? textShadowOffset;
     this.SelectedTextShadowColor        = selectedTextShadowColor ?? textShadowColor;
 }
        private static void UpdateRowConfig(
            AureaColor systemColor,
            UPMCoINodeViewConfig node,
            UIFont textFont0,
            UIFont selectedTextFont0,
            UIFont textFont1,
            UIFont selectedTextFont1)
        {
            var rowConfig0 = node.TextRowConfigAtIndex(0);

            rowConfig0.Color        = AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f);
            rowConfig0.Font         = textFont0;
            rowConfig0.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfig0.ShadowOffset = new Size(0, 1);
            rowConfig0.LineNumbers  = 1;

            var rowConfigS0 = node.SelectedTextRowConfigAtIndex(0);

            rowConfigS0.Color        = systemColor;
            rowConfigS0.Font         = selectedTextFont0;
            rowConfigS0.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfigS0.ShadowOffset = new Size(0, 1);
            rowConfigS0.LineNumbers  = 1;

            var rowConfig1 = node.TextRowConfigAtIndex(1);

            rowConfig1.Color        = AureaColor.RedGreenBlue(102.0 / 255.0f, 102.0 / 255.0f, 102.0 / 255.0f);
            rowConfig1.Font         = textFont1;
            rowConfig1.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfig1.ShadowOffset = new Size(0, 1);
            rowConfig1.LineNumbers  = 1;

            var rowConfigS1 = node.SelectedTextRowConfigAtIndex(1);

            rowConfigS1.Color        = systemColor;
            rowConfigS1.Font         = selectedTextFont1;
            rowConfigS1.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfigS1.ShadowOffset = new Size(0, 1);
            rowConfigS1.LineNumbers  = 1;
        }
Пример #16
0
        /// <summary>
        /// Builds the pages from view reference.
        /// </summary>
        public override void BuildPagesFromViewReference()
        {
            UPMOrganizer detailOrganizer = new UPMOrganizer(StringIdentifier.IdentifierWithStringId("Details"));

            this.TopLevelElement = detailOrganizer;
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;

            this.ConfigName = this.ViewReference.ContextValueForKey("LayoutName");
            WebConfigLayout layout = configStore.WebConfigLayoutByName(this.ConfigName);

            if (layout == null)
            {
                return;
            }

            string organizerColorKey = this.ViewReference.ContextValueForKey("OrganizerColor");

            if (!string.IsNullOrEmpty(organizerColorKey))
            {
                this.Organizer.OrganizerColor = AureaColor.ColorWithString(organizerColorKey);
            }

            string         headerName = this.ViewReference.ContextValueForKey("HeaderName");
            UPConfigHeader header     = null;

            if (!string.IsNullOrEmpty(headerName))
            {
                header = configStore.HeaderByName(headerName);
            }

            detailOrganizer.TitleText = header != null ? header.Label : LocalizedString.TextSettings;

            EditSettingsPageModelController detailPageModelController = new EditSettingsPageModelController(this.ViewReference);
            Page overviewPage = detailPageModelController.Page;

            this.AddPageModelController(detailPageModelController);
            detailOrganizer.AddPage(overviewPage);
            this.AddOrganizerActions();
            detailOrganizer.ExpandFound = true;
        }
Пример #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPMCoINodeViewConfig"/> class.
        /// </summary>
        public UPMCoINodeViewConfig()
            : this(AureaColor.RedGreenBlueAlpha(1.0, 1.0, 1.0, 1.0), new Size(44, 44), AureaColor.RedGreenBlueAlpha(206.0 / 255.0, 82.0 / 255.0, 126.0 / 255.0, 1.0),
                   2.0f, 50.0f, true, true, true, new Size(75, 75), new Size(75, 75), int.MaxValue, new Size(150, 60), new Size(25, 40), default(Size),
                   default(Size), 0.0f, new Size(0, 1), 1.0f, AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f), false,
                   new Size(150, 100), 60.0f, 55, true, new UPMCoIEdgeViewConfig(), null, 5,
                   UPNodeViewAction.SelectNodeAndExpandCollapse, UPNodeViewAction.SelectNode, UPNodeViewAction.CustomViaDelegate,
                   AureaColor.RedGreenBlueAlpha(187.0f / 255.0f, 187.0f / 255.0f, 187.0f / 255.0f, 1.0), AureaColor.RedGreenBlueAlpha(1.0, 1.0, 1.0, 1.0),
                   1.5f, 5, 14, AureaColor.RedGreenBlue(1.0, 1.0, 1.0), null, AureaColor.RedGreenBlue(255.0 / 255.0f, 90.0 / 255.0f, 16.0 / 255.0f),
                   null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                   null, null, null, null, null, null, null, null, null, null)
        {
            UPMCoITextRowViewConfig rowConfig0 = this.TextRowConfigAtIndex(0);

            rowConfig0.Color        = AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f);
            rowConfig0.Font         = UIFont.FontWithNameSize("HelveticaNeue-Medium", 10);
            rowConfig0.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfig0.ShadowOffset = new Size(0, 1);
            rowConfig0.LineNumbers  = 1;
            UPMCoITextRowViewConfig rowConfigS0 = this.SelectedTextRowConfigAtIndex(0);

            rowConfigS0.Color        = AureaColor.RedGreenBlue(255.0 / 255.0f, 90.0 / 255.0f, 16.0 / 255.0f);
            rowConfigS0.Font         = UIFont.FontWithNameSize("HelveticaNeue-Medium", 10);
            rowConfigS0.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfigS0.ShadowOffset = new Size(0, 1);
            rowConfigS0.LineNumbers  = 1;
            UPMCoITextRowViewConfig rowConfig1 = this.TextRowConfigAtIndex(1);

            rowConfig1.Color        = AureaColor.RedGreenBlue(102.0 / 255.0f, 102.0 / 255.0f, 102.0 / 255.0f);
            rowConfig1.Font         = UIFont.FontWithNameSize("HelveticaNeue", 10);
            rowConfig1.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfig1.ShadowOffset = new Size(0, 1);
            rowConfig1.LineNumbers  = 1;
            UPMCoITextRowViewConfig rowConfigS1 = this.SelectedTextRowConfigAtIndex(1);

            rowConfigS1.Color        = AureaColor.RedGreenBlue(102.0 / 255.0f, 102.0 / 255.0f, 102.0 / 255.0f);
            rowConfigS1.Font         = UIFont.FontWithNameSize("HelveticaNeue", 10);
            rowConfigS1.ShadowColor  = AureaColor.RedGreenBlue(1.0, 1.0, 1.0);
            rowConfigS1.ShadowOffset = new Size(0, 1);
            rowConfigS1.LineNumbers  = 1;
        }
        private static void Level0Config(AureaColor systemColor, UPMCoIEdgeViewConfig additionalEdgeConfiguration, UPMCoIViewConfig config)
        {
            var level = new UPMCoILevelViewConfig();
            var node  = new UPMCoINodeViewConfig(AureaColor.RedGreenBlue(1.0, 1.0, 1.0), new Size(117, 117),
                                                 AureaColor.RedGreenBlueAlpha(179.0 / 255.0, 210.0 / 255.0, 103.0 / 255.0, 1.0), 8.0f, 50.0f, true, true, true, new Size(175, 175),
                                                 new Size(100, 100), int.MinValue, new Size(75, 50), new Size(40, 40), new Size(0, -25), new Size(0, 10), 0.0f, new Size(0, 1), 1.0f,
                                                 AureaColor.RedGreenBlue(219.0f / 255.0f, 219.0f / 255.0f, 219.0f / 255.0f), false, new Size(150, 100), 60.0f, 55, true, null,
                                                 additionalEdgeConfiguration, 5, UPNodeViewAction.SelectNodeAndExpandCollapse, UPNodeViewAction.SelectNode, UPNodeViewAction.RelayoutNode,
                                                 AureaColor.RedGreenBlueAlpha(187.0f / 255.0f, 187.0f / 255.0f, 187.0f / 255.0f, 1.0), AureaColor.RedGreenBlueAlpha(1.0, 1.0, 1.0, 1.0),
                                                 1.5f, 5, 26, AureaColor.RedGreenBlue(1.0, 1.0, 1.0), null, systemColor, null, null, null, null, null, null, null, null, null, null,
                                                 null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);

            level.AddConfig(node);

            var rowConfig0 = node.TextRowConfigAtIndex(0);

            rowConfig0.Color = AureaColor.RedGreenBlue(51.0 / 255.0f, 51.0 / 255.0f, 51.0 / 255.0f);
            rowConfig0.Font  = UIFont.FontWithNameSize(HelveticaNeueBold, 13);

            var rowConfigS0 = node.SelectedTextRowConfigAtIndex(0);

            rowConfigS0.Color = systemColor;
            rowConfigS0.Font  = UIFont.FontWithNameSize(HelveticaNeueBold, 13);

            var rowConfig1 = node.TextRowConfigAtIndex(1);

            rowConfig1.Color = AureaColor.RedGreenBlue(102.0 / 255.0f, 102.0 / 255.0f, 102.0 / 255.0f);
            rowConfig1.Font  = UIFont.FontWithNameSize(HelveticaNeueMedium, 12);

            var rowConfigS1 = node.SelectedTextRowConfigAtIndex(1);

            rowConfigS1.Color = systemColor;
            rowConfigS1.Font  = UIFont.FontWithNameSize(HelveticaNeueMedium, 12);

            config.AddConfig(level);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMCatalogFilterValue"/> class.
 /// </summary>
 /// <param name="label">
 /// The label.
 /// </param>
 /// <param name="color">
 /// The color.
 /// </param>
 public UPMCatalogFilterValue(string label, AureaColor color)
 {
     this.Label = label;
     this.Color = color;
 }
        /// <summary>
        /// Creates the edit field.
        /// </summary>
        /// <returns>
        /// The <see cref="UPMEditField"/>.
        /// </returns>
        public override UPMEditField CreateEditField()
        {
            var field = new UPMCatalogEditField(this.FieldIdentifier, this.MultiSelect);

            if (this.MultiSelect)
            {
                field.MultiSelectMaxCount = this.ChildFields.Count + 1;
            }

            var possibleValues   = this.Catalog?.TextValuesForFieldValues(true);
            var explicitKeyOrder = this.Catalog != null &&
                                   ConfigurationUnitStore.DefaultStore.ConfigValueIsSet("FixedCatalog.SortByCode")
                                       ? this.Catalog.ExplicitKeyOrderByCodeEmptyValueIncludeHidden(false, false)
                                       : this.Catalog?.ExplicitKeyOrderEmptyValueIncludeHidden(false, false);

            var attributes =
                ConfigurationUnitStore.DefaultStore.CatalogAttributesForInfoAreaIdFieldId(
                    this.FieldConfig.InfoAreaId,
                    this.FieldConfig.FieldId);
            var valueForCode0 = possibleValues.ValueOrDefault("0");

            if (string.IsNullOrEmpty(valueForCode0))
            {
                field.NullValueKey = "0";
            }
            else
            {
                field.NullValueText = valueForCode0;
            }

            foreach (var p in possibleValues ?? new Dictionary <string, string>())
            {
                var possibleValue = new UPMCatalogPossibleValue
                {
                    Key             = p.Key,
                    TitleLabelField = new UPMStringField(StringIdentifier.IdentifierWithStringId("x"))
                    {
                        StringValue = p.Value
                    }
                };

                if (!this.MultiSelect || !p.Key.Equals(field.NullValueKey))
                {
                    field.AddPossibleValue(possibleValue);
                }
            }

            var allKeys = field.AllKeysFromPossibleValues;

            foreach (var theObject in allKeys)
            {
                var temp = attributes?.ValuesByCode?.ValueOrDefault(JObjectExtensions.ToInt(theObject));
                if (temp == null)
                {
                    continue;
                }

                var possibleValue = field.PossibleValueForKey(theObject);
                var colorString   = temp.ColorKey;
                if (!string.IsNullOrEmpty(colorString))
                {
                    var color = AureaColor.ColorWithString(colorString);
                    possibleValue.IndicatorColor = color;
                }

                possibleValue.ImageString = temp.ImageName;
            }

            this.ApplyAttributesOnEditFieldConfig(field, this.FieldConfig);
            if (explicitKeyOrder != null)
            {
                field.ExplicitKeyOrder = explicitKeyOrder;
            }

            return(field);
        }
Пример #21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ResultRowCalendarItem" /> class.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <param name="resultContext">The result context.</param>
        /// <param name="identifier">The identifier.</param>
        /// <param name="tableCaption">The table caption.</param>
        /// <param name="tableCaptionResultFieldMap">The table caption result field map.</param>
        /// <param name="attributes">The attributes.</param>
        /// <param name="color">The color.</param>
        /// <exception cref="Exception">StartDate is null</exception>
        public ResultRowCalendarItem(UPCRMResultRow row,
                                     UPCoreMappingResultContext resultContext,
                                     IIdentifier identifier,
                                     UPConfigTableCaption tableCaption, List <UPContainerFieldMetaInfo> tableCaptionResultFieldMap,
                                     UPConfigCatalogAttributes attributes, AureaColor color)
            : base(identifier)
        {
            this.ResultContext = resultContext;
            var    fieldMapping    = this.ResultContext.FieldControl.FunctionNames();
            var    dict            = this.ResultContext.FieldControl.FunctionNames(row);
            string startDateString = dict.ValueOrDefault("Date") as string;
            string startTimeString = dict.ValueOrDefault("Time") as string;
            string endDateString   = dict.ValueOrDefault("EndDate") as string;
            string endTimeString   = dict.ValueOrDefault("EndTime") as string;

            UPConfigFieldControlField personLabelControlField = fieldMapping.ValueOrDefault("PersonLabel");

            if (personLabelControlField != null)
            {
                this.PersonLabelField = UPMStringField.StringFieldWithIdentifierValue(
                    new FieldIdentifier(row.RootRecordIdentification, personLabelControlField.Field.FieldIdentification),
                    row.FormattedFieldValueAtIndex(personLabelControlField.TabIndependentFieldIndex, null, this.ResultContext.FieldControl));
            }

            UPConfigFieldControlField companyLabelControlField = fieldMapping.ValueOrDefault("CompanyLabel");

            if (companyLabelControlField != null)
            {
                this.CompanyLabelField = UPMStringField.StringFieldWithIdentifierValue(
                    new FieldIdentifier(row.RootRecordIdentification, companyLabelControlField.Field.FieldIdentification),
                    row.FormattedFieldValueAtIndex(companyLabelControlField.TabIndependentFieldIndex, null, this.ResultContext.FieldControl));
            }

            UPConfigFieldControlField field = fieldMapping.ValueOrDefault("Status");
            string status = dict.ValueOrDefault("Status") as string;

            if (field != null)
            {
                this.StatusLabelField = UPMStringField.StringFieldWithIdentifierValue(
                    new FieldIdentifier(row.RootRecordIdentification, field.Field.FieldIdentification),
                    field.Field.ValueForRawValueOptions(status, 0));
            }

            string repLabel = dict.ValueOrDefault("RepLabel") as string;

            if (string.IsNullOrEmpty(repLabel))
            {
                string repId = dict.ValueOrDefault("RepId") as string;
                if (!string.IsNullOrEmpty(repId))
                {
                    repLabel = UPCRMDataStore.DefaultStore.Reps.RepWithId(repId).RepName;
                }
            }

            this.RepLabelField = UPMStringField.StringFieldWithIdentifierValue(StringIdentifier.IdentifierWithStringId("rep"), repLabel);
            int iType = Convert.ToInt32(dict.ValueOrDefault("Type"));

            this.Type             = (UPCalendarItemType)iType;
            this.StartDate        = StringExtensions.DateFromStrings(startDateString, startTimeString);
            this.EndDate          = StringExtensions.DateFromStrings(endDateString, endTimeString);
            this.Identification   = identifier.IdentifierAsString;
            this.Color            = color;
            this.RowColor         = this.Color;
            this.CrmResultRow     = row;
            this.IPadCalendarItem = null;
            this.HasTime          = !string.IsNullOrEmpty(startTimeString);
            this.HasEndTime       = !string.IsNullOrEmpty(endTimeString);

            UPConfigCatalogValueAttributes temp = attributes?.ValuesByCode[iType];

            if (temp != null)
            {
                if (this.Color == null)
                {
                    string colorString = temp.ColorKey;
                    if (string.IsNullOrEmpty(colorString))
                    {
                        this.Color = AureaColor.ColorWithString(colorString);
                    }
                }

                this.ImageName = temp.ImageName;
            }

            if (tableCaption != null)
            {
                this.Subject = tableCaption.TableCaptionForResultRow(row, tableCaptionResultFieldMap);
            }
            else
            {
                this.Subject = dict.ValueOrDefault("Subject") as string;
            }

            if (this.StartDate == DateTime.MinValue)
            {
                throw new Exception("StartDate is null");
            }

            if (this.EndDate == DateTime.MinValue)
            {
                this.EndDate = this.StartDate;
            }

            if (this.Type < UPCalendarItemType.Color0 || this.Type >= UPCalendarItemType.ColorCount)
            {
                this.Type = UPCalendarItemType.Color0;
            }

            //this.AllDay = this.DetermineIsAllDay();
        }
Пример #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMCoINodeViewConfig"/> class.
 /// </summary>
 /// <param name="backgroundColor">Color of the background.</param>
 /// <param name="size">The size.</param>
 /// <param name="borderColor">Color of the border.</param>
 /// <param name="borderWidth">Width of the border.</param>
 /// <param name="cornerRadius">The corner radius.</param>
 /// <param name="cornerRadiusInPercent">if set to <c>true</c> [corner radius in percent].</param>
 /// <param name="imageVisible">if set to <c>true</c> [image visible].</param>
 /// <param name="textVisible">if set to <c>true</c> [text visible].</param>
 /// <param name="childOffset">The child offset.</param>
 /// <param name="rootOffset">The root offset.</param>
 /// <param name="textAngle">The text angle.</param>
 /// <param name="maxTextSize">Maximum size of the text.</param>
 /// <param name="maxImageSize">Maximum size of the image.</param>
 /// <param name="imageOffset">The image offset.</param>
 /// <param name="textOffset">The text offset.</param>
 /// <param name="shadowRadius">The shadow radius.</param>
 /// <param name="shadowOffset">The shadow offset.</param>
 /// <param name="shadowOpacity">The shadow opacity.</param>
 /// <param name="shadowColor">Color of the shadow.</param>
 /// <param name="flatShadow">if set to <c>true</c> [flat shadow].</param>
 /// <param name="buttonsFrameSize">Size of the buttons frame.</param>
 /// <param name="buttonGap">The button gap.</param>
 /// <param name="buttonsStartGap">The buttons start gap.</param>
 /// <param name="centerButtons">if set to <c>true</c> [center buttons].</param>
 /// <param name="parentEdgeConfiguration">The parent edge configuration.</param>
 /// <param name="additionalEdgeConfiguration">The additional edge configuration.</param>
 /// <param name="maxChildren">The maximum children.</param>
 /// <param name="tapAction">The tap action.</param>
 /// <param name="longPressedAction">The long pressed action.</param>
 /// <param name="doubleTapAction">The double tap action.</param>
 /// <param name="progressIndicatorFillColor">Color of the progress indicator fill.</param>
 /// <param name="progressIndicatorStrokeColor">Color of the progress indicator stroke.</param>
 /// <param name="progressIndicatorLoopDuration">Duration of the progress indicator loop.</param>
 /// <param name="childrenStepCount">The children step count.</param>
 /// <param name="initialFontSize">Initial size of the font.</param>
 /// <param name="selectedBackgroundColor">Color of the selected background.</param>
 /// <param name="selectedSize">Size of the selected.</param>
 /// <param name="selectedBorderColor">Color of the selected border.</param>
 /// <param name="selectedBorderWidth">Width of the selected border.</param>
 /// <param name="selectedCornerRadius">The selected corner radius.</param>
 /// <param name="selectedCornerRadiusInPercent">The selected corner radius in percent.</param>
 /// <param name="selectedImageVisible">The selected image visible.</param>
 /// <param name="selectedTextVisible">The selected text visible.</param>
 /// <param name="selectedChildOffset">The selected child offset.</param>
 /// <param name="selectedRootOffset">The selected root offset.</param>
 /// <param name="selectedTextAngle">The selected text angle.</param>
 /// <param name="selectedMaxTextSize">Size of the selected maximum text.</param>
 /// <param name="selectedMaxImageSize">Size of the selected maximum image.</param>
 /// <param name="selectedImageOffset">The selected image offset.</param>
 /// <param name="selectedTextOffset">The selected text offset.</param>
 /// <param name="selectedShadowRadius">The selected shadow radius.</param>
 /// <param name="selectedShadowOffset">The selected shadow offset.</param>
 /// <param name="selectedShadowOpacity">The selected shadow opacity.</param>
 /// <param name="selectedShadowColor">Color of the selected shadow.</param>
 /// <param name="selectedButtonsFrameSize">Size of the selected buttons frame.</param>
 /// <param name="selectedButtonGap">The selected button gap.</param>
 /// <param name="selectedButtonsStartGap">The selected buttons start gap.</param>
 /// <param name="selectedCenterButtons">The selected center buttons.</param>
 /// <param name="selectedParentEdgeConfiguration">The selected parent edge configuration.</param>
 /// <param name="selectedAdditionalEdgeConfiguration">The selected additional edge configuration.</param>
 /// <param name="selectedMaxChildren">The selected maximum children.</param>
 /// <param name="selectedTapAction">The selected tap action.</param>
 /// <param name="selectedLongPressedAction">The selected long pressed action.</param>
 /// <param name="selectedDoubleTapAction">The selected double tap action.</param>
 /// <param name="selectedProgressIndicatorFillColor">Color of the selected progress indicator fill.</param>
 /// <param name="selectedProgressIndicatorStrokeColor">Color of the selected progress indicator stroke.</param>
 /// <param name="selectedProgressIndicatorLoopDuration">Duration of the selected progress indicator loop.</param>
 /// <param name="selectedChildrenStepCount">The selected children step count.</param>
 /// <param name="selectedInitialFontSize">Size of the selected initial font.</param>
 public UPMCoINodeViewConfig(AureaColor backgroundColor, Size size, AureaColor borderColor, float borderWidth, float cornerRadius,
                             bool cornerRadiusInPercent, bool imageVisible, bool textVisible, Size childOffset, Size rootOffset, int textAngle,
                             Size maxTextSize, Size maxImageSize, Size imageOffset, Size textOffset, float shadowRadius, Size shadowOffset,
                             float shadowOpacity, AureaColor shadowColor, bool flatShadow, Size buttonsFrameSize, float buttonGap, float buttonsStartGap,
                             bool centerButtons, UPMCoIEdgeViewConfig parentEdgeConfiguration, UPMCoIEdgeViewConfig additionalEdgeConfiguration, int maxChildren,
                             UPNodeViewAction tapAction, UPNodeViewAction longPressedAction, UPNodeViewAction doubleTapAction, AureaColor progressIndicatorFillColor,
                             AureaColor progressIndicatorStrokeColor, float progressIndicatorLoopDuration, int childrenStepCount, int initialFontSize,
                             AureaColor selectedBackgroundColor, Size?selectedSize, AureaColor selectedBorderColor, float?selectedBorderWidth,
                             float?selectedCornerRadius, bool?selectedCornerRadiusInPercent, bool?selectedImageVisible, bool?selectedTextVisible,
                             Size?selectedChildOffset, Size?selectedRootOffset, int?selectedTextAngle, Size?selectedMaxTextSize,
                             Size?selectedMaxImageSize, Size?selectedImageOffset, Size?selectedTextOffset, float?selectedShadowRadius,
                             Size?selectedShadowOffset, float?selectedShadowOpacity, AureaColor selectedShadowColor, Size?selectedButtonsFrameSize,
                             float?selectedButtonGap, float?selectedButtonsStartGap, bool?selectedCenterButtons,
                             UPMCoIEdgeViewConfig selectedParentEdgeConfiguration, UPMCoIEdgeViewConfig selectedAdditionalEdgeConfiguration,
                             int?selectedMaxChildren, UPNodeViewAction?selectedTapAction, UPNodeViewAction?selectedLongPressedAction, UPNodeViewAction?selectedDoubleTapAction,
                             AureaColor selectedProgressIndicatorFillColor, AureaColor selectedProgressIndicatorStrokeColor, float?selectedProgressIndicatorLoopDuration,
                             int?selectedChildrenStepCount, int?selectedInitialFontSize)
 {
     this.textRowConfig         = new List <UPMCoITextRowViewConfig>();
     this.selectedTextRowConfig = new List <UPMCoITextRowViewConfig>();
     this.BackgroundColor       = backgroundColor;
     this.Size                                  = size;
     this.BorderColor                           = borderColor;
     this.BorderWidth                           = borderWidth;
     this.CornerRadius                          = cornerRadius;
     this.CornerRadiusInPercent                 = cornerRadiusInPercent;
     this.ImageVisible                          = imageVisible;
     this.TextVisible                           = textVisible;
     this.ChildOffset                           = childOffset;
     this.RootOffset                            = rootOffset;
     this.TextAngle                             = textAngle;
     this.MaxTextSize                           = maxTextSize;
     this.MaxImageSize                          = maxImageSize;
     this.ImageOffset                           = imageOffset;
     this.TextOffset                            = textOffset;
     this.ShadowColor                           = shadowColor;
     this.ShadowOffset                          = shadowOffset;
     this.ShadowOpacity                         = shadowOpacity;
     this.ShadowRadius                          = shadowRadius;
     this.FlatShadow                            = flatShadow;
     this.ButtonsFrameSize                      = buttonsFrameSize;
     this.ButtonGap                             = buttonGap;
     this.ButtonsStartGap                       = buttonsStartGap;
     this.CenterButtons                         = centerButtons;
     this.ParentEdgeConfiguration               = parentEdgeConfiguration;
     this.AdditionalEdgeConfiguration           = additionalEdgeConfiguration;
     this.MaxChildren                           = maxChildren < 1 ? int.MaxValue : maxChildren;
     this.TapAction                             = tapAction;
     this.DoubleTapAction                       = doubleTapAction;
     this.LongPressedAction                     = longPressedAction;
     this.ProgressIndicatorFillColor            = progressIndicatorFillColor;
     this.ProgressIndicatorStrokeColor          = progressIndicatorStrokeColor;
     this.ProgressIndicatorLoopDuration         = progressIndicatorLoopDuration;
     this.ChildrenStepCount                     = childrenStepCount;
     this.InitialFontSize                       = initialFontSize;
     this.SelectedBackgroundColor               = selectedBackgroundColor ?? backgroundColor;
     this.SelectedSize                          = selectedSize ?? size;
     this.SelectedBorderColor                   = selectedBorderColor ?? borderColor;
     this.SelectedBorderWidth                   = selectedBorderWidth ?? borderWidth;
     this.SelectedCornerRadius                  = selectedCornerRadius ?? cornerRadius;
     this.SelectedCornerRadiusInPercent         = selectedCornerRadiusInPercent == true ? selectedCornerRadius != null && selectedCornerRadius != 0 : cornerRadiusInPercent;
     this.SelectedImageVisible                  = selectedImageVisible ?? imageVisible;
     this.SelectedTextVisible                   = selectedTextVisible ?? textVisible;
     this.SelectedChildOffset                   = selectedChildOffset ?? childOffset;
     this.SelectedRootOffset                    = selectedRootOffset ?? rootOffset;
     this.SelectedTextAngle                     = selectedTextAngle ?? textAngle;
     this.SelectedMaxTextSize                   = selectedMaxTextSize ?? maxTextSize;
     this.SelectedMaxImageSize                  = selectedMaxImageSize ?? maxImageSize;
     this.SelectedImageOffset                   = selectedImageOffset ?? imageOffset;
     this.SelectedTextOffset                    = selectedTextOffset ?? textOffset;
     this.SelectedShadowColor                   = selectedShadowColor ?? this.ShadowColor;
     this.SelectedShadowOffset                  = selectedShadowOffset ?? this.ShadowOffset;
     this.SelectedShadowOpacity                 = selectedShadowOpacity ?? this.ShadowOpacity;
     this.SelectedShadowRadius                  = selectedShadowRadius ?? this.ShadowRadius;
     this.SelectedButtonsFrameSize              = selectedButtonsFrameSize ?? buttonsFrameSize;
     this.SelectedButtonGap                     = selectedButtonGap ?? buttonGap;
     this.SelectedButtonsStartGap               = selectedButtonsStartGap ?? buttonsStartGap;
     this.SelectedCenterButtons                 = selectedCenterButtons ?? centerButtons;
     this.SelectedParentEdgeConfiguration       = selectedParentEdgeConfiguration ?? parentEdgeConfiguration;
     this.SelectedAdditionalEdgeConfiguration   = selectedAdditionalEdgeConfiguration ?? additionalEdgeConfiguration;
     this.SelectedMaxChildren                   = selectedMaxChildren ?? this.MaxChildren;
     this.SelectedTapAction                     = selectedTapAction ?? tapAction;
     this.SelectedDoubleTapAction               = selectedDoubleTapAction ?? doubleTapAction;
     this.SelectedLongPressedAction             = selectedLongPressedAction ?? longPressedAction;
     this.SelectedProgressIndicatorFillColor    = selectedProgressIndicatorFillColor ?? progressIndicatorFillColor;
     this.SelectedProgressIndicatorStrokeColor  = selectedProgressIndicatorStrokeColor ?? progressIndicatorStrokeColor;
     this.SelectedProgressIndicatorLoopDuration = selectedProgressIndicatorLoopDuration ?? progressIndicatorLoopDuration;
     this.SelectedChildrenStepCount             = selectedChildrenStepCount ?? childrenStepCount;
     this.SelectedInitialFontSize               = selectedInitialFontSize ?? initialFontSize;
 }
Пример #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMCoITextRowViewConfig"/> class.
 /// </summary>
 /// <param name="font">The font.</param>
 /// <param name="color">The color.</param>
 /// <param name="minFontSize">Minimum size of the font.</param>
 public UPMCoITextRowViewConfig(UIFont font, AureaColor color, float minFontSize)
 {
     this.Color       = color;
     this.Font        = font;
     this.MinFontSize = minFontSize;
 }
        private UPMGroup BuildGroup(UPMGroup group)
        {
            Dictionary <string, string> infoAreaImageFileNames = new Dictionary <string, string>();
            IConfigurationUnitStore     configStore            = ConfigurationUnitStore.DefaultStore;
            UPConfigExpand repExpand = configStore.ExpandByName("ID");

            this.linkParticipantsViewReference = null;

            if (!string.IsNullOrEmpty(this.linkParticipantsName))
            {
                SearchAndList searchAndList = configStore.SearchAndListByName(this.linkParticipantsName);
                Menu          menu          = searchAndList != null?configStore.MenuByName(searchAndList.DefaultAction) : null;

                this.linkParticipantsViewReference = menu?.ViewReference;
            }

            if (this.acceptanceCatalogAttributes == null && this.recordParticipants.AcceptanceField != null)
            {
                this.acceptanceCatalogAttributes = configStore.CatalogAttributesForInfoAreaIdFieldId(this.recordParticipants.AcceptanceField.InfoAreaId, this.recordParticipants.AcceptanceField.FieldId);
            }

            foreach (UPCRMParticipant participant in this.recordParticipants.Participants)
            {
                bool           isRepParticipant = participant is UPCRMRepParticipant;
                IIdentifier    identifier       = StringIdentifier.IdentifierWithStringId(participant.Key);
                UPMListRow     listRow          = new UPMListRow(identifier);
                UPMStringField nameField        = new UPMStringField(StringIdentifier.IdentifierWithStringId("name"));
                nameField.StringValue = participant.Name;
                listRow.AddField(nameField);
                UPMStringField acceptanceField = new UPMStringField(StringIdentifier.IdentifierWithStringId("acceptance"));
                if (!isRepParticipant || this.recordParticipants.HasRepAcceptance)
                {
                    acceptanceField.StringValue = participant.AcceptanceDisplayText;
                    UPConfigCatalogValueAttributes configCatalogValueAttributes = this.acceptanceCatalogAttributes?.ValuesByCode[Convert.ToInt32(participant.AcceptanceText)];
                    string colorString = configCatalogValueAttributes?.ColorKey;
                    if (!string.IsNullOrEmpty(colorString))
                    {
                        listRow.RowColor = AureaColor.ColorWithString(colorString);
                    }
                }
                else
                {
                    acceptanceField.StringValue = string.Empty;
                }

                listRow.AddField(acceptanceField);
                UPMStringField requirementField = new UPMStringField(StringIdentifier.IdentifierWithStringId("requirement"));
                requirementField.StringValue = participant.RequirementDisplayText;
                listRow.AddField(requirementField);
                if (isRepParticipant)
                {
                    // listRow.Icon = UIImage.UpImageWithFileName(repExpand.ImageName);     // CRM-5007
                    listRow.RowAction = null;
                }
                else
                {
                    UPCRMLinkParticipant linkParticipant = (UPCRMLinkParticipant)participant;
                    string _infoAreaId = linkParticipant.LinkRecordIdentification.InfoAreaId();
                    string imageName   = infoAreaImageFileNames.ValueOrDefault(_infoAreaId);
                    if (imageName == null)
                    {
                        UPConfigExpand expand = configStore.ExpandByName(_infoAreaId);
                        imageName = expand.ImageName ?? string.Empty;

                        infoAreaImageFileNames.SetObjectForKey(imageName, _infoAreaId);
                    }

                    // listRow.Icon = UIImage.UpImageWithFileName(imageName);       // CRM-5007
                    listRow.OnlineData = !UPCRMDataStore.DefaultStore.RecordExistsOffline(linkParticipant.LinkRecordIdentification);

                    if (this.linkParticipantsViewReference != null)
                    {
                        UPMAction switchToOrganizerAction = new UPMAction(null);
                        switchToOrganizerAction.IconName = "arrow.png";
                        switchToOrganizerAction.SetTargetAction(this, this.SwitchToOrganizerForLinkParticipant);
                        listRow.RowAction = switchToOrganizerAction;
                    }
                }

                group.AddChild(listRow);
            }

            return(group);
        }
Пример #25
0
        private List <ICalendarItem> CalendarItemsFromResult()
        {
            List <ICalendarItem>    calendarItems = new List <ICalendarItem>();
            IConfigurationUnitStore configStore   = ConfigurationUnitStore.DefaultStore;

            this.resultContexts = new List <UPCoreMappingResultContext>();
            UPMAction goToAction = new UPMAction(StringIdentifier.IdentifierWithStringId("action"));

            goToAction.SetTargetAction(this, this.SwitchToDetail);
            goToAction.LabelText = LocalizedString.TextShowRecord;

            foreach (TimelineSearch timelineSearch in this.searches)
            {
                UPCRMResult result   = timelineSearch.Result;
                int         rowCount = result.RowCount;
                if (rowCount == 0)
                {
                    continue;
                }

                UPConfigTableCaption tableCaption = configStore.TableCaptionByName(timelineSearch.TimelineInfoArea.ConfigName) ??
                                                    configStore.TableCaptionByName(timelineSearch.TimelineInfoArea.InfoAreaId);

                List <UPContainerFieldMetaInfo> tableCaptionResultFieldMap = tableCaption.ResultFieldMapFromMetaInfo(result.MetaInfo);
                if (tableCaptionResultFieldMap == null)
                {
                    continue;
                }

                UPCRMResultCondition resultCondition = null;
                var functionNameFieldMapping         = result.MetaInfo.SourceFieldControl.FunctionNames();
                UPConfigFieldControlField fromField  = functionNameFieldMapping["Date"];
                if (fromField != null)
                {
                    if (this.fromDate != null)
                    {
                        resultCondition = new UPCRMResultFieldCondition(fromField.Field, UPConditionOperator.GreaterEqual,
                                                                        this.fromDate.Value.CrmValueFromDate(), fromField.TabIndependentFieldIndex);
                    }

                    if (this.toDate != null)
                    {
                        UPConfigFieldControlField toField = (functionNameFieldMapping.ContainsKey("EndDate")
                            ? functionNameFieldMapping["EndDate"]
                            : null) ?? fromField;

                        UPCRMResultCondition toCondition = new UPCRMResultFieldCondition(toField.Field, UPConditionOperator.LessEqual,
                                                                                         this.toDate.Value.CrmValueFromDate(), toField.TabIndependentFieldIndex);
                        resultCondition = resultCondition != null?resultCondition.ConditionByAppendingANDCondition(toCondition) : toCondition;
                    }
                }

                UPCoreMappingResultContext resultContext = new UPCoreMappingResultContext(result, result.MetaInfo.SourceFieldControl, timelineSearch.PreparedSearch.ListFieldControl.NumberOfFields);
                resultContext.Context = timelineSearch;
                this.resultContexts.Add(resultContext);

                UPConfigExpand expand = configStore.ExpandByName(timelineSearch.TimelineInfoArea.ConfigName) ??
                                        configStore.ExpandByName(timelineSearch.TimelineInfoArea.InfoAreaId);

                AureaColor defaultColor = null;
                if (!string.IsNullOrEmpty(timelineSearch.TimelineInfoArea.ColorString))
                {
                    defaultColor = AureaColor.ColorWithString(timelineSearch.TimelineInfoArea.ColorString);
                }

                if (defaultColor == null)
                {
                    defaultColor = AureaColor.ColorWithString(expand.ColorKey);
                }

                for (int i = 0; i < rowCount; i++)
                {
                    UPCRMResultRow row = (UPCRMResultRow)result.ResultRowAtIndex(i);
                    if (resultCondition != null && !resultCondition.Check(row))
                    {
                        continue;
                    }

                    ConfigTimelineCriteria matchingCriteria = timelineSearch.MatchingCriteriaForRow(row);
                    AureaColor             color            = null;
                    if (matchingCriteria.Setting1 != null)
                    {
                        color = AureaColor.ColorWithString(matchingCriteria.Setting1);
                    }

                    if (color == null)
                    {
                        color = defaultColor;
                    }

                    ICalendarItem calendarItem = new ResultRowCalendarItem(row, resultContext, new RecordIdentifier(row.RootRecordIdentification), tableCaption, tableCaptionResultFieldMap, null, color);
                    calendarItem.GoToAction = goToAction;
                    calendarItems.Add(calendarItem);
                }
            }

            if (this.fromDate != null && this.toDate != null && this.CalendarPage.IncludeSystemCalendar)
            {
#if PORTING
                ArrayList localCalendarItems = ResultRowCalendarItem.EventsFromLocalCalendarFromToSearchTextCalenderIdentifiers(this.fromDate, this.toDate, null, null);
                if (localCalendarItems.Count)
                {
                    calendarItems.AddRange(localCalendarItems);
                }
#endif
            }

            return(calendarItems);
        }
Пример #26
0
        /// <summary>
        /// Search operation did finish with result
        /// </summary>
        /// <param name="operation">Operation</param>
        /// <param name="result">Result</param>
        public override void SearchOperationDidFinishWithResult(Operation operation, UPCRMResult result)
        {
            UPCRMResultRow resultRow = (UPCRMResultRow)result.ResultRowAtIndex(0);

            this.resCount--;
            if (resultRow != null)
            {
                string           recordIdent      = resultRow.RootRecordIdentification;
                RecordIdentifier recordIdentifier = new RecordIdentifier(recordIdent.InfoAreaId(), recordIdent.RecordId());
                UPMResultRow     row = new UPMResultRow(new RecordIdentifier(recordIdent));
                SearchAndList    searchConfiguration = this.configStore.SearchAndListByName(recordIdent.InfoAreaId());
                FieldControl     listFieldControl    = this.configStore.FieldControlByNameFromGroup("List", searchConfiguration.FieldGroupName);
                InfoArea         configInfoArea      = this.configStore.InfoAreaConfigById(recordIdent.InfoAreaId());
                row.RowColor = AureaColor.ColorWithString(configInfoArea.ColorKey);
                UPCRMListFormatter listFormatter = new UPCRMListFormatter(listFieldControl);
                int             fieldCount       = listFormatter.PositionCount;
                List <UPMField> listFields       = new List <UPMField>(fieldCount);
                for (int i = 0; i < fieldCount; i++)
                {
                    UPConfigFieldControlField configField = listFormatter.FirstFieldForPosition(i);
                    if (configField == null)
                    {
                        continue;
                    }

                    FieldAttributes attributes = configField.Attributes;
                    if (attributes.Hide)
                    {
                        continue;
                    }

                    UPMStringField stringField = new UPMStringField(StringIdentifier.IdentifierWithStringId($"{recordIdent}-{i}"));
                    string         stringValue = listFormatter.StringFromRowForPosition(resultRow, i);
                    if (attributes.Image)
                    {
                        DocumentManager documentManager = new DocumentManager();
                        string          documentKey     = stringValue;
                        DocumentData    documentData    = documentManager.DocumentForKey(documentKey);
                        if (documentData != null)
                        {
                            row.RecordImageDocument = new UPMDocument(documentData);
                        }
                        else
                        {
                            //row.RecordImageDocument = new UPMDocument(recordIdentifier, ServerSession.DocumentRequestUrlForDocumentKey(documentKey));
                        }

                        continue;
                    }

                    if (!string.IsNullOrEmpty(stringValue))
                    {
                        if (attributes.NoLabel && !string.IsNullOrEmpty(configField.Label))
                        {
                            stringValue = $"{configField.Label} {stringValue}";
                        }

                        stringField.StringValue = stringValue;
                        stringField.SetAttributes(attributes);
                    }

                    listFields.Add(stringField);
                }

                row.OnlineData = resultRow.IsServerResponse;
                if (row.OnlineData)
                {
                    //row.StatusIndicatorIcon = UIImage.UpXXImageNamed("crmpad-List-Cloud");    // CRM-5007
                }

                foreach (HistoryEntry entry in this.historyManager.HistoryEntries)
                {
                    if (entry.RecordIdentification == recordIdent)
                    {
                        this.rows.Add(row);
                        if (this.pendingRecords.Contains(recordIdent))
                        {
                            this.pendingRecords.Remove(recordIdent);
                        }

                        break;
                    }
                }

                row.Fields = listFields;
            }

            if (this.resCount == 0)
            {
                this.DisplayPage(this.rows);
            }
        }
Пример #27
0
        private UPMEditField CreateDependEditField(IIdentifier participantIdentifier, UPCatalog catalog, UPMGroup editGroup)
        {
            UPCRMField field = null;

            if (catalog == this.ParticipantsControl.RequirementCatalog)
            {
                field = this.ParticipantsControl.RequirementField;
            }
            else if (catalog == this.ParticipantsControl.AcceptanceCatalog)
            {
                field = this.ParticipantsControl.AcceptanceField;
            }

            var editField = new UPMParticipantCatalogEditField(StringIdentifier.IdentifierWithStringId(
                                                                   field != null ? $"dependField_{participantIdentifier}_{field.InfoAreaId}_{field.FieldId}" : $"dependField_{participantIdentifier}_(null)_0"))
            {
                GroupModelController = this,
                Group = editGroup
            };

            if (catalog != null)
            {
                var           possibleValues = catalog.Values;
                List <string> explicitKeyOrder;
                var           possibleValuesAsString      = catalog.TextValuesForFieldValues(false);
                var           configStore                 = ConfigurationUnitStore.DefaultStore;
                var           acceptanceCatalogAttributes = configStore.CatalogAttributesForInfoAreaIdFieldId(field.InfoAreaId, field.FieldId);
                foreach (var catalogValue in possibleValues)
                {
                    var possibleValue = new UPMCatalogPossibleValue
                    {
                        TitleLabelField = new UPMStringField(StringIdentifier.IdentifierWithStringId("x"))
                        {
                            StringValue = catalogValue.Text
                        }
                    };

                    var configCatalogValueAttributes = acceptanceCatalogAttributes.ValuesByCode.ValueOrDefault(catalogValue.CodeKey.ToInt());

                    if (configCatalogValueAttributes != null)
                    {
                        var colorString = configCatalogValueAttributes.ColorKey;
                        if (!string.IsNullOrEmpty(colorString))
                        {
                            possibleValue.IndicatorColor = AureaColor.ColorWithString(colorString);
                        }

                        possibleValue.ImageString = configCatalogValueAttributes.ImageName;
                    }

                    possibleValue.Key = catalogValue.CodeKey;

                    editField.AddPossibleValue(possibleValue);
                }

                if (string.IsNullOrEmpty(possibleValuesAsString.ValueOrDefault("0")))
                {
                    editField.NullValueKey = "0";
                }

                if (acceptanceCatalogAttributes != null && !ConfigurationUnitStore.DefaultStore.ConfigValueIsSet("FixedCatalog.SortByAttributeFilter"))
                {
                    explicitKeyOrder = this.ExplicitKeyOrderByCatalogAttributeCodeOrder(acceptanceCatalogAttributes, catalog.ExplicitKeyOrderByCodeEmptyValueIncludeHidden(false, false));
                }
                else if (ConfigurationUnitStore.DefaultStore.ConfigValueIsSet("FixedCatalog.SortByCode"))
                {
                    explicitKeyOrder = catalog.ExplicitKeyOrderByCodeEmptyValueIncludeHidden(false, false);
                }
                else
                {
                    explicitKeyOrder = catalog.ExplicitKeyOrderEmptyValueIncludeHidden(false, false);
                }

                if (explicitKeyOrder != null)
                {
                    editField.ExplicitKeyOrder = explicitKeyOrder;
                }

                editField.ContinuousUpdate = true;
                editField.DisplayValues    = possibleValuesAsString.Values.ToList();
            }

            return(editField);
        }