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 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 = ""; }