private void CreateTab()
        {
            EncodingType SelectedEncoding = (EncodingType)EncodingList.SelectedItem;

            if (CurrentSelectedIDs.ID_Tab != 0)
            {
                StorageListTypes SelectedType = ((StorageTypeDefinition)TabStorageType.SelectedValue).Type;

                switch (TabsAccessManager.GetTabViaID(GlobalVariables.CurrentIDs).TabContentType)
                {
                case ContentType.File:
                    TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, TextBoxNewFileProject.Text, Encoding.GetEncoding(SelectedEncoding.EncodingCodepage), SelectedEncoding.EncodingBOM, SelectedType, TabTemplateContent);
                    break;

                //Create file in the selected folder !
                case ContentType.Folder:
                    TabsCreatorAssistant.CreateNewTabInFolder(GlobalVariables.CurrentIDs.ID_TabsList, CurrentSelectedIDs, TextBoxNewFileProject.Text, Encoding.GetEncoding(SelectedEncoding.EncodingCodepage), SelectedEncoding.EncodingBOM, SelectedType, TabTemplateContent);
                    break;
                }
            }
            else
            {
                TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, TextBoxNewFileProject.Text, Encoding.GetEncoding(SelectedEncoding.EncodingCodepage), SelectedEncoding.EncodingBOM, StorageListTypes.LocalStorage, TabTemplateContent);
            }


            TextBoxNewFileProject.Text = "";
        }
Пример #2
0
        private async void CreateTab()
        {
            await TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, TextBoxNewTab.Text, Encoding.UTF8, StorageListTypes.LocalStorage, "");

            NewTabCreatorGrid.Visibility = Visibility.Collapsed;
            TextBoxNewTab.Text           = "";
        }
Пример #3
0
        private void CreateTab()
        {
            switch (TabsAccessManager.GetTabViaID(CurrentSelectedIDs).TabContentType)
            {
            case ContentType.File:
                TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, TextBoxNewFileProject.Text, Encoding.UTF8, StorageListTypes.LocalStorage, TabTemplateContent);
                break;

            //Create file in the selected folder !
            case ContentType.Folder:
                TabsCreatorAssistant.CreateNewTabInFolder(CurrentSelectedIDs.ID_TabsList, CurrentSelectedIDs, TextBoxNewFileProject.Text, Encoding.UTF8, StorageListTypes.LocalStorage, TabTemplateContent);
                break;
            }

            TextBoxNewFileProject.Text = "";
        }
Пример #4
0
 public async void createNewTabInTheCurrentList(string fileName, string content)
 => await TabsCreatorAssistant.CreateNewTab(getCurrentSelectedTabAndTabsListID().listID, fileName, Encoding.UTF8, SerrisTabsServer.Storage.StorageListTypes.LocalStorage, content);
        /* =============
         * = FUNCTIONS =
         * =============
         */


        private void CreateDefaultTab()
        => TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, GlobalVariables.GlobalizationRessources.GetString("tabslist-defaulttabname"), Encoding.GetEncoding(EncodingsHelper.EncodingsAvailable[0].EncodingCodepage), EncodingsHelper.EncodingsAvailable[0].EncodingBOM, StorageListTypes.LocalStorage, "");
Пример #6
0
        /* =============
         * = FUNCTIONS =
         * =============
         */


        private async void CreateDefaultTab()
        => await TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, "New tab", Encoding.UTF8, StorageListTypes.LocalStorage, "");
Пример #7
0
        /* =============
         * = FUNCTIONS =
         * =============
         */


        private void CreateDefaultTab()
        => TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, GlobalVariables.GlobalizationRessources.GetString("tabslist-defaulttabname"), Encoding.UTF8, StorageListTypes.LocalStorage, "");