コード例 #1
0
        public void SaveProfileSetAsXml(FileStream stream)
        {
            // save the settings; xml format
            XmlSerializer s  = new XmlSerializer(typeof(ProfileSet));
            ProfileSet    ps = new ProfileSet();

            ps.Profiles = this.Profiles;
            s.Serialize(stream, ps);
        }
コード例 #2
0
ファイル: ProfileManager.cs プロジェクト: JaylinLee/EDMSuite
        public void LoadProfileSetFromXml(FileStream stream)
        {
            // load the settings; xml format
            XmlSerializer s  = new XmlSerializer(typeof(ProfileSet));
            ProfileSet    ps = (ProfileSet)s.Deserialize(stream);

            profiles       = ps.Profiles;
            currentProfile = null;
            // Xml serialization cannot handle circular referencing, so each of the plugins need to be
            // assigned their AquisitorConfigurations 'by hand'.
            foreach (Profile p in profiles)
            {
                p.AcquisitorConfig.outputPlugin.Config       = p.AcquisitorConfig;
                p.AcquisitorConfig.switchPlugin.Config       = p.AcquisitorConfig;
                p.AcquisitorConfig.shotGathererPlugin.Config = p.AcquisitorConfig;
                p.AcquisitorConfig.pgPlugin.Config           = p.AcquisitorConfig;
                p.AcquisitorConfig.yagPlugin.Config          = p.AcquisitorConfig;
                p.AcquisitorConfig.analogPlugin.Config       = p.AcquisitorConfig;
            }
            window.UpdateUI();
        }
コード例 #3
0
ファイル: ProfileManager.cs プロジェクト: ColdMatter/EDMSuite
 public void SaveProfileSetAsXml(FileStream stream)
 {
     // save the settings; xml format
     XmlSerializer s = new XmlSerializer(typeof(ProfileSet));
     ProfileSet ps = new ProfileSet();
     ps.Profiles = this.Profiles;
     s.Serialize(stream, ps);
 }