public static async Task <bool> CreateNewFileViaTab(TabID ids)
 {
     try
     {
         await new StorageRouter(await TabsAccessManager.GetTabViaIDAsync(ids), ids.ID_TabsList).CreateFile().ContinueWith(async(e) =>
         {
             await new StorageRouter(await TabsAccessManager.GetTabViaIDAsync(ids), ids.ID_TabsList).WriteFile();
         });
         return(true);
     }
     catch
     {
         return(false);
     }
 }
        public static async Task <List <int> > OpenFilesAndCreateNewTabsFiles(int IDList, StorageListTypes type)
        {
            var list_ids = new List <int>();

            var opener    = new FileOpenPicker();
            var FileTypes = new FileTypesManager();

            opener.ViewMode = PickerViewMode.Thumbnail;
            opener.SuggestedStartLocation = PickerLocationId.ComputerFolder;
            opener.FileTypeFilter.Add("*");

            foreach (string ext in FileTypes.List_Type_extensions)
            {
                opener.FileTypeFilter.Add(ext);
            }

            IReadOnlyList <StorageFile> files = await opener.PickMultipleFilesAsync();

            foreach (StorageFile file in files)
            {
                await Task.Run(async() =>
                {
                    if (file != null)
                    {
                        StorageApplicationPermissions.FutureAccessList.Add(file);
                        var tab = new InfosTab {
                            TabName = file.Name, TabStorageMode = type, TabContentType = ContentType.File, CanBeDeleted = true, CanBeModified = true, PathContent = file.Path, TabInvisibleByDefault = false
                        };

                        foreach (string _type in FileTypes.List_Type_extensions)
                        {
                            if (tab.TabName.Contains(_type))
                            {
                                tab.TabType = FileTypes.GetExtensionType(file.FileType);
                                break;
                            }
                            else
                            {
                                continue;
                            }
                        }

                        int id_tab = 0;
                        await Task.Run(async() =>
                        {
                            id_tab = await TabsWriteManager.CreateTabAsync(tab, IDList, false);
                            if (await new StorageRouter(await TabsAccessManager.GetTabViaIDAsync(new TabID {
                                ID_Tab = id_tab, ID_TabsList = IDList
                            }), IDList).ReadFile(true))
                            {
                                Messenger.Default.Send(new STSNotification {
                                    Type = TypeUpdateTab.NewTab, ID = new TabID {
                                        ID_Tab = id_tab, ID_TabsList = IDList
                                    }
                                });
                            }
                        });
                        list_ids.Add(id_tab);
                    }
                });
            }

            return(list_ids);
        }