她她她
This commit is contained in:
parent
349649087d
commit
3e8df48443
@ -35,7 +35,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
{
|
{
|
||||||
private bool _isDragging = false;
|
private bool _isDragging = false;
|
||||||
private Ellipse _draggedEllipse;
|
private Ellipse _draggedEllipse;
|
||||||
private System.Windows.Point _dragStartPoint;
|
private System.Windows.Point _dragStartPoint;
|
||||||
private IHumanPredictor _humanPredictor;
|
private IHumanPredictor _humanPredictor;
|
||||||
private IObjectDetector _objectDetector;
|
private IObjectDetector _objectDetector;
|
||||||
private HumanGraphicsRenderer _humanGraphicsRenderer;
|
private HumanGraphicsRenderer _humanGraphicsRenderer;
|
||||||
@ -62,17 +62,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
var app = (App)Application.Current;
|
var app = (App)Application.Current;
|
||||||
using var scope = App.AppHost.Services.CreateScope();
|
using var scope = App.AppHost.Services.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
var BaseData = await db.BasicConfig.FirstOrDefaultAsync();
|
var BaseData = await db.BasicConfig.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
var host = "172.17.30.64";
|
if (BaseData==null)
|
||||||
var name = "admin";
|
{
|
||||||
var password = "yd708090";
|
this.ShowError("相机主机地址/IP不能为空。");
|
||||||
if (BaseData != null) {
|
return;
|
||||||
host = BaseData.Host;
|
|
||||||
name = BaseData.UserName;
|
|
||||||
password = BaseData.Password;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var _webcamClient = WebcamClient.CreateRTSP( host, name, password, 554u);
|
var _webcamClient = WebcamClient.CreateRTSP(BaseData.Host, BaseData.UserName, BaseData.Password);
|
||||||
|
|
||||||
//处理抽帧回调
|
//处理抽帧回调
|
||||||
_webcamClient.OnExtractFrame += this.OnFrameExtracted;
|
_webcamClient.OnExtractFrame += this.OnFrameExtracted;
|
||||||
@ -390,7 +387,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
BottomPoint3 = new AiSportsMicrospaceDB.Entities.Point { X = 1722, Y = 909 },
|
BottomPoint3 = new AiSportsMicrospaceDB.Entities.Point { X = 1722, Y = 909 },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user