示例#1
0
 private void b_Disconnected(object sender, DisconnectEvtArgs args)
 {
 }
示例#2
0
        private void b_Disconnected(object sender, DisconnectEvtArgs args)
        {
            logging("連接被斷開: 开发者信息" + args.Error);
            AddDMText("彈幕姬報告", "連接被斷開", true);

            if (this.CheckAccess())
            {
                if (AutoReconnect.IsChecked == true && args.Error != null)
                {
                    logging("正在自动重连...");
                    AddDMText("彈幕姬報告", "正在自动重连", true);
                    connbtn_Click(null, null);
                }
                else
                {
                    this.connbtn.IsEnabled = true;
                }
            }
            else
            {
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    if (AutoReconnect.IsChecked == true && args.Error != null)
                    {
                        logging("正在自动重连...");
                        AddDMText("彈幕姬報告", "正在自动重连", true);
                        connbtn_Click(null, null);
                    }
                    else
                    {
                        this.connbtn.IsEnabled = true;
                    }
                }));
            }
        }