mirror of https://github.com/2dust/v2rayN
设置窗口的尺寸不大于屏幕的尺寸
parent
0fe7d5e598
commit
f97530a671
|
@ -12,8 +12,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Loaded += Window_Loaded;
|
||||
|
|
|
@ -16,8 +16,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Loaded += Window_Loaded;
|
||||
|
|
|
@ -15,8 +15,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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;
|
||||
_config = LazyConfig.Instance.GetConfig();
|
||||
|
|
|
@ -17,8 +17,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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;
|
||||
_config = LazyConfig.Instance.GetConfig();
|
||||
|
|
|
@ -26,8 +26,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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();
|
||||
|
||||
|
|
|
@ -19,8 +19,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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;
|
||||
_config = LazyConfig.Instance.GetConfig();
|
||||
|
|
|
@ -13,8 +13,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Loaded += Window_Loaded;
|
||||
|
|
|
@ -14,8 +14,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Loaded += Window_Loaded;
|
||||
|
|
|
@ -13,8 +13,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Closing += RoutingSettingWindow_Closing;
|
||||
|
|
|
@ -12,8 +12,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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.Loaded += Window_Loaded;
|
||||
|
|
|
@ -14,8 +14,15 @@ namespace v2rayN.Views
|
|||
{
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue