Skip to content

Commit fef6577

Browse files
authored
Merge pull request #36 from Jack251970/dialog_topmost
Set all dialogs to be topmost
2 parents f9fae9c + b5f332a commit fef6577

19 files changed

+19
-19
lines changed

ContextMenuManager/BluePointLilac.Controls/BackupDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
3434
frm.TvItems = TvItems;
3535
if (CmbSelectedText != null) frm.CmbSelectedText = CmbSelectedText;
3636
else frm.CmbSelectedIndex = CmbSelectedIndex;
37-
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = owner.TopMost;
37+
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = true;
3838
bool flag = frm.ShowDialog() == DialogResult.OK;
3939
if(flag)
4040
{

ContextMenuManager/BluePointLilac.Controls/DownloadDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected override void OnLoad(EventArgs e)
103103
if(Owner == null) StartPosition = FormStartPosition.CenterScreen;
104104
else
105105
{
106-
TopMost = Owner.TopMost;
106+
TopMost = true;
107107
StartPosition = FormStartPosition.CenterParent;
108108
}
109109
base.OnLoad(e);

ContextMenuManager/BluePointLilac.Controls/InputDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
2222
frm.Text = Title;
2323
frm.InputedText = Text;
2424
frm.Size = Size;
25-
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = owner.TopMost;
25+
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = true;
2626
bool flag = frm.ShowDialog() == DialogResult.OK;
2727
Text = flag ? frm.InputedText : null;
2828
return flag;

ContextMenuManager/BluePointLilac.Controls/SelectDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
2424
if(Selected != null) frm.Selected = Selected;
2525
else frm.SelectedIndex = SelectedIndex;
2626
frm.CanEdit = CanEdit;
27-
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = owner.TopMost;
27+
if (Control.FromHandle(hwndOwner) is Form owner) frm.TopMost = true;
2828
bool flag = frm.ShowDialog() == DialogResult.OK;
2929
if(flag)
3030
{

ContextMenuManager/BluePointLilac.Methods/MessageBoxEx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected override void OnLoad(EventArgs e)
236236
if(Owner == null) StartPosition = FormStartPosition.CenterScreen;
237237
else
238238
{
239-
TopMost = Owner.TopMost;
239+
TopMost = true;
240240
StartPosition = FormStartPosition.CenterParent;
241241
if(CanMoveParent) this.MoveAsMove(Owner);
242242
}

ContextMenuManager/Controls/DetailedEditDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
1919
var location = GuidInfo.GetIconLocation(GroupGuid);
2020
frm.Icon = ResourceIcon.GetIcon(location.IconPath, location.IconIndex);
2121
frm.Text = AppString.Dialog.DetailedEdit.Replace("%s", GuidInfo.GetText(GroupGuid));
22-
frm.TopMost = AppConfig.TopMost;
22+
frm.TopMost = true;
2323
frm.AddList(list);
2424
list.GroupGuid = GroupGuid;
2525
list.UseUserDic = XmlDicHelper.DetailedEditGuidDic[GroupGuid];

ContextMenuManager/Controls/DonateBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
134134
MainForm mainForm = (MainForm)FromHandle(hwndOwner);
135135
frm.Left = mainForm.Left + (mainForm.Width + mainForm.SideBar.Width - frm.Width) / 2;
136136
frm.Top = mainForm.Top + 150.DpiZoom();
137-
frm.TopMost = AppConfig.TopMost;
137+
frm.TopMost = true;
138138
frm.ShowDialog();
139139
}
140140
return true;

ContextMenuManager/Controls/EnhanceMenusDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
1818
{
1919
frm.Text = AppString.SideBar.EnhanceMenu;
2020
frm.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
21-
frm.TopMost = AppConfig.TopMost;
21+
frm.TopMost = true;
2222
frm.AddList(list);
2323
list.ScenePath = ScenePath;
2424
list.UseUserDic = XmlDicHelper.EnhanceMenuPathDic[ScenePath];

ContextMenuManager/Controls/Interfaces/ITsiGuidItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
163163
frm.ItemIcon = ItemIcon;
164164
frm.ItemIconPath = ItemIconPath;
165165
frm.ItemIconIndex = ItemIconIndex;
166-
frm.TopMost = AppConfig.TopMost;
166+
frm.TopMost = true;
167167
bool flag = frm.ShowDialog() == DialogResult.OK;
168168
if(flag)
169169
{

ContextMenuManager/Controls/Interfaces/ITsiShortcutCommandItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected override bool RunDialog(IntPtr hwndOwner)
5151
{
5252
frm.Command = Command;
5353
frm.Arguments = Arguments;
54-
frm.TopMost = AppConfig.TopMost;
54+
frm.TopMost = true;
5555
bool flag = frm.ShowDialog() == DialogResult.OK;
5656
if(flag)
5757
{

0 commit comments

Comments
 (0)