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); } } }
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); } } }