示例#1
0
文件: BandTiles.cs 项目: jehy/unBand
        public Task Save()
        {
            var strappStrip = Strip.Select(i => i.Strapp).ToList();
            var strip = new StartStrip(strappStrip);

            return _client.SetStartStripAsync(strip);
        }
示例#2
0
文件: BandTiles.cs 项目: jehy/unBand
        public Task Save()
        {
            var strappStrip = Strip.Select(i => i.Strapp).ToList();
            var strip       = new StartStrip(strappStrip);

            return(_client.SetStartStripAsync(strip));
        }
示例#3
0
文件: BandTiles.cs 项目: jehy/unBand
        public async Task InitAsync()
        {
            StartStrip strip = null;

            try
            {
                strip = await _client.GetStartStripAsync();
            }
            catch (ArgumentException)
            {
                // on some Bands the StartStrip errors out due to a bug somewhere in the Band library
                // that returns Tiles with no names. See #58 and many others.
                strip = new StartStrip();
            }

            // move the StartStrip into a ObservableCollection so that it can be easily manipulated
            var bandStrip = strip.Select(i => new BandStrapp(this, i));
            
            Strip = new ObservableCollection<BandStrapp>(bandStrip);

            DefaultStrapps = (List<AdminBandTile>)(await _client.GetDefaultTilesAsync());
        }
示例#4
0
文件: BandTiles.cs 项目: jehy/unBand
        public async Task InitAsync()
        {
            StartStrip strip = null;

            try
            {
                strip = await _client.GetStartStripAsync();
            }
            catch (ArgumentException)
            {
                // on some Bands the StartStrip errors out due to a bug somewhere in the Band library
                // that returns Tiles with no names. See #58 and many others.
                strip = new StartStrip();
            }

            // move the StartStrip into a ObservableCollection so that it can be easily manipulated
            var bandStrip = strip.Select(i => new BandStrapp(this, i));

            Strip = new ObservableCollection <BandStrapp>(bandStrip);

            DefaultStrapps = (List <AdminBandTile>)(await _client.GetDefaultTilesAsync());
        }
示例#5
0
        public Task Save()
        {
            var strip = new StartStrip(Strip.ToList <CargoStrapp>());

            return(_client.SetStartStripAsync(strip));
        }