diff --git a/UnityLauncher/App.config b/UnityLauncher/App.config
index ee64511..276d37d 100644
--- a/UnityLauncher/App.config
+++ b/UnityLauncher/App.config
@@ -30,6 +30,9 @@
True
+
+ True
+
\ No newline at end of file
diff --git a/UnityLauncher/Form1.Designer.cs b/UnityLauncher/Form1.Designer.cs
index 3c7b24c..0cc6f71 100644
--- a/UnityLauncher/Form1.Designer.cs
+++ b/UnityLauncher/Form1.Designer.cs
@@ -57,6 +57,7 @@ private void InitializeComponent()
this.label3 = new System.Windows.Forms.Label();
this.lstPackageFolders = new System.Windows.Forms.ListBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
+ this.ChkQuitAfterOpen = new System.Windows.Forms.CheckBox();
this.btnOpenLogFolder = new System.Windows.Forms.Button();
this.chkQuitAfterCommandline = new System.Windows.Forms.CheckBox();
this.btnAddRegister = new System.Windows.Forms.Button();
@@ -192,6 +193,7 @@ private void InitializeComponent()
this.gridRecent.TabIndex = 0;
this.gridRecent.KeyDown += new System.Windows.Forms.KeyEventHandler(this.gridRecent_KeyDown);
//
+ this.gridRecent.CellMouseDoubleClick += GridRecent_CellMouseDoubleClick;
// _project
//
this._project.HeaderText = "Project";
@@ -389,6 +391,7 @@ private void InitializeComponent()
//
// tabPage3
//
+ this.tabPage3.Controls.Add(this.ChkQuitAfterOpen);
this.tabPage3.Controls.Add(this.btnOpenLogFolder);
this.tabPage3.Controls.Add(this.chkQuitAfterCommandline);
this.tabPage3.Controls.Add(this.btnAddRegister);
@@ -409,6 +412,17 @@ private void InitializeComponent()
this.tabPage3.Text = "Settings";
this.tabPage3.UseVisualStyleBackColor = true;
//
+ // ChkQuitAfterOpen
+ //
+ this.ChkQuitAfterOpen.AutoSize = true;
+ this.ChkQuitAfterOpen.Location = new System.Drawing.Point(20, 409);
+ this.ChkQuitAfterOpen.Name = "ChkQuitAfterOpen";
+ this.ChkQuitAfterOpen.Size = new System.Drawing.Size(172, 17);
+ this.ChkQuitAfterOpen.TabIndex = 33;
+ this.ChkQuitAfterOpen.Text = "Close after launching a project";
+ this.ChkQuitAfterOpen.UseVisualStyleBackColor = true;
+ this.ChkQuitAfterOpen.CheckedChanged += new System.EventHandler(this.ChkQuitAfterOpen_CheckedChanged);
+ //
// btnOpenLogFolder
//
this.btnOpenLogFolder.Location = new System.Drawing.Point(435, 380);
@@ -422,7 +436,7 @@ private void InitializeComponent()
// chkQuitAfterCommandline
//
this.chkQuitAfterCommandline.AutoSize = true;
- this.chkQuitAfterCommandline.Location = new System.Drawing.Point(20, 409);
+ this.chkQuitAfterCommandline.Location = new System.Drawing.Point(20, 432);
this.chkQuitAfterCommandline.Name = "chkQuitAfterCommandline";
this.chkQuitAfterCommandline.Size = new System.Drawing.Size(189, 17);
this.chkQuitAfterCommandline.TabIndex = 31;
@@ -432,7 +446,7 @@ private void InitializeComponent()
//
// btnAddRegister
//
- this.btnAddRegister.Location = new System.Drawing.Point(139, 442);
+ this.btnAddRegister.Location = new System.Drawing.Point(139, 465);
this.btnAddRegister.Name = "btnAddRegister";
this.btnAddRegister.Size = new System.Drawing.Size(64, 23);
this.btnAddRegister.TabIndex = 30;
@@ -442,7 +456,7 @@ private void InitializeComponent()
//
// btnRemoveRegister
//
- this.btnRemoveRegister.Location = new System.Drawing.Point(209, 442);
+ this.btnRemoveRegister.Location = new System.Drawing.Point(209, 465);
this.btnRemoveRegister.Name = "btnRemoveRegister";
this.btnRemoveRegister.Size = new System.Drawing.Size(64, 23);
this.btnRemoveRegister.TabIndex = 29;
@@ -453,7 +467,7 @@ private void InitializeComponent()
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(19, 447);
+ this.label4.Location = new System.Drawing.Point(19, 470);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(117, 13);
this.label4.TabIndex = 28;
@@ -653,6 +667,7 @@ private void InitializeComponent()
private System.Windows.Forms.DataGridViewTextBoxColumn _dateModified;
private System.Windows.Forms.Button btnOpenLogFolder;
private System.Windows.Forms.TextBox tbSearchBar;
+ private System.Windows.Forms.CheckBox ChkQuitAfterOpen;
}
}
diff --git a/UnityLauncher/Form1.cs b/UnityLauncher/Form1.cs
index 20f88fa..c0430ff 100644
--- a/UnityLauncher/Form1.cs
+++ b/UnityLauncher/Form1.cs
@@ -95,6 +95,7 @@ void LoadSettings()
// update settings window
chkMinimizeToTaskbar.Checked = Properties.Settings.Default.minimizeToTaskbar;
chkQuitAfterCommandline.Checked = Properties.Settings.Default.closeAfterExplorer;
+ ChkQuitAfterOpen.Checked = Properties.Settings.Default.closeAfterProject;
// update installations folder listbox
lstRootFolders.Items.AddRange(Properties.Settings.Default.rootFolders.Cast().ToArray());
@@ -328,6 +329,11 @@ void LaunchProject(string projectPath, string version, bool openProject = true)
myProcess.StartInfo.Arguments = pars;
}
myProcess.Start();
+
+ if (Properties.Settings.Default.closeAfterProject)
+ {
+ Environment.Exit(0);
+ }
}
catch (Exception ex)
{
@@ -734,6 +740,15 @@ private void gridRecent_KeyDown(object sender, KeyEventArgs e)
}
}
+ //Checks if you are doubleclicking the current cell
+ private void GridRecent_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
+ {
+ if(e.Button == MouseButtons.Left && e.RowIndex == gridRecent.CurrentCell.RowIndex)
+ {
+ LaunchSelectedProject();
+ }
+ }
+
// set basefolder of all unity installations
private void btn_setinstallfolder_Click(object sender, EventArgs e)
{
@@ -812,6 +827,12 @@ private void btnAddRegister_Click(object sender, EventArgs e)
AddContextMenuRegistry();
}
+ private void ChkQuitAfterOpen_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.closeAfterProject = ChkQuitAfterOpen.Checked;
+ Properties.Settings.Default.Save();
+ }
+
private void chkQuitAfterCommandline_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.closeAfterExplorer = chkQuitAfterCommandline.Checked;
diff --git a/UnityLauncher/Properties/Settings.Designer.cs b/UnityLauncher/Properties/Settings.Designer.cs
index 73bd910..78dd54b 100644
--- a/UnityLauncher/Properties/Settings.Designer.cs
+++ b/UnityLauncher/Properties/Settings.Designer.cs
@@ -73,5 +73,17 @@ public bool closeAfterExplorer {
this["closeAfterExplorer"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool closeAfterProject {
+ get {
+ return ((bool)(this["closeAfterProject"]));
+ }
+ set {
+ this["closeAfterProject"] = value;
+ }
+ }
}
}
diff --git a/UnityLauncher/Properties/Settings.settings b/UnityLauncher/Properties/Settings.settings
index 9719d60..c70e9e9 100644
--- a/UnityLauncher/Properties/Settings.settings
+++ b/UnityLauncher/Properties/Settings.settings
@@ -18,5 +18,8 @@
True
+
+ True
+
\ No newline at end of file