Exemplo n.º 1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="id">ID</param>
        /// <param name="name">名称</param>
        /// <param name="icon">アイコン(46 x 46 px)</param>
        /// <param name="smallIcon">小さいアイコン(24 x 24 px)</param>
        public NativeBandTile(Guid id, string name, Native.Tiles.BandIcon icon, Native.Tiles.BandIcon smallIcon)
        {
            this.tileId          = id;
            this.tileIconSource  = NativeBandImageConvert.FromNative(icon);
            this.smallIconSource = NativeBandImageConvert.FromNative(smallIcon);

            var error = new NSError();

            this.tile = Native.Tiles.BandTile.Create(new NSUuid(id.ToString("D")), name, icon, smallIcon, out error);
        }
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="tile">アプリタイル</param>
        public NativeBandTile(BandTile tile)
        {
            this.tile = tile;

            this.tileId         = tile.TileId;
            this.tileIconSource = NativeBandImageConvert.FromNative(tile.TileIcon);

            if (tile.SmallIcon != null)
            {
                this.smallIconSource = NativeBandImageConvert.FromNative(tile.SmallIcon);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="tile">アプリタイル</param>
        public NativeBandTile(Native.Tiles.BandTile tile)
        {
            this.tile = tile;

            this.tileId         = Guid.Parse(tile.TileId.ToString());
            this.tileIconSource = NativeBandImageConvert.FromNative(tile.TileIcon);

            if (tile.TileSmallIcon != null)
            {
                this.smallIconSource = NativeBandImageConvert.FromNative(tile.TileSmallIcon);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="tile">アプリタイル</param>
        public NativeBandTile(Native.Tiles.BandTile tile)
        {
            this.tile = tile;

            this.tileId = Guid.Parse(tile.TileId.AsString());

            this.tileIconSource = NativeBandImageConvert.FromNative(tile.TileIcon);

            // Band からタイル情報を取得した場合小さいアイコンがなぜか取れない
            if (tile.SmallIcon != null)
            {
                this.smallIconSource = NativeBandImageConvert.FromNative(tile.SmallIcon);
            }
        }
 /// <summary>
 /// 壁紙の取得
 /// </summary>
 /// <returns>壁紙画像のソース</returns>
 public async Task <StreamImageSource> GetMeTileImageSourceAsync()
 {
     return(NativeBandImageConvert.FromNative(
                await Native.Personalization.BandPersonalizationManagerExtensions.GetMeTileImageTaskAsync(this.manager)));
 }
 /// <summary>
 /// 壁紙の取得
 /// </summary>
 /// <returns>壁紙画像のソース</returns>
 public async Task <StreamImageSource> GetMeTileImageSourceAsync()
 {
     return(NativeBandImageConvert.FromNative(await this.manager.GetMeTileImageAsync()));
 }