mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Merge branch 'release/1.0.1' into main
This commit is contained in:
commit
ced51bb80d
@ -37,8 +37,8 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.0")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
@ -47,6 +47,7 @@ namespace DisplayMagician
|
||||
public string Arguments;
|
||||
public bool ExecutableArgumentsRequired;
|
||||
public bool CloseOnFinish;
|
||||
public bool DontStartIfAlreadyRunning;
|
||||
}
|
||||
|
||||
public struct Executable
|
||||
@ -2239,11 +2240,6 @@ namespace DisplayMagician
|
||||
System.IO.File.Delete(shortcutFileName);
|
||||
}
|
||||
|
||||
// Actually create the shortcut!
|
||||
//var wshShellType = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8"));
|
||||
//dynamic wshShell = Activator.CreateInstance(wshShellType);
|
||||
|
||||
|
||||
WshShell shell = new WshShell();
|
||||
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutFileName);
|
||||
|
||||
|
@ -708,6 +708,19 @@ namespace DisplayMagician
|
||||
logger.Info($"ShortcutRepository/RunShortcut: Starting {startProgramsToStart.Count} programs before the main game or executable");
|
||||
foreach (StartProgram processToStart in startProgramsToStart)
|
||||
{
|
||||
// If required, check whether a process is started already
|
||||
if (processToStart.DontStartIfAlreadyRunning)
|
||||
{
|
||||
logger.Info($"ShortcutRepository/RunShortcut: Checking if process {processToStart.Executable} is already running");
|
||||
Process[] alreadyRunningProcesses = System.Diagnostics.Process.GetProcessesByName(Path.GetFileNameWithoutExtension(processToStart.Executable));
|
||||
if (alreadyRunningProcesses.Length > 0)
|
||||
{
|
||||
logger.Info($"ShortcutRepository/RunShortcut: Process {processToStart.Executable} is already running, so we won't start another one");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Start the executable
|
||||
logger.Info($"ShortcutRepository/RunShortcut: Starting process {processToStart.Executable}");
|
||||
Process process = null;
|
||||
|
@ -112,7 +112,7 @@ namespace DisplayMagician.UIForms
|
||||
|
||||
private void Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.None;
|
||||
//DialogResult = DialogResult.None;
|
||||
|
||||
// Only do something if there is a shortcut selected
|
||||
if (_selectedProfile != null)
|
||||
@ -155,7 +155,7 @@ namespace DisplayMagician.UIForms
|
||||
}
|
||||
|
||||
dialog_save.FileName = string.Empty;
|
||||
DialogResult = DialogResult.OK;
|
||||
//DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
92
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
92
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
@ -142,6 +142,10 @@ namespace DisplayMagician.UIForms
|
||||
this.lbl_title = new System.Windows.Forms.Label();
|
||||
this.lbl_shortcut_name = new System.Windows.Forms.Label();
|
||||
this.cb_autosuggest = new System.Windows.Forms.CheckBox();
|
||||
this.cb_dont_start_if_running1 = new System.Windows.Forms.CheckBox();
|
||||
this.cb_dont_start_if_running2 = new System.Windows.Forms.CheckBox();
|
||||
this.cb_dont_start_if_running3 = new System.Windows.Forms.CheckBox();
|
||||
this.cb_dont_start_if_running4 = new System.Windows.Forms.CheckBox();
|
||||
this.tabc_shortcut.SuspendLayout();
|
||||
this.tabp_display.SuspendLayout();
|
||||
this.tabp_audio.SuspendLayout();
|
||||
@ -606,6 +610,7 @@ namespace DisplayMagician.UIForms
|
||||
//
|
||||
// pnl_start_program4
|
||||
//
|
||||
this.pnl_start_program4.Controls.Add(this.cb_dont_start_if_running4);
|
||||
this.pnl_start_program4.Controls.Add(this.cb_start_program4);
|
||||
this.pnl_start_program4.Controls.Add(this.txt_start_program4);
|
||||
this.pnl_start_program4.Controls.Add(this.cb_start_program_close4);
|
||||
@ -639,11 +644,11 @@ namespace DisplayMagician.UIForms
|
||||
//
|
||||
this.cb_start_program_close4.AutoSize = true;
|
||||
this.cb_start_program_close4.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_start_program_close4.Location = new System.Drawing.Point(167, 87);
|
||||
this.cb_start_program_close4.Location = new System.Drawing.Point(547, 82);
|
||||
this.cb_start_program_close4.Name = "cb_start_program_close4";
|
||||
this.cb_start_program_close4.Size = new System.Drawing.Size(344, 24);
|
||||
this.cb_start_program_close4.Size = new System.Drawing.Size(398, 24);
|
||||
this.cb_start_program_close4.TabIndex = 16;
|
||||
this.cb_start_program_close4.Text = "Close program when you finish playing Game";
|
||||
this.cb_start_program_close4.Text = "Close started program when you finish playing Game";
|
||||
this.cb_start_program_close4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_start_program_close4.UseVisualStyleBackColor = true;
|
||||
this.cb_start_program_close4.Visible = false;
|
||||
@ -691,9 +696,11 @@ namespace DisplayMagician.UIForms
|
||||
this.lbl_start_program4.Size = new System.Drawing.Size(244, 20);
|
||||
this.lbl_start_program4.TabIndex = 0;
|
||||
this.lbl_start_program4.Text = "Choose a program to start fourth:";
|
||||
this.lbl_start_program4.Click += new System.EventHandler(this.lbl_start_program4_Click);
|
||||
//
|
||||
// pnl_start_program3
|
||||
//
|
||||
this.pnl_start_program3.Controls.Add(this.cb_dont_start_if_running3);
|
||||
this.pnl_start_program3.Controls.Add(this.cb_start_program3);
|
||||
this.pnl_start_program3.Controls.Add(this.txt_start_program3);
|
||||
this.pnl_start_program3.Controls.Add(this.cb_start_program_close3);
|
||||
@ -727,11 +734,11 @@ namespace DisplayMagician.UIForms
|
||||
//
|
||||
this.cb_start_program_close3.AutoSize = true;
|
||||
this.cb_start_program_close3.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_start_program_close3.Location = new System.Drawing.Point(167, 87);
|
||||
this.cb_start_program_close3.Location = new System.Drawing.Point(547, 82);
|
||||
this.cb_start_program_close3.Name = "cb_start_program_close3";
|
||||
this.cb_start_program_close3.Size = new System.Drawing.Size(344, 24);
|
||||
this.cb_start_program_close3.Size = new System.Drawing.Size(398, 24);
|
||||
this.cb_start_program_close3.TabIndex = 16;
|
||||
this.cb_start_program_close3.Text = "Close program when you finish playing Game";
|
||||
this.cb_start_program_close3.Text = "Close started program when you finish playing Game";
|
||||
this.cb_start_program_close3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_start_program_close3.UseVisualStyleBackColor = true;
|
||||
this.cb_start_program_close3.Visible = false;
|
||||
@ -779,9 +786,11 @@ namespace DisplayMagician.UIForms
|
||||
this.lbl_start_program3.Size = new System.Drawing.Size(233, 20);
|
||||
this.lbl_start_program3.TabIndex = 0;
|
||||
this.lbl_start_program3.Text = "Choose a program to start third:";
|
||||
this.lbl_start_program3.Click += new System.EventHandler(this.lbl_start_program3_Click);
|
||||
//
|
||||
// pnl_start_program2
|
||||
//
|
||||
this.pnl_start_program2.Controls.Add(this.cb_dont_start_if_running2);
|
||||
this.pnl_start_program2.Controls.Add(this.cb_start_program2);
|
||||
this.pnl_start_program2.Controls.Add(this.txt_start_program2);
|
||||
this.pnl_start_program2.Controls.Add(this.cb_start_program_close2);
|
||||
@ -815,11 +824,11 @@ namespace DisplayMagician.UIForms
|
||||
//
|
||||
this.cb_start_program_close2.AutoSize = true;
|
||||
this.cb_start_program_close2.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_start_program_close2.Location = new System.Drawing.Point(167, 87);
|
||||
this.cb_start_program_close2.Location = new System.Drawing.Point(547, 82);
|
||||
this.cb_start_program_close2.Name = "cb_start_program_close2";
|
||||
this.cb_start_program_close2.Size = new System.Drawing.Size(344, 24);
|
||||
this.cb_start_program_close2.Size = new System.Drawing.Size(398, 24);
|
||||
this.cb_start_program_close2.TabIndex = 16;
|
||||
this.cb_start_program_close2.Text = "Close program when you finish playing Game";
|
||||
this.cb_start_program_close2.Text = "Close started program when you finish playing Game";
|
||||
this.cb_start_program_close2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_start_program_close2.UseVisualStyleBackColor = true;
|
||||
this.cb_start_program_close2.Visible = false;
|
||||
@ -867,9 +876,11 @@ namespace DisplayMagician.UIForms
|
||||
this.lbl_start_program2.Size = new System.Drawing.Size(254, 20);
|
||||
this.lbl_start_program2.TabIndex = 0;
|
||||
this.lbl_start_program2.Text = "Choose a program to start second:";
|
||||
this.lbl_start_program2.Click += new System.EventHandler(this.lbl_start_program2_Click);
|
||||
//
|
||||
// pnl_start_program1
|
||||
//
|
||||
this.pnl_start_program1.Controls.Add(this.cb_dont_start_if_running1);
|
||||
this.pnl_start_program1.Controls.Add(this.cb_start_program1);
|
||||
this.pnl_start_program1.Controls.Add(this.txt_start_program1);
|
||||
this.pnl_start_program1.Controls.Add(this.cb_start_program_close1);
|
||||
@ -903,11 +914,11 @@ namespace DisplayMagician.UIForms
|
||||
//
|
||||
this.cb_start_program_close1.AutoSize = true;
|
||||
this.cb_start_program_close1.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_start_program_close1.Location = new System.Drawing.Point(167, 87);
|
||||
this.cb_start_program_close1.Location = new System.Drawing.Point(547, 82);
|
||||
this.cb_start_program_close1.Name = "cb_start_program_close1";
|
||||
this.cb_start_program_close1.Size = new System.Drawing.Size(344, 24);
|
||||
this.cb_start_program_close1.Size = new System.Drawing.Size(398, 24);
|
||||
this.cb_start_program_close1.TabIndex = 16;
|
||||
this.cb_start_program_close1.Text = "Close program when you finish playing Game";
|
||||
this.cb_start_program_close1.Text = "Close started program when you finish playing Game";
|
||||
this.cb_start_program_close1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_start_program_close1.UseVisualStyleBackColor = true;
|
||||
this.cb_start_program_close1.Visible = false;
|
||||
@ -955,6 +966,7 @@ namespace DisplayMagician.UIForms
|
||||
this.lbl_start_program1.Size = new System.Drawing.Size(228, 20);
|
||||
this.lbl_start_program1.TabIndex = 0;
|
||||
this.lbl_start_program1.Text = "Choose a program to start first:";
|
||||
this.lbl_start_program1.Click += new System.EventHandler(this.lbl_start_program1_Click);
|
||||
//
|
||||
// tabp_game
|
||||
//
|
||||
@ -1513,6 +1525,58 @@ namespace DisplayMagician.UIForms
|
||||
this.cb_autosuggest.UseVisualStyleBackColor = true;
|
||||
this.cb_autosuggest.CheckedChanged += new System.EventHandler(this.cb_autosuggest_CheckedChanged);
|
||||
//
|
||||
// cb_dont_start_if_running1
|
||||
//
|
||||
this.cb_dont_start_if_running1.AutoSize = true;
|
||||
this.cb_dont_start_if_running1.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_dont_start_if_running1.Location = new System.Drawing.Point(167, 82);
|
||||
this.cb_dont_start_if_running1.Name = "cb_dont_start_if_running1";
|
||||
this.cb_dont_start_if_running1.Size = new System.Drawing.Size(289, 24);
|
||||
this.cb_dont_start_if_running1.TabIndex = 18;
|
||||
this.cb_dont_start_if_running1.Text = "Don\'t start if program already running";
|
||||
this.cb_dont_start_if_running1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_dont_start_if_running1.UseVisualStyleBackColor = true;
|
||||
this.cb_dont_start_if_running1.Visible = false;
|
||||
//
|
||||
// cb_dont_start_if_running2
|
||||
//
|
||||
this.cb_dont_start_if_running2.AutoSize = true;
|
||||
this.cb_dont_start_if_running2.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_dont_start_if_running2.Location = new System.Drawing.Point(167, 82);
|
||||
this.cb_dont_start_if_running2.Name = "cb_dont_start_if_running2";
|
||||
this.cb_dont_start_if_running2.Size = new System.Drawing.Size(289, 24);
|
||||
this.cb_dont_start_if_running2.TabIndex = 19;
|
||||
this.cb_dont_start_if_running2.Text = "Don\'t start if program already running";
|
||||
this.cb_dont_start_if_running2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_dont_start_if_running2.UseVisualStyleBackColor = true;
|
||||
this.cb_dont_start_if_running2.Visible = false;
|
||||
//
|
||||
// cb_dont_start_if_running3
|
||||
//
|
||||
this.cb_dont_start_if_running3.AutoSize = true;
|
||||
this.cb_dont_start_if_running3.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_dont_start_if_running3.Location = new System.Drawing.Point(167, 82);
|
||||
this.cb_dont_start_if_running3.Name = "cb_dont_start_if_running3";
|
||||
this.cb_dont_start_if_running3.Size = new System.Drawing.Size(289, 24);
|
||||
this.cb_dont_start_if_running3.TabIndex = 20;
|
||||
this.cb_dont_start_if_running3.Text = "Don\'t start if program already running";
|
||||
this.cb_dont_start_if_running3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_dont_start_if_running3.UseVisualStyleBackColor = true;
|
||||
this.cb_dont_start_if_running3.Visible = false;
|
||||
//
|
||||
// cb_dont_start_if_running4
|
||||
//
|
||||
this.cb_dont_start_if_running4.AutoSize = true;
|
||||
this.cb_dont_start_if_running4.ForeColor = System.Drawing.Color.White;
|
||||
this.cb_dont_start_if_running4.Location = new System.Drawing.Point(167, 82);
|
||||
this.cb_dont_start_if_running4.Name = "cb_dont_start_if_running4";
|
||||
this.cb_dont_start_if_running4.Size = new System.Drawing.Size(289, 24);
|
||||
this.cb_dont_start_if_running4.TabIndex = 20;
|
||||
this.cb_dont_start_if_running4.Text = "Don\'t start if program already running";
|
||||
this.cb_dont_start_if_running4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.cb_dont_start_if_running4.UseVisualStyleBackColor = true;
|
||||
this.cb_dont_start_if_running4.Visible = false;
|
||||
//
|
||||
// ShortcutForm
|
||||
//
|
||||
this.AcceptButton = this.btn_save;
|
||||
@ -1691,5 +1755,9 @@ namespace DisplayMagician.UIForms
|
||||
private System.Windows.Forms.RadioButton rb_switch_capture_permanent;
|
||||
private System.Windows.Forms.RadioButton rb_switch_capture_temp;
|
||||
private System.Windows.Forms.Label lbl_no_game_libraries;
|
||||
private System.Windows.Forms.CheckBox cb_dont_start_if_running4;
|
||||
private System.Windows.Forms.CheckBox cb_dont_start_if_running3;
|
||||
private System.Windows.Forms.CheckBox cb_dont_start_if_running2;
|
||||
private System.Windows.Forms.CheckBox cb_dont_start_if_running1;
|
||||
}
|
||||
}
|
@ -361,7 +361,8 @@ namespace DisplayMagician.UIForms
|
||||
Executable = txt_start_program1.Text,
|
||||
ExecutableArgumentsRequired = cb_start_program_pass_args1.Checked,
|
||||
Arguments = txt_start_program_args1.Text,
|
||||
CloseOnFinish = cb_start_program_close1.Checked
|
||||
CloseOnFinish = cb_start_program_close1.Checked,
|
||||
DontStartIfAlreadyRunning = cb_dont_start_if_running1.Checked
|
||||
};
|
||||
_startPrograms.Add(myStartProgram);
|
||||
|
||||
@ -372,7 +373,8 @@ namespace DisplayMagician.UIForms
|
||||
Enabled = cb_start_program2.Checked,
|
||||
ExecutableArgumentsRequired = cb_start_program_pass_args2.Checked,
|
||||
Arguments = txt_start_program_args2.Text,
|
||||
CloseOnFinish = cb_start_program_close2.Checked
|
||||
CloseOnFinish = cb_start_program_close2.Checked,
|
||||
DontStartIfAlreadyRunning = cb_dont_start_if_running2.Checked
|
||||
};
|
||||
_startPrograms.Add(myStartProgram);
|
||||
|
||||
@ -383,7 +385,8 @@ namespace DisplayMagician.UIForms
|
||||
Enabled = cb_start_program3.Checked,
|
||||
ExecutableArgumentsRequired = cb_start_program_pass_args3.Checked,
|
||||
Arguments = txt_start_program_args3.Text,
|
||||
CloseOnFinish = cb_start_program_close3.Checked
|
||||
CloseOnFinish = cb_start_program_close3.Checked,
|
||||
DontStartIfAlreadyRunning = cb_dont_start_if_running3.Checked
|
||||
};
|
||||
_startPrograms.Add(myStartProgram);
|
||||
|
||||
@ -394,7 +397,8 @@ namespace DisplayMagician.UIForms
|
||||
Enabled = cb_start_program4.Checked,
|
||||
ExecutableArgumentsRequired = cb_start_program_pass_args4.Checked,
|
||||
Arguments = txt_start_program_args4.Text,
|
||||
CloseOnFinish = cb_start_program_close4.Checked
|
||||
CloseOnFinish = cb_start_program_close4.Checked,
|
||||
DontStartIfAlreadyRunning = cb_dont_start_if_running4.Checked
|
||||
};
|
||||
_startPrograms.Add(myStartProgram);
|
||||
|
||||
@ -1007,6 +1011,7 @@ namespace DisplayMagician.UIForms
|
||||
cb_start_program_pass_args1.Checked = myStartProgram.ExecutableArgumentsRequired;
|
||||
txt_start_program_args1.Text = myStartProgram.Arguments;
|
||||
cb_start_program_close1.Checked = myStartProgram.CloseOnFinish;
|
||||
cb_dont_start_if_running1.Checked = myStartProgram.DontStartIfAlreadyRunning;
|
||||
break;
|
||||
case 2:
|
||||
txt_start_program2.Text = myStartProgram.Executable;
|
||||
@ -1014,6 +1019,7 @@ namespace DisplayMagician.UIForms
|
||||
cb_start_program_pass_args2.Checked = myStartProgram.ExecutableArgumentsRequired;
|
||||
txt_start_program_args2.Text = myStartProgram.Arguments;
|
||||
cb_start_program_close2.Checked = myStartProgram.CloseOnFinish;
|
||||
cb_dont_start_if_running2.Checked = myStartProgram.DontStartIfAlreadyRunning;
|
||||
break;
|
||||
case 3:
|
||||
txt_start_program3.Text = myStartProgram.Executable;
|
||||
@ -1021,6 +1027,7 @@ namespace DisplayMagician.UIForms
|
||||
cb_start_program_pass_args3.Checked = myStartProgram.ExecutableArgumentsRequired;
|
||||
txt_start_program_args3.Text = myStartProgram.Arguments;
|
||||
cb_start_program_close3.Checked = myStartProgram.CloseOnFinish;
|
||||
cb_dont_start_if_running3.Checked = myStartProgram.DontStartIfAlreadyRunning;
|
||||
break;
|
||||
case 4:
|
||||
txt_start_program4.Text = myStartProgram.Executable;
|
||||
@ -1028,6 +1035,7 @@ namespace DisplayMagician.UIForms
|
||||
cb_start_program_pass_args4.Checked = myStartProgram.ExecutableArgumentsRequired;
|
||||
txt_start_program_args4.Text = myStartProgram.Arguments;
|
||||
cb_start_program_close4.Checked = myStartProgram.CloseOnFinish;
|
||||
cb_dont_start_if_running4.Checked = myStartProgram.DontStartIfAlreadyRunning;
|
||||
break;
|
||||
|
||||
}
|
||||
@ -1479,6 +1487,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program1.Visible = true;
|
||||
cb_start_program_pass_args1.Visible = true;
|
||||
cb_start_program_close1.Visible = true;
|
||||
cb_dont_start_if_running1.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1487,6 +1496,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program1.Visible = false;
|
||||
cb_start_program_pass_args1.Visible = false;
|
||||
cb_start_program_close1.Visible = false;
|
||||
cb_dont_start_if_running1.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1502,6 +1512,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program2.Visible = true;
|
||||
cb_start_program_pass_args2.Visible = true;
|
||||
cb_start_program_close2.Visible = true;
|
||||
cb_dont_start_if_running2.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1510,6 +1521,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program2.Visible = false;
|
||||
cb_start_program_pass_args2.Visible = false;
|
||||
cb_start_program_close2.Visible = false;
|
||||
cb_dont_start_if_running2.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1525,6 +1537,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program3.Visible = true;
|
||||
cb_start_program_pass_args3.Visible = true;
|
||||
cb_start_program_close3.Visible = true;
|
||||
cb_dont_start_if_running3.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1533,6 +1546,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program3.Visible = false;
|
||||
cb_start_program_pass_args3.Visible = false;
|
||||
cb_start_program_close3.Visible = false;
|
||||
cb_dont_start_if_running3.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1548,6 +1562,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program4.Visible = true;
|
||||
cb_start_program_pass_args4.Visible = true;
|
||||
cb_start_program_close4.Visible = true;
|
||||
cb_dont_start_if_running4.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1556,6 +1571,7 @@ namespace DisplayMagician.UIForms
|
||||
btn_start_program4.Visible = false;
|
||||
cb_start_program_pass_args4.Visible = false;
|
||||
cb_start_program_close4.Visible = false;
|
||||
cb_dont_start_if_running4.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1997,5 +2013,36 @@ namespace DisplayMagician.UIForms
|
||||
_captureVolume = Convert.ToDecimal(nud_capture_volume.Value);
|
||||
}
|
||||
|
||||
private void lbl_start_program1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!cb_start_program1.Checked)
|
||||
cb_start_program1.CheckState = CheckState.Checked;
|
||||
else
|
||||
cb_start_program1.CheckState = CheckState.Unchecked;
|
||||
}
|
||||
|
||||
private void lbl_start_program2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!cb_start_program2.Checked)
|
||||
cb_start_program2.CheckState = CheckState.Checked;
|
||||
else
|
||||
cb_start_program2.CheckState = CheckState.Unchecked;
|
||||
}
|
||||
|
||||
private void lbl_start_program3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!cb_start_program3.Checked)
|
||||
cb_start_program3.CheckState = CheckState.Checked;
|
||||
else
|
||||
cb_start_program3.CheckState = CheckState.Unchecked;
|
||||
}
|
||||
|
||||
private void lbl_start_program4_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!cb_start_program4.Checked)
|
||||
cb_start_program4.CheckState = CheckState.Checked;
|
||||
else
|
||||
cb_start_program4.CheckState = CheckState.Unchecked;
|
||||
}
|
||||
}
|
||||
}
|
@ -102,7 +102,7 @@ namespace DisplayMagician.UIForms
|
||||
|
||||
private void btn_save_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.None;
|
||||
//DialogResult = DialogResult.None;
|
||||
|
||||
// Only do something if there is a shortcut selected
|
||||
if (_selectedShortcut != null)
|
||||
@ -122,22 +122,29 @@ namespace DisplayMagician.UIForms
|
||||
// Set the Shortcut save folder to the Desktop as that's where people will want it most likely
|
||||
dialog_save.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
// Try to set up some sensible suggestions for the Shortcut name
|
||||
if (_selectedShortcut.DisplayPermanence == ShortcutPermanence.Permanent)
|
||||
if (_selectedShortcut.AutoName)
|
||||
{
|
||||
|
||||
dialog_save.FileName = _selectedShortcut.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_selectedShortcut.Category == ShortcutCategory.Application)
|
||||
if (_selectedShortcut.DisplayPermanence == ShortcutPermanence.Permanent)
|
||||
{
|
||||
dialog_save.FileName = String.Concat(Path.GetFileNameWithoutExtension(_selectedShortcut.ExecutableNameAndPath), @" (", _selectedShortcut.Name.ToLower(CultureInfo.InvariantCulture), @")");
|
||||
|
||||
dialog_save.FileName = _selectedShortcut.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog_save.FileName = _selectedShortcut.Name;
|
||||
if (_selectedShortcut.Category == ShortcutCategory.Application)
|
||||
{
|
||||
dialog_save.FileName = String.Concat(Path.GetFileNameWithoutExtension(_selectedShortcut.ExecutableNameAndPath), @" (", _selectedShortcut.Name.ToLower(CultureInfo.InvariantCulture), @")");
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog_save.FileName = _selectedShortcut.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog_save.FileName = _selectedShortcut.Name;
|
||||
}
|
||||
|
||||
// Show the Save Shortcut window
|
||||
if (dialog_save.ShowDialog(this) == DialogResult.OK)
|
||||
@ -160,7 +167,7 @@ namespace DisplayMagician.UIForms
|
||||
}
|
||||
|
||||
dialog_save.FileName = string.Empty;
|
||||
DialogResult = DialogResult.OK;
|
||||
//DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -312,18 +319,25 @@ namespace DisplayMagician.UIForms
|
||||
else if (_selectedShortcut.Category.Equals(ShortcutCategory.Game))
|
||||
message = $"Running the {_selectedShortcut.GameName} game and waiting until you close it.";
|
||||
|
||||
// Create a MaskForm that will cover the ShortcutLibrary Window to lock
|
||||
// the controls and inform the user that the game is running....
|
||||
MaskedForm maskedForm = MaskedForm.Show(this, message);
|
||||
if (!Program.AppProgramSettings.MinimiseOnStart)
|
||||
{
|
||||
// Create a MaskForm that will cover the ShortcutLibrary Window to lock
|
||||
// the controls and inform the user that the game is running....
|
||||
MaskedForm maskedForm = MaskedForm.Show(this, message);
|
||||
|
||||
// Get the MainForm so we can access the NotifyIcon on it.
|
||||
MainForm mainForm = (MainForm)this.Owner;
|
||||
// Get the MainForm so we can access the NotifyIcon on it.
|
||||
MainForm mainForm = (MainForm)this.Owner;
|
||||
|
||||
// Run the shortcut
|
||||
ShortcutRepository.RunShortcut(_selectedShortcut, mainForm.notifyIcon);
|
||||
|
||||
// Run the shortcut
|
||||
ShortcutRepository.RunShortcut(_selectedShortcut, mainForm.notifyIcon);
|
||||
|
||||
maskedForm.Close();
|
||||
maskedForm.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Run the shortcut
|
||||
ShortcutRepository.RunShortcut(_selectedShortcut, Program.AppMainForm.notifyIcon);
|
||||
}
|
||||
}
|
||||
|
||||
private void ilv_saved_shortcuts_ItemHover(object sender, ItemHoverEventArgs e)
|
||||
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.0")]
|
@ -56,7 +56,10 @@
|
||||
<Component Id="cmp5069692C1912B298A026EA30A39A2F36" Guid="{D4058D15-E089-4DAB-8CF7-4AA14F094703}">
|
||||
<File Id="fil15BCAD6A05EB985A23A6B9DE3EFEB933" KeyPath="yes" Source="$(var.DisplayMagician.TargetDir)\ImageListView.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp6B91543EC1EAFC09F3C7747C1333F99A" Guid="{C7189742-5B1D-4323-89D6-E91FD58A5F99}">
|
||||
<Component Id="cmp5069692C1912B298A026EA30A3823321" Guid="{5796A8D9-7991-4C6E-9782-C9736A5927FB}">
|
||||
<File Id="fil15BCAD6A05EB985A23A6B9DE3E823321" KeyPath="yes" Source="$(var.DisplayMagician.TargetDir)\Interop.IWshRuntimeLibrary.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp6B91543EC1EAFC09F3C7747C1333F99A" Guid="{C7189742-5B1D-4323-89D6-E91FD58A5F99}">
|
||||
<File Id="fil34AC49C1FA6CC0335FB4F16BCD03AA7B" KeyPath="yes" Source="$(var.DisplayMagician.TargetDir)\McMaster.Extensions.CommandLineUtils.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp8A11CDCDF04C29EC9CA9A0C1D0D78B04" Guid="{5ECD1594-F851-4CE4-996C-6892EF8EA05A}">
|
||||
@ -231,7 +234,8 @@
|
||||
<!-- <ComponentRef Id="cmpB76F273FDED5EA841158E966B403CFC8" />
|
||||
<ComponentRef Id="cmp7DD29D6442A6E450B2316729EA2C0F1D" />-->
|
||||
<ComponentRef Id="cmpA8825A49786C04320E75BCFC8E961667" />
|
||||
<ComponentRef Id="cmp650327FC006E09EDFC7039D6E7A6F340" />
|
||||
<ComponentRef Id="cmp5069692C1912B298A026EA30A3823321" />
|
||||
<ComponentRef Id="cmp650327FC006E09EDFC7039D6E7A6F340" />
|
||||
<ComponentRef Id="cmp27AC6F10258FA1C97C54F3C1D153D122" />
|
||||
<ComponentRef Id="cmp1D8A437520B8A88B5329BA85AF49F972" />
|
||||
<ComponentRef Id="cmp1B983AD82D33902E3869C2CD3E625557" />
|
||||
|
@ -4,8 +4,8 @@
|
||||
Versioning. These have to be changed for upgrades.
|
||||
It's not enough to just include newer files.
|
||||
-->
|
||||
<?define MajorVersion="0" ?>
|
||||
<?define MinorVersion="2" ?>
|
||||
<?define MajorVersion="1" ?>
|
||||
<?define MinorVersion="0" ?>
|
||||
<?define BuildVersion="1" ?>
|
||||
<!-- Revision is NOT used by WiX in the upgrade procedure -->
|
||||
<!-- Full version number to display -->
|
||||
|
@ -14,11 +14,14 @@
|
||||
<Package InstallerVersion="314" Compressed="yes" InstallPrivileges="elevated" InstallScope="perMachine" Platform="x64"/>
|
||||
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
|
||||
<!-- Upgrade settings. This will be explained in more detail in a future post -->
|
||||
<!-- <Upgrade Id="$(var.UpgradeCode)">
|
||||
<Upgrade Id="$(var.UpgradeCode)">
|
||||
<UpgradeVersion OnlyDetect="yes" Minimum="$(var.VersionNumber)" IncludeMinimum="no" Property="NEWER_VERSION_FOUND" />
|
||||
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.VersionNumber)" IncludeMaximum="no" Property="OLDER_VERSION_FOUND" />
|
||||
</Upgrade> -->
|
||||
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />
|
||||
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.VersionNumber)" IncludeMaximum="no" Property="OLDER_VERSION_FOUND" IgnoreRemoveFailure="yes" />
|
||||
</Upgrade>
|
||||
<Condition Message="A newer version of [ProductName] is already installed.">
|
||||
NOT NEWER_VERSION_FOUND
|
||||
</Condition>
|
||||
<!--<MajorUpgrade IgnoreRemoveFailure="yes" AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />-->
|
||||
<!-- Reference the global WIXNETFX4RELEASEINSTALLED property so that will automatically pull in the .Net 4.8 variables (WiX 3.14 and higher only supported) -->
|
||||
<!--<PropertyRef Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"/>
|
||||
<Condition Message="!(loc.DotNetFrameworkNeeded)">
|
||||
@ -58,7 +61,8 @@
|
||||
<!-- Here we'll add the GUI logic for installation and updating in a future post-->
|
||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDialogOverwritten">1</Publish>
|
||||
<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
|
||||
<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedOverwritten = "1" AND NOT OLDER_VERSION_FOUND</Publish>
|
||||
<!--<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedOverwritten = "1" AND NOT OLDER_VERSION_FOUND</Publish>-->
|
||||
<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedOverwritten = "1"</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDialogOverwritten">1</Publish>
|
||||
<!--<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>-->
|
||||
</UI>
|
||||
@ -131,6 +135,7 @@
|
||||
|
||||
<!-- Plumb the registering and unregistering of the ShellExtension DLL into the instllation sequence -->
|
||||
<InstallExecuteSequence>
|
||||
<RemoveExistingProducts After="InstallInitialize"/>
|
||||
<Custom Action="InstallShell" After="InstallFiles">NOT Installed</Custom>
|
||||
<Custom Action="UninstallShell" Before="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.0")]
|
@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.0")]
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.0.0.0",
|
||||
"url": "https://github.com/terrymacdonald/DisplayMagician/releases/download/v1.0.0/DisplayMagicianSetup-v1.0.0.msi",
|
||||
"version": "1.0.1.0",
|
||||
"url": "https://github.com/terrymacdonald/DisplayMagician/releases/download/v1.0.1/DisplayMagicianSetup-v1.0.1.msi",
|
||||
"changelog": "https://github.com/terrymacdonald/DisplayMagician/releases",
|
||||
"mandatory": {
|
||||
"value": false,
|
||||
@ -8,7 +8,7 @@
|
||||
"mode": 0
|
||||
},
|
||||
"checksum": {
|
||||
"value": "01F596F7D096285E32C48EC2B71019360732DF56D6A0CA784D4653F75A9B2CCF",
|
||||
"value": "78067AE8F7F28101CB530110CFBF2AD9C47B809DC5D7365D4BD413D63D314FAC",
|
||||
"hashingAlgorithm": "SHA256"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user