示例#1
0
 public StaffEdgeViewModel(StaffEdge model, StaffEdgeDetailType primaryStaffEdgeDetailType,
                           StaffEdgeDetailType secondaryStaffEdgeDetailType) : base(model)
 {
     TitleText           = $"{Model.Node?.Name?.Full ?? Model.Node?.Name?.FormattedName}";
     DetailPrimaryText   = GetDetail(primaryStaffEdgeDetailType);
     DetailSecondaryText = GetDetail(secondaryStaffEdgeDetailType);
     ImageUri            = Model.Node?.Image?.Large ?? Model?.Node?.Image?.Medium;
 }
示例#2
0
        private string GetDetail(StaffEdgeDetailType detailType)
        {
            string retString = null;

            if (detailType == StaffEdgeDetailType.NativeName)
            {
                retString = $"{Model.Node?.Name?.Native}";
            }
            else if (detailType == StaffEdgeDetailType.Role)
            {
                retString = $"{Model?.Role}";
            }

            return(retString);
        }