mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-06-12 19:11:25 -07:00
Fixed form StartPositions
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ApplicationIcon>ini.ico</ApplicationIcon>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<Version>1.0.1</Version>
|
||||
<Version>1.0.2</Version>
|
||||
<PackageIcon>ini.ico</PackageIcon>
|
||||
<PackageIconUrl />
|
||||
<Description>Automatically downloads and installs CreamAPI files for programs/games.</Description>
|
||||
|
||||
Generated
+1
-1
@@ -131,7 +131,7 @@ namespace CreamInstaller
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DialogForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "DialogForm";
|
||||
this.TopMost = true;
|
||||
((System.ComponentModel.ISupportInitialize)(this.icon)).EndInit();
|
||||
|
||||
@@ -6,8 +6,9 @@ namespace CreamInstaller
|
||||
{
|
||||
public partial class DialogForm : Form
|
||||
{
|
||||
public DialogForm()
|
||||
public DialogForm(IWin32Window owner)
|
||||
{
|
||||
Owner = owner as Form;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -126,7 +126,7 @@ namespace CreamInstaller
|
||||
this.MinimumSize = new System.Drawing.Size(500, 300);
|
||||
this.Name = "InstallForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "InstallForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.OnLoad);
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace CreamInstaller
|
||||
{
|
||||
public partial class InstallForm : Form
|
||||
{
|
||||
public InstallForm()
|
||||
public InstallForm(IWin32Window owner)
|
||||
{
|
||||
Owner = owner as Form;
|
||||
InitializeComponent();
|
||||
Program.InstallForm = this;
|
||||
Text = Program.ApplicationName;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CreamInstaller
|
||||
}
|
||||
|
||||
Hide();
|
||||
new SelectForm().ShowDialog();
|
||||
new SelectForm(this).ShowDialog();
|
||||
Close();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CreamInstaller
|
||||
string FileName = Path.GetFileName(Program.CurrentProcessFilePath);
|
||||
if (FileName != "CreamInstaller.exe")
|
||||
{
|
||||
if (new DialogForm().Show(Program.ApplicationName, SystemIcons.Warning,
|
||||
if (new DialogForm(this).Show(Program.ApplicationName, SystemIcons.Warning,
|
||||
"WARNING: CreamInstaller.exe was renamed!" +
|
||||
"\n\nThis will cause unwanted behavior when updating the program!",
|
||||
"Ignore", "Abort") == DialogResult.Cancel)
|
||||
@@ -104,7 +104,7 @@ namespace CreamInstaller
|
||||
}
|
||||
catch (ApiException)
|
||||
{
|
||||
if (new DialogForm().Show(Program.ApplicationName, SystemIcons.Warning,
|
||||
if (new DialogForm(this).Show(Program.ApplicationName, SystemIcons.Warning,
|
||||
$"ERROR: Failed logging into MEGA!" +
|
||||
"\n\nMEGA is likely offline, please try again later. . .",
|
||||
"Retry", "Cancel") == DialogResult.OK)
|
||||
|
||||
Generated
+1
-1
@@ -149,7 +149,7 @@ namespace CreamInstaller
|
||||
this.MinimumSize = new System.Drawing.Size(500, 328);
|
||||
this.Name = "SelectForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "SelectForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.OnLoad);
|
||||
|
||||
@@ -13,8 +13,9 @@ namespace CreamInstaller
|
||||
{
|
||||
public partial class SelectForm : Form
|
||||
{
|
||||
public SelectForm()
|
||||
public SelectForm(IWin32Window owner)
|
||||
{
|
||||
Owner = owner as Form;
|
||||
InitializeComponent();
|
||||
Program.SelectForm = this;
|
||||
Text = Program.ApplicationName;
|
||||
@@ -222,7 +223,7 @@ namespace CreamInstaller
|
||||
if (Program.ProgramSelections.Count > 0)
|
||||
{
|
||||
Hide();
|
||||
new InstallForm().ShowDialog();
|
||||
new InstallForm(this).ShowDialog();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user