Inheritance: System.EventArgs
コード例 #1
0
        public static void OnThumbnailChanged(Maid maid)
        {
            ThumbnailEventArgs args = new ThumbnailEventArgs {
                Maid = maid
            };

            ThumbnailChanged?.Invoke(null, args);
        }
コード例 #2
0
        private void OnMaidThumbnailChanged(object sender, ThumbnailEventArgs args)
        {
            if (!IsMaidLoaded(args.Maid))
                return;

            Image img;
            using (MemoryStream stream = new MemoryStream(args.Maid.GetThumIcon().EncodeToPNG()))
            {
                img = Image.FromStream(stream);
            }

            if (!maidThumbnails.ContainsKey(args.Maid.Param.status.guid))
                maidThumbnails.Add(args.Maid.Param.status.guid, img);
            else
            {
                maidThumbnails[args.Maid.Param.status.guid].Dispose();
                maidThumbnails.Remove(args.Maid.Param.status.guid);
                maidThumbnails.Add(args.Maid.Param.status.guid, img);
            }

            listBox1.Invalidate();
        }
コード例 #3
0
 public static void OnThumbnailChanged(Maid maid)
 {
     ThumbnailEventArgs args = new ThumbnailEventArgs {Maid = maid};
     ThumbnailChanged?.Invoke(args);
 }