예제 #1
0
 async Task AddZTestLabels(ILayout layout, params ILabel[] labels)
 {
     foreach (var label in labels)
     {
         layout.Add(label);
         await InitZTestLabel(label);
     }
 }
        public static void AddTrack(this ILayout col, int column, int row)
        {
            var track = new Track()
            {
                Column = column,
                Row    = row
            };

            col.Add(column, row, track);
        }
예제 #3
0
        public void Add(int column, int row, IEnumerable <IStaticEntityFactory <T> > entityFactories, bool isPartOfDrag)
        {
            T?entity = CreateNewStaticEntity(column, row, entityFactories, isPartOfDrag);

            if (entity is null)
            {
                return;
            }
            _layout.Add(column, row, entity);
        }
        public static void AddTrack(this ILayout col, int column, int row, TrackDirection direction)
        {
            var track = new Track()
            {
                Column    = column,
                Row       = row,
                Direction = direction
            };

            col.Add(column, row, track);
        }
예제 #5
0
 public void Execute(int column, int row, bool isPartOfDrag)
 {
     if (!isPartOfDrag && _entityCollection.TryGet(column, row, out Track? track))
     {
         _entityCollection.SelectedEntity = track;
     }
     else
     {
         _entityCollection.Add(column, row, _entityFactories, isPartOfDrag);
         _entityCollection.SelectedEntity = null;
     }
 }
예제 #6
0
        public void Add(int column, int row, IEnumerable <IStaticEntityFactory <T> > entityFactories)
        {
            T?entity;

            if (TryGet(column, row, out T? existing))
            {
                entity = FindNextEntity(column, row, existing, entityFactories);
                if (entity is not null)
                {
                    _layout.Remove(column, row);
                }
            }
            else
            {
                entity = CreateNewStaticEntity(column, row, entityFactories);
            }

            if (entity is null)
            {
                return;
            }
            _layout.Add(column, row, entity);
        }
예제 #7
0
 public void Execute(int column, int row)
 {
     _entityCollection.Add(column, row, new Track());
 }
예제 #8
0
 public void Execute(int column, int row)
 {
     _entityCollection.Add(column, row, _entityFactories);
 }
예제 #9
0
 public void Execute(int column, int row, bool isPartOfDrag)
 {
     _entityCollection.Add(column, row, _entityFactories, isPartOfDrag);
 }
예제 #10
0
 public static T AddTo <T>(this T view, ILayout parent) where T : IView
 {
     parent.Add(view);
     return(view);
 }
예제 #11
0
 public void Add(int column, int row, T track)
 {
     _layout.Add(column, row, track);
 }
 public T AddTo <T>(ILayout parent) where T : View
 {
     parent.Add(this);
     return(this as T);
 }