Exemple #1
0
 public static Stack <DrawableMessage> MakeSampleChat(ChatVideo cv)
 {
     using (var ch = new ChatHandler(cv, null, FFZ.SampleFFZ, Badges.SampleBadges, null))
     {
         var lines = new Stack <DrawableMessage>();
         MakeSampleMessages().ForEach(m => lines.Push(ch.MakeDrawableMessage(m)));
         return(lines);
     }
 }
Exemple #2
0
 public static void DrawPreview(ViewModel vm, Bitmap bmp)
 {
     using (var chat = new ChatVideo(vm))
     {
         var messages = ChatHandler.MakeSampleChat(chat);
         chat.DrawFrame(bmp, messages);
         foreach (var msg in messages)
         {
             msg.Lines.ForEach(m => m.Drawables.ForEach(d => d.Dispose()));
         }
     }
 }
 //public ChatHandler(ChatVideo cv, BTTV bttv, FFZ ffz, Badges badges, Bits bits)
 public ChatHandler(ChatVideo cv, Badges badges, Bits bits)
 {
     Font       = (Font)cv.Font.Clone();
     BoldFont   = new Font(Font, FontStyle.Bold);
     ChatColor  = Color.FromArgb(cv.ChatColor.A, cv.ChatColor.R, cv.ChatColor.G, cv.ChatColor.B);
     BGColor    = Color.FromArgb(cv.BGColor.A, cv.BGColor.R, cv.BGColor.G, cv.BGColor.B);
     Width      = cv.Width;
     Spacing    = cv.LineSpacing;
     ShowBadges = cv.ShowBadges;
     //BTTV = bttv;
     //FFZ = ffz;
     Badges = badges;
     Bits   = bits;
 }