SaveEditorsFormsState() public method

Ru: Сохраняет список открытых для редактирования форм En: Saves edit forms list to file
public SaveEditorsFormsState ( ) : void
return void
Esempio n. 1
0
        /// <summary>
        /// En: Save forms configuration
        /// Ru: Сохраняет текущее формы
        /// </summary>
        private void SaveState()
        {
            string docksPath = Application.StartupPath + "\\Docks.xml";

            if (File.Exists(docksPath))
            {
                FileInfo FI = new FileInfo(docksPath);

                if ((FI.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
                {
                    FI.Attributes -= FileAttributes.ReadOnly;

                    dockPanel1.SaveAsXml(docksPath);
                }
                else
                {
                    dockPanel1.SaveAsXml(docksPath);
                }
            }
            else
            {
                dockPanel1.SaveAsXml(docksPath);
            }

            mEditorsController.SaveEditorsFormsState();
        }