/// <summary> /// Opens a CRL file /// </summary> /// <returns></returns> internal bool OpenCRLFile() { FileInfo info = FileAdmin.OpenFile(); if (info.name != "") { if (container.Items.Count == 0) { AddEditor(); } TabItem currentTab = GetCurrentTabItem(); if (currentTab != null) { currentTab.Header = info.name; Editor currentEditor = GetEditorAt(currentTab); if (currentEditor != null) { currentEditor.UI.Text = info.data; currentEditor.File = info; } return(true); } } return(false); }
/// <summary> /// Saves the current textbox to a .crl file /// </summary> /// <returns></returns> internal bool SaveCRLFile() { Editor currentEditor = GetCurrentEditor(); if (currentEditor != null) { currentEditor.SaveData(); return(FileAdmin.SaveFile(currentEditor.File)); } return(false); }