internal ResourceContainerStruct Clone() { ResourceContainerStruct rs = new ResourceContainerStruct() { PackageName = PackageName, Power = Power, _type = _type, RCType = RCType, Thumb = Thumb, TmpProperty = TmpProperty, }; try { rs.Datas = new List<ResourceStruct>(Datas.Count); rs.Datas.AddRange(Datas); } catch { } return rs; }
/// <summary> /// 上传资源包 /// </summary> /// <param name="rcs"></param> /// <param name="progress"></param> /// <param name="complete"></param> /// <returns></returns> public static bool UploadPackage(ResourceContainerStruct rcs, Action<Dictionary<string, object>> progress, Action<Dictionary<string, object>> complete, bool toVirtualOnly = false) { Debug.Assert(rcs != null); string pe = ""; if (complete != null) { pe = pushAction(complete); if (progress != null) { pushProgressAction(pe, progress); } } var value = new Dictionary<string, object> { {"package",rcs}, {"virtual",toVirtualOnly},//是否同时copy到虚拟中控中, }; return sendInterprocessMsg(CmdType.UploadPackage, pe, value, null); }