Exemplo n.º 1
0
 /// <summary>
 /// Main constructor. Used for the entire document type.
 /// </summary>
 /// <param name="name">The desired name of the button and the element being created.</param>
 /// <param name="title">The desired human-readable name of the element being created.</param>
 /// <param name="description">The desired help text that explains what the element is for.</param>
 /// <param name="usage">Where the element creation button lies in the UI layout (as desired).</param>
 public CreativeDocumentModel(string name, string title, string description, DocumentUsage usage)
 {
     Name        = name;
     Title       = title;
     Description = description;
     Usage       = usage;
 }
Exemplo n.º 2
0
        public static ObservableCollection <CreativeDocumentRepresentation> InstallDocumentTypes(DocumentUsage filter, List <Type> types)
        {
            ObservableCollection <CreativeDocumentModel>          initial = new ObservableCollection <CreativeDocumentModel>(CreativeDocumentModel.GetDocumentControlInfo(types));
            ObservableCollection <CreativeDocumentRepresentation> final   = new ObservableCollection <CreativeDocumentRepresentation>();

            foreach (CreativeDocumentModel documentModel in initial)
            {
                final.Add(documentModel.ToDocumentRep());
            }
            ObservableCollection <CreativeDocumentRepresentation> final_final = new ObservableCollection <CreativeDocumentRepresentation>();

            foreach (CreativeDocumentRepresentation docModel in final)
            {
                if (docModel.Usage == filter)
                {
                    final_final.Add(docModel);
                }
            }
            return(final_final);
        }