mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-02 10:35:00 +03:00
设置窗口的尺寸不大于屏幕的尺寸
This commit is contained in:
@@ -12,8 +12,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|||||||
@@ -16,8 +16,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|||||||
@@ -15,8 +15,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|||||||
@@ -17,8 +17,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|||||||
@@ -26,8 +26,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|||||||
@@ -13,8 +13,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|||||||
@@ -14,8 +14,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|||||||
@@ -13,8 +13,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Closing += RoutingSettingWindow_Closing;
|
this.Closing += RoutingSettingWindow_Closing;
|
||||||
|
|||||||
@@ -12,8 +12,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|||||||
@@ -14,8 +14,15 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.MaxWidth = SystemParameters.WorkArea.Width;
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
this.MaxHeight = SystemParameters.WorkArea.Height;
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user