refactor: mvp
This commit is contained in:
parent
58cc7521cb
commit
9350fbecbe
@ -15,7 +15,7 @@ namespace Tech_Demo.Presenter
|
||||
|
||||
public string GetEquipmentUrl()
|
||||
{
|
||||
var equipment = new Equipment {Id = 1, Name = "设备1", Ip = "192.168.1.110", Url = @"rtsp://10.211.55.2:8554/rains", Type = 1};
|
||||
var equipment = new Equipment {Id = 1, Name = "设备1", Ip = "192.168.1.110", Url = @"rtsp://admin:abc123456@192.168.1.233:554/h264/ch33/main/av_stream", Type = 1};
|
||||
return equipment.Url;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,9 @@ namespace Tech_Demo
|
||||
var mainView = new MainView();
|
||||
mainView.Presenter = new MainPresenter(mainView, null);
|
||||
Application.Run(mainView);
|
||||
// var startNew = Task.Factory.StartNew(() => ("Hello Task"), TaskCreationOptions.LongRunning);
|
||||
// Console.WriteLine(startNew.Result);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -100,6 +100,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Util\ArpUtil.cs" />
|
||||
<Compile Include="Util\GetIPNetTable.cs" />
|
||||
<Compile Include="Util\HttpUtil.cs" />
|
||||
<Compile Include="Util\Thumbnail.cs" />
|
||||
<Compile Include="View\IMainView.cs" />
|
||||
<Compile Include="View\Impl\MainView.cs">
|
||||
|
||||
24
Tech/Util/HttpUtil.cs
Normal file
24
Tech/Util/HttpUtil.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tech_Demo.Util
|
||||
{
|
||||
public class HttpUtil
|
||||
{
|
||||
private readonly HttpClient _httpClient = new HttpClient();
|
||||
private static HttpUtil _instance;
|
||||
private HttpUtil(){}
|
||||
|
||||
public static HttpUtil GetInstance()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new HttpUtil();
|
||||
}
|
||||
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -109,6 +109,11 @@ namespace Tech_Demo
|
||||
|
||||
private void button1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
// 添加录制参数 :sout=#duplicate{dst=display, dst=standard{access=file,mux=flv,dst=D:\work\xzl\teching\playback}}
|
||||
|
||||
// this.videoView.MediaPlayer.Media.AddOption(":sout=#duplicate{dst=display, dst=standard{access=file,mux=flv,dst=D:/work/xzl/teching/playback/1.flv}}");
|
||||
MessageBox.Show(@"开始录制", @"提示", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Information);
|
||||
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user