private void btnStart_Click(object sender, RoutedEventArgs e)//按鈕觸發事件
{
//判斷btnStart按鈕的Tag屬性值,若為0則表示攝像頭為關閉窗臺,則開啟,否則關閉
if (btnStart.Tag.ToString() == "0")
{
//若_VedioAndController攝像頭操作類為null。表示未實體化,則初始化攝像頭操作類
if (VedioAndController == null) // VedioAndController攝像頭的類
VedioAndController = new IpCameraHelper(Function.GetConfigValue("RoundVedioIp"), Function.GetConfigValue("RoundVedioUserName"), Function.GetConfigValue("RoundVedioPassWord"),
new Action<ImageEventArgs>((arg) =>
{
//arg.FrameReadyEventArgs.BitmapImage為攝像頭回傳的影像,將其賦值給img圖片控制元件,用于顯示圖片
img.Source = arg.FrameReadyEventArgs.BitmapImage;
}));
我想請教的是: new IpCameraHelper(Function.GetConfigValue("RoundVedioIp"), Function.GetConfigValue("RoundVedioUserName"), Function.GetConfigValue("RoundVedioPassWord"),是啥意思啊初始化了攝像頭操作類,然后呢?Function.GetConfigValue("RoundVedioIp"), Function.GetConfigValue("RoundVedioUserName"), Function.GetConfigValue("RoundVedioPassWord"),這是在干哈啊,想哭
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/104756.html
標籤:C#
