mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed run afterwards program
Fixes #48. It's not a full blown "run multiple programs" fix, but it will at least allow people to start to experiment with a single program (or powershell file if more than one needed)
This commit is contained in:
parent
41a75acb1a
commit
ccba5cac40
@ -26,8 +26,8 @@ using System.Resources;
|
|||||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("2.1.0.142")]
|
[assembly: AssemblyVersion("2.1.0.145")]
|
||||||
[assembly: AssemblyFileVersion("2.1.0.142")]
|
[assembly: AssemblyFileVersion("2.1.0.145")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|
||||||
|
@ -69,7 +69,6 @@ namespace DisplayMagician
|
|||||||
public string Executable;
|
public string Executable;
|
||||||
public string Arguments;
|
public string Arguments;
|
||||||
public bool ExecutableArgumentsRequired;
|
public bool ExecutableArgumentsRequired;
|
||||||
public bool CloseOnFinish;
|
|
||||||
public bool DontStartIfAlreadyRunning;
|
public bool DontStartIfAlreadyRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.btn_add.TabIndex = 39;
|
this.btn_add.TabIndex = 39;
|
||||||
this.btn_add.Text = "Add icons";
|
this.btn_add.Text = "Add icons";
|
||||||
this.btn_add.UseVisualStyleBackColor = true;
|
this.btn_add.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_add.Click += new System.EventHandler(this.btn_add_Click);
|
||||||
//
|
//
|
||||||
// btn_select
|
// btn_select
|
||||||
//
|
//
|
||||||
|
@ -97,5 +97,10 @@ namespace DisplayMagician.UIForms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btn_add_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
2
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
@ -1260,6 +1260,7 @@ namespace DisplayMagician.UIForms
|
|||||||
//
|
//
|
||||||
// btn_run_cmd_afterwards
|
// btn_run_cmd_afterwards
|
||||||
//
|
//
|
||||||
|
this.btn_run_cmd_afterwards.Enabled = false;
|
||||||
this.btn_run_cmd_afterwards.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.btn_run_cmd_afterwards.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.btn_run_cmd_afterwards.ForeColor = System.Drawing.Color.White;
|
this.btn_run_cmd_afterwards.ForeColor = System.Drawing.Color.White;
|
||||||
this.btn_run_cmd_afterwards.Location = new System.Drawing.Point(645, 35);
|
this.btn_run_cmd_afterwards.Location = new System.Drawing.Point(645, 35);
|
||||||
@ -1268,6 +1269,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.btn_run_cmd_afterwards.TabIndex = 11;
|
this.btn_run_cmd_afterwards.TabIndex = 11;
|
||||||
this.btn_run_cmd_afterwards.Text = "Choose";
|
this.btn_run_cmd_afterwards.Text = "Choose";
|
||||||
this.btn_run_cmd_afterwards.UseVisualStyleBackColor = true;
|
this.btn_run_cmd_afterwards.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_run_cmd_afterwards.Click += new System.EventHandler(this.btn_run_cmd_afterwards_Click);
|
||||||
//
|
//
|
||||||
// txt_run_cmd_afterwards
|
// txt_run_cmd_afterwards
|
||||||
//
|
//
|
||||||
|
@ -500,10 +500,18 @@ namespace DisplayMagician.UIForms
|
|||||||
StopProgram stopProgram = new StopProgram();
|
StopProgram stopProgram = new StopProgram();
|
||||||
stopProgram.Executable = txt_run_cmd_afterwards.Text;
|
stopProgram.Executable = txt_run_cmd_afterwards.Text;
|
||||||
stopProgram.Priority = 0;
|
stopProgram.Priority = 0;
|
||||||
stopProgram.DontStartIfAlreadyRunning = false;
|
stopProgram.DontStartIfAlreadyRunning = false;
|
||||||
stopProgram.Arguments = "";
|
|
||||||
stopProgram.Disabled = false;
|
stopProgram.Disabled = false;
|
||||||
stopProgram.ExecutableArgumentsRequired = false;
|
if (cb_run_cmd_afterwards_args.Checked)
|
||||||
|
{
|
||||||
|
stopProgram.ExecutableArgumentsRequired = true;
|
||||||
|
stopProgram.Arguments = txt_run_cmd_afterwards_args.Text;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stopProgram.ExecutableArgumentsRequired = false;
|
||||||
|
stopProgram.Arguments = "";
|
||||||
|
}
|
||||||
stopProgram.ProcessPriority = ProcessPriority.Normal;
|
stopProgram.ProcessPriority = ProcessPriority.Normal;
|
||||||
_stopPrograms.Add(stopProgram);
|
_stopPrograms.Add(stopProgram);
|
||||||
}
|
}
|
||||||
@ -585,7 +593,7 @@ namespace DisplayMagician.UIForms
|
|||||||
_hotkey
|
_hotkey
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
logger.Error(ex,$"ShortcutForm/btn_save_Click: Exception while trying to update a game shortcut! : ",
|
logger.Error(ex,$"ShortcutForm/btn_save_Click: Exception while trying to update a game shortcut! : ",
|
||||||
txt_shortcut_save_name.Text,
|
txt_shortcut_save_name.Text,
|
||||||
@ -2780,6 +2788,11 @@ namespace DisplayMagician.UIForms
|
|||||||
txt_run_cmd_afterwards_args.Enabled = false;
|
txt_run_cmd_afterwards_args.Enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btn_run_cmd_afterwards_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
txt_run_cmd_afterwards.Text = getExeFile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class used to populate combo boxes
|
// Class used to populate combo boxes
|
||||||
|
Loading…
Reference in New Issue
Block a user