static ResourceFactory() { var assembly = typeof(ResourceFactory).Assembly; foreach (var res in assembly.GetManifestResourceNames()) { WxLog.Debug($"ResourceFactory.ResourceFactory Res <{res}>"); var stream = assembly.GetManifestResourceStream(res); var resource = new BizResouce(res, stream); m_dict.TryAdd(resource.Name, resource); } }
/// <summary> /// 寻找图片 /// </summary> /// <param name="dm"></param> /// <param name="resource"></param> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public bool FindPic(dmsoft dm, BizResouce resource, out int x, out int y) { var result = dm.FindPicMem(0, 0, 600, 600, resource.Info, "101010", 0.95, 0, out var xx, out var yy); if (result > -1) { x = (int)xx; y = (int)yy; return(true); } x = 0; y = 0; return(false); }
/// <summary> /// 连接多个图片 /// </summary> /// <param name="res"></param> /// <returns></returns> public string Add(BizResouce res) { return($"{Info}|{res.Info}"); }