Ejemplo n.º 1
0
 public SearchResult(string text, string pic, VLCItemType itemType, int? id = null)
 {
     Picture = pic;
     Text = text;
     SearchItemType = itemType;
     if (id != null) 
         Id = id.Value;
 }
Ejemplo n.º 2
0
 public SearchResult(string text, string pic, VLCItemType itemType, int?id = null)
 {
     Picture        = pic;
     Text           = text;
     SearchItemType = itemType;
     if (id != null)
     {
         Id = id.Value;
     }
 }
Ejemplo n.º 3
0
        public static async Task <bool> CreateOrReplaceSecondaryTile(VLCItemType type, int id, string title)
        {
            string tileId = "SecondaryTile-" + type.ToString() + "-" + id;

            if (!SecondaryTile.Exists(tileId))
            {
                var tileData = new SecondaryTile()
                {
                    TileId      = tileId,
                    DisplayName = title,
                    Arguments   = tileId
                };
                string subfolder = null;
                switch (type)
                {
                case VLCItemType.Album:
                    subfolder = "albumPic";
                    break;

                case VLCItemType.Artist:
                    subfolder = "artistPic";
                    break;
                }
                tileData.VisualElements.ShowNameOnSquare150x150Logo = true;
                tileData.DisplayName = title;
                tileData.VisualElements.Square150x150Logo =
                    new Uri("ms-appdata:///local/" + subfolder + "/" + id + ".jpg");
                bool success = await tileData.RequestCreateAsync();

                return(success);
            }
            else
            {
                SecondaryTile secondaryTile = new SecondaryTile(tileId);
                await secondaryTile.RequestDeleteForSelectionAsync(Window.Current.Bounds, Placement.Default);

                ToastHelper.Basic(Strings.TileRemoved);
                return(false);
            }
        }
Ejemplo n.º 4
0
        public static bool SecondaryTileExists(VLCItemType type, int id, string title)
        {
            string tileId = "SecondaryTile-" + type.ToString() + "-" + id;

            return(SecondaryTile.Exists(tileId));
        }
Ejemplo n.º 5
0
 public static bool SecondaryTileExists(VLCItemType type, int id, string title)
 {
     string tileId = "SecondaryTile-" + type.ToString() + "-" + id;
     return SecondaryTile.Exists(tileId);
 }
Ejemplo n.º 6
0
 public static async void CreateOrReplaceSecondaryTile(VLCItemType type, int id, string title)
 {
     string tileId = "SecondaryTile-" + type.ToString() + "-" + id;
     if (!SecondaryTile.Exists(tileId))
     {
         var tileData = new SecondaryTile()
         {
             TileId = tileId,
             DisplayName = title,
             Arguments = tileId
         };
         string subfolder = null;
         switch (type)
         {
             case VLCItemType.Album:
                 subfolder = "albumPic";
                 break;
             case VLCItemType.Artist:
                 subfolder = "artistPic";
                 break;
         }
         tileData.VisualElements.ShowNameOnSquare150x150Logo = true;
         tileData.DisplayName = title;
         tileData.VisualElements.Square150x150Logo =
             new Uri("ms-appdata:///local/" + subfolder + "/" + id + ".jpg");
         await tileData.RequestCreateAsync();
     }
     else
     {
         SecondaryTile secondaryTile = new SecondaryTile(tileId);
         await secondaryTile.RequestDeleteForSelectionAsync(Window.Current.Bounds, Placement.Default);
         ToastHelper.Basic("Tile removed !");
     }
 }