示例#1
0
    public void Initialize (TContentStyle.Mode styleMode)
    {
      Populate (styleMode);

      Select (TStyleInfo.CreateDefault, false);

      StyleSelectedIndex = StyleItemsSource.IsNull () ? -1 : StyleItemsSource.Count.Equals (0) ? -1 : 0;
    }
示例#2
0
 TStyleSelectorModel (TContentStyle.Mode styleMode)
   : base (
       TStyleModelItem.CreateMini (styleMode), 
       TStyleModelItem.CreateSmall (styleMode), 
       TStyleModelItem.CreateLarge (styleMode), 
       TStyleModelItem.CreateBig (styleMode), 
       TStyleModelItem.CreateNone (styleMode)
     )
 {
 }
示例#3
0
    void Populate (TContentStyle.Mode styleMode)
    {
      StyleItemsSource = new Collection<TStylePropertyItem>
      {
        new TStylePropertyItem (styleMode, TContentStyle.Style.mini),
        new TStylePropertyItem (styleMode, TContentStyle.Style.small),
        new TStylePropertyItem (styleMode, TContentStyle.Style.large),
        new TStylePropertyItem (styleMode, TContentStyle.Style.big)
      };

      m_SelectedIndex = -1;
    } 
示例#4
0
    public void Select (TContentStyle.Mode styleMode, string styleString)
    {
      switch (styleMode) {
        case TContentStyle.Mode.Horizontal:
          StyleHorizontal.Select (styleString);
          break;

        case TContentStyle.Mode.Vertical:
          StyleVertical.Select (styleString);
          break;
      }

      Size.SelectColumns (TContentStyle.RequestBoardStyleSize (StyleHorizontal.Style));
      Size.SelectRows (TContentStyle.RequestBoardStyleSize (StyleVertical.Style));
    }
示例#5
0
        public static int RequestStyleSize(TContentStyle.Mode mode, TContentStyle.Style style)
        {
            int size = 0;

            switch (mode)
            {
            case Mode.Horizontal:
                size = m_HorizontalSizeStyles [style];
                break;

            case Mode.Vertical:
                size = m_VerticalSizeStyles [style];
                break;
            }

            return(size);
        }
示例#6
0
    public TStylePropertyItem (TContentStyle.Mode styleMode, TContentStyle.Style style)
      : this ()
    {
      StyleInfo = TStyleInfo.Create (styleMode);
      StyleInfo.Select (style);

      var size = TContentStyle.RequestStyleSize (styleMode, style);

      switch (styleMode) {
        case TContentStyle.Mode.Horizontal:
          Size.Width = size;
          break;

        case TContentStyle.Mode.Vertical:
          Size.Height = size;
          break;
      }
    }
示例#7
0
 TStyleInfo(TContentStyle.Mode styleMode)
     : this()
 {
     StyleMode = styleMode;
     Style     = TContentStyle.Style.mini;
 }
示例#8
0
 public static TStyleInfo Create(TContentStyle.Mode styleMode) => new TStyleInfo(styleMode);
示例#9
0
 public static TStyleModelItem CreateMini (TContentStyle.Mode styleMode) => new TStyleModelItem (styleMode, TContentStyle.MINI);
示例#10
0
 public static TStyleSelectorModel Create (TContentStyle.Mode styleMode) => new TStyleSelectorModel (styleMode);
示例#11
0
 public static TStyleModelItem CreateNone (TContentStyle.Mode styleMode) => new TStyleModelItem (styleMode, TContentStyle.NONE);
示例#12
0
 public static TStyleModelItem CreateBig (TContentStyle.Mode styleMode) => new TStyleModelItem (styleMode, TContentStyle.BIG);
示例#13
0
 public static TStyleModelItem CreateLarge (TContentStyle.Mode styleMode) => new TStyleModelItem (styleMode, TContentStyle.LARGE);
示例#14
0
 public static TStyleModelItem CreateSmall (TContentStyle.Mode styleMode) => new TStyleModelItem (styleMode, TContentStyle.SMALL);
示例#15
0
 public static string RequestStyleSizeString(TContentStyle.Mode mode, TContentStyle.Style style)
 {
     return(RequestStyleSize(mode, style).ToString(CultureInfo.InvariantCulture));
 }
示例#16
0
 protected TStyleItem(TContentStyle.Mode styleMode, string style)
     : this()
 {
     StyleInfo = TStyleInfo.Create(styleMode);
     StyleInfo.Select(style);
 }
示例#17
0
 public TStyleModelItem (TContentStyle.Mode styleMode, string style)
   : base (styleMode, style)
 {
 }