diff --git a/CPF_Cef/AksVideoPlayer.cs b/CPF_Cef/AksVideoPlayer.cs index 1914d28..f5d71c3 100644 --- a/CPF_Cef/AksVideoPlayer.cs +++ b/CPF_Cef/AksVideoPlayer.cs @@ -49,8 +49,15 @@ namespace AksWebBrowser { IsAntiAlias = true; CornerRadius = "3,3,3,3"; - Height = "1920"; - Width = "1080"; + if (Parame.sfhp) + { + Height = "1080"; + Width = "1920"; + } + else { + Height = "1920"; + Width = "1080"; + } Background = "#2c2c2c"; ZIndex = 100; //WindowState = WindowState = WindowState.FullScreen; diff --git a/CPF_Cef/FrmMain.cs b/CPF_Cef/FrmMain.cs index c82b683..c9ae442 100644 --- a/CPF_Cef/FrmMain.cs +++ b/CPF_Cef/FrmMain.cs @@ -21,10 +21,8 @@ namespace AksWebBrowser { public class FrmMain : Window { - public int w = 1080; - public int h = 1920; - //public int h = 1080; - //public int w = 1920; + public int h = 1080; + public int w = 1920; protected override void InitializeComponent() { @@ -69,8 +67,16 @@ namespace AksWebBrowser { LoadStyleFile("res://AksWebBrowser/StyleSheet.css"); //窗体大小 - this.Width = w; - this.Height = h; + if (Parame.sfhp) + { + this.Height = h; + this.Width = w; + } + else + { + this.Height = w; + this.Width = h; + } //SetTaskStatus.Hidetask(); base.OnInitialized(); //初始化网络连接(硬件服务响应) @@ -79,8 +85,16 @@ namespace AksWebBrowser textBox = FindPresenterByName(nameof(textBox)); Parame.webBrowser.CusRequest.CusResquestEvent += CusRequest_CusResquestEvent; //浏览器大小 - Parame.webBrowser.Width = w; - Parame.webBrowser.Height = h; + if (Parame.sfhp) + { + Parame.webBrowser.Width = w; + Parame.webBrowser.Height = h; + } + else + { + Parame.webBrowser.Width = h; + Parame.webBrowser.Height = w; + } //Parame.webBrowser.Url = "http://143.169.62.3:8096/#/main-out";//天府新区 Parame.webBrowser.Url = "http://127.0.0.1:8096/#/main-out"; //Parame.webBrowser.Url = "http://192.168.0.34:8078/#/main-out"; diff --git a/CPF_Cef/Parame.cs b/CPF_Cef/Parame.cs index bd57d4d..e3fabf1 100644 --- a/CPF_Cef/Parame.cs +++ b/CPF_Cef/Parame.cs @@ -25,6 +25,8 @@ namespace AksWebBrowser public static string apiUrl ="http://127.0.0.1:8098";//"http://143.169.62.3:8098";// //授权key public static string key = "1"; + //是否横屏 + public static bool sfhp = true; //硬件Ip public static string Ip = "192.168.1.166"; //高拍仪url