private void LoadFromXml() { using (OpenFileDialog dialog = new OpenFileDialog()) { dialog.FilterIndex = 1; dialog.Filter = "Файлы XML (*.xml)|*.xml"; dialog.RestoreDirectory = true; dialog.InitialDirectory = Config.LocalSettingFolder; dialog.FileName = Path.GetFileName(Config.SystemAccumulationFileName); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Engine.controller.SystemAccumulation = SASerializer.CreateSAFromXml(dialog.FileName); CreateTreeBySA(Engine.controller.SystemAccumulation); //TestSA(this.mySA); } } }
static Engine() { controller = new Controller(); controller.SystemAccumulation = SASerializer.CreateSAFromXml(Config.SystemAccumulationFileName); }