// Code that runs on entering the state.
        public override void OnEnter()
        {
            WsSceneInfo newscene = new WsSceneInfo
            {
                id       = SceneName.Value,
                scene    = Path.Value,
                name     = SceneName.Value,
                version  = Sign.Value,
                isremote = true,
                isupdate = false,
                iskod    = true
            };

            MessageDispatcher.SendMessage(false, VrDispMessageType.LoadLocalPathScene.ToString(), newscene, 0);
        }
Esempio n. 2
0
        void GetCacheFile(IMessage msg)
        {
            LocalCacheFile sendfile = msg.Data as LocalCacheFile;

            LocalPath.Value = sendfile.path;
            LocalUrl.Value  = "File://" + LocalPath;
            GetedSign.Value = sendfile.sign;
            if (sendfile.sign == Sign.Value)
            {
                if (sendfile.path != "")
                {
                    Fsm.Event(GetLocalPath);
                    WsMediaFile kodfile = new WsMediaFile {
                        roomurl  = mStaticThings.I.nowRoomServerUrl,
                        preurl   = mStaticThings.I.ThisKODfileUrl,
                        url      = HttpUrl.Value,
                        name     = SceneName.Value,
                        size     = "11111",
                        ext      = "scene",
                        mtime    = sendfile.sign,
                        isupdate = false,
                        fileMd5  = ""
                    };

                    WsSceneInfo newscene = new WsSceneInfo
                    {
                        id       = SceneName.Value,
                        scene    = sendfile.path,
                        name     = SceneName.Value,
                        version  = Sign.Value,
                        isremote = true,
                        isupdate = false,
                        iskod    = true,
                        icon     = RoomIconUrl.Value,
                        kod      = kodfile,
                        cryptAPI = CryptAPI.Value,
                        ckind    = CryptKind.Value
                    };
                    MessageDispatcher.SendMessage(true, VrDispMessageType.LoadLocalPathScene.ToString(), newscene, 0);
                }
                else
                {
                    Fsm.Event(GetLocalPathFaild);
                }
            }
        }