Support automatically opening specified files at startup
This commit is contained in:
parent
4ed581f594
commit
bcd1221a93
@ -3,6 +3,12 @@
|
||||
<Configuration>
|
||||
<Group ID="Application">
|
||||
<Property ID="ConfirmExit" Value="true" />
|
||||
<Group ID="Startup">
|
||||
<Property ID="ForceLoadStartupFileNames" Value="true" />
|
||||
<Property ID="FileNames">
|
||||
<Value>C:\Temp\UETEST\uetest.farc</Value>
|
||||
</Property>
|
||||
</Group>
|
||||
</Group>
|
||||
</Configuration>
|
||||
</UniversalEditor>
|
||||
@ -966,6 +966,15 @@ namespace UniversalEditor.UserInterface
|
||||
Array.Copy(args1, 1, args, 0, args.Length);
|
||||
|
||||
System.Collections.ObjectModel.Collection<string> selectedFileNames = new System.Collections.ObjectModel.Collection<string>();
|
||||
if (selectedFileNames.Count == 0 || ConfigurationManager.GetValue<bool>(new string[] { "Application", "Startup", "ForceLoadStartupFileNames" }, false))
|
||||
{
|
||||
object[] oStartupFileNames = ConfigurationManager.GetValue<object[]>(new string[] { "Application", "Startup", "FileNames" }, new object[0]);
|
||||
for (int i = 0; i < oStartupFileNames.Length; i++)
|
||||
{
|
||||
string startupFileName = oStartupFileNames[i].ToString();
|
||||
selectedFileNames.Add(startupFileName);
|
||||
}
|
||||
}
|
||||
foreach (string commandLineArgument in args)
|
||||
{
|
||||
selectedFileNames.Add(commandLineArgument);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user