Put in command line parameters so that we can open stl files when double clicked.

This commit is contained in:
larsbrubaker 2014-02-10 14:11:51 -08:00
parent 6ff4800258
commit e6e16c3612

View file

@ -67,10 +67,10 @@ namespace MatterHackers.MatterControl
string[] commandLineArgs = null; string[] commandLineArgs = null;
bool firstDraw = true; bool firstDraw = true;
public MatterControlApplication(string[] commandLineArgs, double width, double height) public MatterControlApplication(double width, double height)
: base(width, height) : base(width, height)
{ {
this.commandLineArgs = commandLineArgs; this.commandLineArgs = Environment.GetCommandLineArgs();;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
//WriteTestGCodeFile(); //WriteTestGCodeFile();
@ -304,7 +304,7 @@ namespace MatterHackers.MatterControl
} }
[STAThread] [STAThread]
public static void Main(string[] commandLineArgs) public static void Main()
{ {
Datastore.Instance.Initialize(); Datastore.Instance.Initialize();
@ -319,7 +319,7 @@ namespace MatterHackers.MatterControl
height = int.Parse(sizes[1]); height = int.Parse(sizes[1]);
} }
//MessageBox.ShowMessageBox(timerInfo, "Timing", MessageBox.MessageType.OK); //MessageBox.ShowMessageBox(timerInfo, "Timing", MessageBox.MessageType.OK);
new MatterControlApplication(commandLineArgs, width, height); new MatterControlApplication(width, height);
} }
public override void OnClosed(EventArgs e) public override void OnClosed(EventArgs e)