Ejemplo n.º 1
0
        IObjectContainer loadContainer(Stream stream)
        {
            BinaryFormatter  binary = StaticExtensionDiagramUISerializable.CreareBinaryFormatter();
            IObjectContainer ob     = binary.Deserialize(stream) as IObjectContainer;

            stream.Close();
            return(ob);
        }
Ejemplo n.º 2
0
        void CreateScada()
        {
            StaticExtensionScadaDesktop.ScadaFactory         = StaticExtensionScadaDesktopSerializable.BaseFactory;
            StaticExtensionEventInterfaces.TimerEventFactory = Event.Windows.Forms.WindowsTimerFactory.Singleton;
            StaticExtensionDiagramUISerializable.Init();

            scada = Properties.Resources.simple_control_system.ScadaFromBytes("Chart",
                                                                              BaseTypes.Attributes.TimeType.Second, false, null);
        }
Ejemplo n.º 3
0
        MultiLibraryObject loadMultilibrary(Stream stream)
        {
            BinaryFormatter     binary = StaticExtensionDiagramUISerializable.CreareBinaryFormatter();
            SerializationBinder binder = SerializationInterface.StaticExtensionSerializationInterface.Binder;
            PureDesktopPeer     d      = new PureDesktopPeer();

            d.Load(stream, binder, true);
            stream.Close();
            IObjectLabel l = null;

            foreach (IObjectLabel ll in d.Objects)
            {
                l = ll;
                break;
            }
            ICategoryObject ob = l.Object;

            return(ob as MultiLibraryObject);
        }
Ejemplo n.º 4
0
        public App()
        {
            Internet.Meteo.StaticExtensionMeteo.Init();
            Http.Meteo.StaticExtensionMeteo.Init();
            StaticExtensionEventBasic.Init();
            BasicEngineeringInitializer initializer =
                new BasicEngineeringInitializer(OrdinaryDifferentialEquations.Runge4Solver.Singleton,
                                                RungeProcessor.Processor,
                                                global::Motion6D.Runtime.DataRuntimeFactory.Object,
                                                new Diagram.UI.Interfaces.IApplicationInitializer[]
            {
                ApplicationInitializer.Singleton,
                global::Motion6D.ApplicationInitializer.Object
            }, true);

            initializer.InitializeApplication();
            StaticExtensionEventInterfaces.TimerEventFactory = WpfTimerEventFactory.Singleton;
            StaticExtensionEventInterfaces.TimerFactory      = WpfTimerFactory.Singleton;
            StaticExtensionScadaDesktop.ScadaFactory         = StaticExtensionScadaDesktopSerializable.BaseFactory;
            StaticExtensionDiagramUISerializable.Init();
            SoundService.StaticExtensionSoundService.SoundDirectory =
                AppDomain.CurrentDomain.BaseDirectory + "sounds" +
                System.IO.Path.DirectorySeparatorChar;
        }