Exemple #1
0
        public void Save(IPersistStream stream)
        {
            if (_application == null) return;

            PlugInManager compMan=new PlugInManager();
            foreach (XmlNode comp in compMan.GetPluginNodes(Plugins.Type.IMapApplicationModule))
            {
                IMapApplicationModule module = _application.IMapApplicationModule(PlugInManager.Guid(comp));
                if (module is IPersistable)
                {
                    stream.Save("Module", new ModulePersist(module));
                }
            }
        }
Exemple #2
0
        public void Load(IPersistStream stream)
        {
            if (_app == null) return;

            try
            {
                Guid guid = new Guid(stream.Load("GUID") as string);
                IMapApplicationModule module = _app.IMapApplicationModule(guid);

                if (!(module is IPersistable)) return;
                ((IPersistable)module).Load(stream);
            }
            catch { }
        }
Exemple #3
0
        public void Load(IPersistStream stream)
        {
            try
            {
                Guid guid = new Guid(stream.Load("GUID") as string);
                _module = (IMapApplicationModule)PlugInManager.Create(guid);

                if (!(_module is IPersistable))
                {
                    return;
                }
                ((IPersistable)_module).Load(stream);
            }
            catch { }
        }
Exemple #4
0
        public void Save(IPersistStream stream)
        {
            if (_application == null)
            {
                return;
            }

            PlugInManager compMan = new PlugInManager();

            foreach (Type compType in compMan.GetPlugins(Plugins.Type.IMapApplicationModule))
            {
                IMapApplicationModule module = _application.IMapApplicationModule(PlugInManager.PluginIDFromType(compType));
                if (module is IPersistable)
                {
                    stream.Save("Module", new ModulePersist(module));
                }
            }
        }
Exemple #5
0
 public ModulePersist(IMapApplicationModule module)
 {
     _module = module;
 }