コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: xxy1991/cozy
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            button1.IsEnabled = false;
            button.IsEnabled = true;

            if (biliLive != null)
            {
                biliLive.Disconnect();
                biliLive = null;
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: xxy1991/cozy
 static void Main(string[] args)
 {
     args = args.Length > 0 ? args : new[] { "34083" };
     int roomId;
     if (args.Length > 0 && int.TryParse(args[0], out roomId))
     {
         DanmakuLoader b = new BiliDMLib.DanmakuLoader();
         b.Disconnected += b_Disconnected;
         b.ReceivedDanmaku += b_ReceivedDanmaku;
         b.ReceivedRoomCount += b_ReceivedRoomCount;
         b.ConnectAsync(roomId);
         Thread.Sleep(233333333);
     }
 }
コード例 #3
0
        static void Main(string[] args)
        {
            args = args.Length > 0 ? args : new[] { "34083" };
            int roomId;

            if (args.Length > 0 && int.TryParse(args[0], out roomId))
            {
                DanmakuLoader b = new BiliDMLib.DanmakuLoader();
                b.Disconnected      += b_Disconnected;
                b.ReceivedDanmaku   += b_ReceivedDanmaku;
                b.ReceivedRoomCount += b_ReceivedRoomCount;
                b.ConnectAsync(roomId);
                Thread.Sleep(233333333);
            }
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: xxy1991/cozy
        private async void button_Click(object sender, RoutedEventArgs e)
        {
            button.IsEnabled = false;
            button1.IsEnabled = true;

            string roomId = textBox.GetLineText(0);
            int nId = int.Parse(roomId);

            if (biliLive == null)
            {
                biliLive = new BiliDMLib.DanmakuLoader();
                biliLive.Disconnected += b_Disconnected;
                biliLive.ReceivedDanmaku += b_ReceivedDanmaku;
                biliLive.ReceivedRoomCount += b_ReceivedRoomCount;
                await biliLive.ConnectAsync(nId);
            }
        }