mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-04-17 21:24:48 +10:00
Update and fix bugs.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Manager
|
||||
{
|
||||
public partial class ManagerShell: WAShell.WebAppForm
|
||||
@@ -25,6 +27,7 @@ namespace Manager
|
||||
catch { }
|
||||
InitSize ();
|
||||
Text = Bridge.ResXmlStore.StringRes.Get ("MANAGER_APPTITLE");
|
||||
this.Load += Form_Load;
|
||||
}
|
||||
private void InitSize ()
|
||||
{
|
||||
@@ -58,6 +61,17 @@ namespace Manager
|
||||
);
|
||||
WindowState = (FormWindowState)lasts.ReadInt ((int)FormWindowState.Normal);
|
||||
}
|
||||
private void Form_Load (object sender, EventArgs e)
|
||||
{
|
||||
var current = Process.GetCurrentProcess ();
|
||||
var processes = Process.GetProcessesByName (current.ProcessName);
|
||||
int count = processes.Length;
|
||||
int offset = 30; // 每个窗口偏移
|
||||
int x = 20 + (count - 1) * offset;
|
||||
int y = 20 + (count - 1) * offset;
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
this.Location = new Point (x, y);
|
||||
}
|
||||
private void ManagerShell_Load (object sender, EventArgs e)
|
||||
{
|
||||
var root = Path.GetDirectoryName (DataUtils.Utilities.GetCurrentProgramPath ());
|
||||
|
||||
Reference in New Issue
Block a user