コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
        static Engine()
        {
            controller = new Controller();

            controller.SystemAccumulation = SASerializer.CreateSAFromXml(Config.SystemAccumulationFileName);
        }