Have double-click on item working now with msi file.
This commit is contained in:
parent
e0a65412dd
commit
4b98c5298a
@ -51,12 +51,16 @@ namespace EduNetworkBuilder
|
|||||||
private List<NetworkDevice> ItemsSelected = new List<NetworkDevice>();
|
private List<NetworkDevice> ItemsSelected = new List<NetworkDevice>();
|
||||||
private Point OrigClickPoint = new Point(-1, -1);
|
private Point OrigClickPoint = new Point(-1, -1);
|
||||||
|
|
||||||
|
private string InitialFileLoad = "";
|
||||||
|
|
||||||
private PersonClass CurrentUser;
|
private PersonClass CurrentUser;
|
||||||
|
|
||||||
public BuilderWindow()
|
public BuilderWindow(string FirstArg="")
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
InitialFileLoad = FirstArg;
|
||||||
|
|
||||||
LastPath = OurSettings.LastPath;
|
LastPath = OurSettings.LastPath;
|
||||||
|
|
||||||
if(!OurSettings.LanguageHasBeenChosen)
|
if(!OurSettings.LanguageHasBeenChosen)
|
||||||
@ -1638,7 +1642,6 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
private void BuilderWindow_Load(object sender, EventArgs e)
|
private void BuilderWindow_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (OurSettings.MainWindowX != -1 && OurSettings.MainWindowY != -1)
|
if (OurSettings.MainWindowX != -1 && OurSettings.MainWindowY != -1)
|
||||||
{
|
{
|
||||||
Location = new Point(OurSettings.MainWindowX, OurSettings.MainWindowY);
|
Location = new Point(OurSettings.MainWindowX, OurSettings.MainWindowY);
|
||||||
@ -1648,8 +1651,11 @@ namespace EduNetworkBuilder
|
|||||||
Height = OurSettings.MainWindowHeight;
|
Height = OurSettings.MainWindowHeight;
|
||||||
Width = OurSettings.MainWindowWidth;
|
Width = OurSettings.MainWindowWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
//If we started by clicking on a file, load that file
|
//If we started by clicking on a file, load that file
|
||||||
if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null && AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData != null && AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.Any())
|
if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null &&
|
||||||
|
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData != null &&
|
||||||
|
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.Any())
|
||||||
{
|
{
|
||||||
string[] activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
|
string[] activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
|
||||||
var uri = new Uri(activationData[0]);
|
var uri = new Uri(activationData[0]);
|
||||||
@ -1665,6 +1671,16 @@ namespace EduNetworkBuilder
|
|||||||
UpdateForm();
|
UpdateForm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (InitialFileLoad != "")
|
||||||
|
{
|
||||||
|
if (File.Exists(InitialFileLoad))
|
||||||
|
{
|
||||||
|
PrepForLoad();
|
||||||
|
myNetwork.Load(InitialFileLoad);
|
||||||
|
UpdateMenu();
|
||||||
|
UpdateForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (OurSettings.AutoStartPuzzles)
|
if (OurSettings.AutoStartPuzzles)
|
||||||
|
@ -12,11 +12,14 @@ namespace EduNetworkBuilder
|
|||||||
/// The main entry point for the application.
|
/// The main entry point for the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
string InitialFile = "";
|
||||||
|
if(args.Count() > 0)
|
||||||
|
InitialFile = args[0];
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new BuilderWindow());
|
Application.Run(new BuilderWindow(InitialFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user