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 = ""; }
private async void CreateTab() { await TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, TextBoxNewTab.Text, Encoding.UTF8, StorageListTypes.LocalStorage, ""); NewTabCreatorGrid.Visibility = Visibility.Collapsed; TextBoxNewTab.Text = ""; }
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 = ""; }
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, "");
/* ============= * = FUNCTIONS = * ============= */ private async void CreateDefaultTab() => await TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, "New tab", Encoding.UTF8, StorageListTypes.LocalStorage, "");
/* ============= * = FUNCTIONS = * ============= */ private void CreateDefaultTab() => TabsCreatorAssistant.CreateNewTab(CurrentSelectedIDs.ID_TabsList, GlobalVariables.GlobalizationRessources.GetString("tabslist-defaulttabname"), Encoding.UTF8, StorageListTypes.LocalStorage, "");