コード例 #1
0
        /// <summary>
        /// NotShowedPicPathsリストの中からランダムで画像を選び、オーバーレイとしてセットし、リストから削除する
        /// </summary>
        /// <param name="sender">Nothing to do.</param>
        /// <param name="e">Nothing to do.</param>
        private static void SetNewPictureofFolder(object sender = null, EventArgs e = null)
        {
            if (NotShowedPicPaths.Count == 0)
            {
                ResetNotShowedPics();
            }

            var rnd   = new Random();
            var index = rnd.Next(NotShowedPicPaths.Count);

            SetPicture(NotShowedPicPaths[index]);
            NotShowedPicPaths.RemoveAt(index);
        }
コード例 #2
0
 /// <summary>
 /// 未表示画像リストをリセットする
 /// </summary>
 private static void ResetNotShowedPics()
 {
     NotShowedPicPaths.Clear();
     NotShowedPicPaths.AddRange(PicPaths);
 }