private void Moveup()
        {
            var selectedItem  = _right.First(x => x.IsSelected);
            var selectedIndex = _right.IndexOf(selectedItem);

            _right.Remove(selectedItem);
            _right.Insert(--selectedIndex, selectedItem);

            _columnsService.ShowColumns(_identifier, _right.Select(x => x.Name));
        }
        public void Write_AddElement_ElementAdded()
        {
            var col = new RangeObservableCollection <string>();

            col.Add("a");
            Assert.That(col.First(), Is.EqualTo("a"));
        }
Esempio n. 3
0
        public void Write_AddElement_ElementAdded()
        {
            var col = new RangeObservableCollection <string>();

            col.Add("a");

            col.First().Should().Be("a");
        }
Esempio n. 4
0
        public async Task InitializeAsync()
        {
            if (_isInitialized)
            {
                return;
            }

            _profiles.AddRange(await GetProfilesAsync());

            var activeProfileId = await GetActiveProfileIdAsync();

            _activeProfile.OnNext(_profiles.FirstOrDefault(x => x.Id == activeProfileId) ?? _profiles.First());
            _activeProfile.SubscribeAsync(p => SetActiveProfileIdAsync(p.Id));

            _isInitialized = true;
        }