Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        /// <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);
        }