Ejemplo n.º 1
0
        public static Machine CreateMachineLib(String resourceFile)
        {
            MoSync.Machine mosyncMachine = new MoSync.Machine(false, true);

            StreamResourceInfo resourcesResInfo = Application.GetResourceStream(new Uri(resourceFile, UriKind.Relative));

            Stream resources = null;

            if (resourcesResInfo != null && resourcesResInfo.Stream != null)
            {
                resources = resourcesResInfo.Stream;
            }

            Core core = new MoSync.CoreNative();

            (core as MoSync.CoreNative).InitData();
            mosyncMachine.InitLib(core, resources);

            return(mosyncMachine);
        }
Ejemplo n.º 2
0
        public static Machine CreateMachineLib(String resourceFile)
        {
            MoSync.Machine mosyncMachine = new MoSync.Machine(false, true);

            StreamResourceInfo resourcesResInfo = Application.GetResourceStream(new Uri(resourceFile, UriKind.Relative));

            Stream resources = null;
            if (resourcesResInfo != null && resourcesResInfo.Stream != null)
                resources = resourcesResInfo.Stream;

            Core core = new MoSync.CoreNative();
            (core as MoSync.CoreNative).InitData();
            mosyncMachine.InitLib(core, resources);

            return mosyncMachine;
        }