Example #1
0
 public HSDScene()
 {
     AttachmentTypes.Remove(typeof(SBMeshList));
     AttachmentTypes.Remove(typeof(SBTextureList));
     AttachmentTypes.Add(typeof(SBDobjAttachment));
     boneBindUniformBuffer      = new BufferObject(BufferTarget.UniformBuffer);
     boneTransformUniformBuffer = new BufferObject(BufferTarget.UniformBuffer);
 }
        public static IEnumerable<DocumentTemplatePackage> AvailablePackages(DiscoDataContext Database, AttachmentTypes Scope)
        {
            var packages = cache.Values.Where(p => p.Scope == Scope).ToList();
            if (packages.Count > 0)
            {
                var dbScope = Scope.ToString();
                var validTemplateIds = Database.DocumentTemplates
                    .Where(dt => dt.Scope == dbScope)
                    .Select(dt => dt.Id).ToList();

                return packages.Where(p =>
                    !p.IsHidden &&
                    p.DocumentTemplateIds != null && p.DocumentTemplateIds.Count > 0 &&
                    p.DocumentTemplateIds.Count(id => validTemplateIds.Contains(id)) > 0);
            }
            return Enumerable.Empty<DocumentTemplatePackage>();
        }
Example #3
0
        public object RandomAttachment(AttachmentTypes types)
        {
            object attachment = null;

            if (Attachments?.Count > 0)
            {
                if (types == AttachmentTypes.Sticker)
                {
                    var stickers = Attachments.Where(x => x is Sticker).ToList();
                    if (stickers.Count > 0)
                    {
                        attachment = stickers[random.Next(0, stickers.Count)];
                    }
                }
            }

            return(attachment);
        }
Example #4
0
 public bool HasAttachmentOfType(int caseID, AttachmentTypes attachmentType)
 {
     return((from document in GetAllQuery() where document.Cases_CaseDocumentFolders.CaseID == caseID && document.AttachmentTypeID == (int)attachmentType select document).Count() > 0);
 }
Example #5
0
 public void AddAttachment(AttachmentTypes type, string url)
 {
 }
 private DocumentUniqueIdentifier(DiscoDataContext Database, int Version, short DeploymentChecksum, string DocumentTemplateId, string TargetId, string CreatorId, DateTime TimeStamp, int PageIndex, AttachmentTypes? AttachmentType)
 {
     this.database = Database;
     this.Version = Version;
     this.DeploymentChecksum = DeploymentChecksum;
     this.DocumentTemplateId = DocumentTemplateId;
     this.attachmentType = AttachmentType;
     this.TargetId = TargetId;
     this.CreatorId = ActiveDirectory.ParseDomainAccountId(CreatorId);
     this.TimeStamp = TimeStamp;
     this.PageIndex = PageIndex;
 }
Example #7
0
 public bool HasAttachmentOfType(int caseID, AttachmentTypes attachmentType)
 {
     return(DocumentsRepository.HasAttachmentOfType(caseID, attachmentType));
 }