Beispiel #1
0
 public void Select (Server.Models.Infrastructure.TCategory category)
 {
   if (category.NotNull ()) {
     Category = category;
   }
 }
    public void SelectModelCategory (Server.Models.Infrastructure.TCategory modelCategory)
    {
      if (modelCategory.NotNull ()) {
        m_ModelCategory = Server.Models.Infrastructure.TCategoryType.ToValue (modelCategory);

        m_Names.Clear ();

        // remove property not required

        switch (modelCategory) {
          //   Gadget Material
          case Server.Models.Infrastructure.TCategory.Material: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ReferenceProperty");
              m_Names.Add ("SelectionProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("DateProperty");
            }
            break;

          //   Gadget Target
          case Server.Models.Infrastructure.TCategory.Target: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ImageProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("DateProperty");
            }
            break;

          //   Gadget Test
          case Server.Models.Infrastructure.TCategory.Test: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ImageProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("ReferenceProperty");
              m_Names.Add ("SelectionProperty");
              m_Names.Add ("DateProperty");
            }
            break;

          //   Gadget Registration
          case Server.Models.Infrastructure.TCategory.Registration: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ExternalLinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("ReferenceProperty");
              m_Names.Add ("SelectionProperty");
            }
            break;

          //   Gadget Result
          case Server.Models.Infrastructure.TCategory.Result: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ExternalLinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ImageProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("ReferenceProperty");
              m_Names.Add ("SelectionProperty");
            }
            break;

          //   Gadget Report
          case Server.Models.Infrastructure.TCategory.Report: {
              m_Names.Add ("LinkProperty");
              m_Names.Add ("ExternalLinkProperty");
              m_Names.Add ("ImagePositionProperty");
              m_Names.Add ("HeaderVisibilityProperty");
              m_Names.Add ("FooterVisibilityProperty");
              m_Names.Add ("StyleHorizontalProperty");
              m_Names.Add ("StyleVerticalProperty");
              m_Names.Add ("ColumnsProperty");
              m_Names.Add ("RowsProperty");
              m_Names.Add ("ImageProperty");
              m_Names.Add ("ValueProperty");
              m_Names.Add ("ReferenceProperty");
              m_Names.Add ("SelectionProperty");
            }
            break;
        }
      }
    }