Exemple #1
0
        /// <summary>
        /// 刷新.
        /// </summary>
        /// <param name="iType">类型.</param>
        public void Refresh(ImagesRefreshType iType)
        {
            AutoRefreshImagesInfo objRet = null;

            foreach (AutoRefreshImagesInfo loop in Settings)
            {
                if (iType != loop.Type)
                {
                    continue;
                }
                objRet = loop;
                break;
            }
            if (null == objRet)
            {
                objRet = AutoRefreshImagesInfo.Create(this.Root, iType);
                if (null != objRet)
                {
                    this.Settings.Add(objRet);
                }
            }
            else
            {
                objRet.Refresh(this.Root);
            }
        }
Exemple #2
0
        /// <summary>
        /// 创建.
        /// </summary>
        /// <param name="iRootDir">根目录.</param>
        /// <param name="iType">类型.</param>
        public static AutoRefreshImagesInfo Create(
            string iRootDir, ImagesRefreshType iType)
        {
            AutoRefreshImagesInfo objRet = new AutoRefreshImagesInfo();

            if ((null != objRet) &&
                (false != objRet.Init(iRootDir, iType)))
            {
                return(objRet);
            }
            return(null);
        }