Ejemplo n.º 1
0
 public DanmuPlayer(ref DanmakuCurtain a, ref Client client_, ref Grid curtain_)
 {
     dmkCurt     = a;
     curtain     = curtain_;
     client      = client_;
     danmuList   = null;
     loadedDanmu = 0;
 }
Ejemplo n.º 2
0
 public void play(Grid curtain, DanmakuCurtain dmkCurt)
 {
     foreach (Tuple <String, double> item in hist)
     {
         Timer timer = new Timer(item.Item2);
         timer.Elapsed += new ElapsedEventHandler(
             delegate(object source, ElapsedEventArgs e){
             Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
             {
                 dmkCurt.Shoot(curtain, item.Item1);
             }));
         }
             );
         timer.AutoReset = false;
         timer.Enabled   = true;
     }
 }
        //public Grid curtain;


        public MainWindow()
        {
            InitializeComponent();
            image_control        = new System.Windows.Forms.PictureBox();
            form_container.Child = image_control;
            image_control.SendToBack();
            Local.ref_addr = Directory.GetCurrentDirectory() + "\\";
            if (!Directory.Exists("danmu"))
            {
                Directory.CreateDirectory("danmu");
            }
            if (!Directory.Exists("audio"))
            {
                Directory.CreateDirectory("audio");
            }
            dmkCurt = new DanmakuCurtain();
            Console.Out.WriteLine("starting");
        }