Ejemplo n.º 1
0
        private void LoadFromRtfFolder()
        {
            using (FolderBrowserDialog dialog = new FolderBrowserDialog())
            {
                dialog.SelectedPath        = Config.SystemAccumulationRtfLibrary;
                dialog.ShowNewFolderButton = false;

                if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    DirectoryInfo directory = new DirectoryInfo(dialog.SelectedPath);

                    Engine.controller.SystemAccumulation = SAConstructor.CreateSAFromRFTFiles(directory);

                    CreateTreeBySA(Engine.controller.SystemAccumulation);
                }
            }
        }
Ejemplo n.º 2
0
        private void LoadFromSingleRtfFile()
        {
            using (OpenFileDialog dialog = new OpenFileDialog())
            {
                dialog.FilterIndex      = 1;
                dialog.Filter           = "Текст в формате RTF (*.rtf)|*.rtf";
                dialog.RestoreDirectory = true;
                dialog.InitialDirectory = Config.SystemAccumulationRtfLibrary;

                if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    Engine.controller.SystemAccumulation = SAConstructor.CreateSAFromSingleRtfFile(dialog.FileName);

                    CreateTreeBySA(Engine.controller.SystemAccumulation);

                    //TestSA(this.mySA);
                }
            }
        }