Example #1
0
    public void SelectModel (TEntityAction action)
    {
      if (action.NotNull ()) {
        var name = action.SupportAction.SelectionInfo.Name;
        var tag = action.SupportAction.SelectionInfo.Tag;
        var image = action.SupportAction.SelectionInfo.GetImage ();
        var enabled = action.SupportAction.SelectionInfo.Enabled;

        if (enabled) {
          var selection = TSelectionItem.Create (name, tag, image, enabled);

          Select (selection);
        }
      }
    }
Example #2
0
    public void Select (TEntityAction action)
    {
      ItemsSource.Clear ();
      m_SelectionAllCollection.Clear ();

      if (action.NotNull ()) {
        foreach (var item in action.SupportAction.SelectionCollection) {
          if (item.Enabled) {
            var selectionItem = TSelectionItem.Create (item.Name, item.Tag, item.GetImage (), item.Enabled);

            ItemsSource.Add (selectionItem);

            m_SelectionAllCollection.Add (selectionItem);
          }
        }
      }

      if (ItemsSource.Any ()) {
        SelectedIndex = 0;
      }
    }