uncommented export x3g work

This commit is contained in:
gregory-diaz 2014-08-26 18:34:54 -07:00
parent c21dcb0631
commit 3731559ff8
2 changed files with 24 additions and 16 deletions

View file

@ -123,19 +123,19 @@ namespace MatterHackers.MatterControl
middleRowContainer.AddChild(exportToSdCard);
}
//if (ActiveSliceSettings.Instance.IsMakerbotGCodeFlavor() && !PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)
//{
// string exportAsX3GText = "Export as X3G".Localize();
// Button exportAsX3G = textImageButtonFactory.Generate(exportAsX3GText);
// exportAsX3G.HAnchor = HAnchor.ParentLeft;
// exportAsX3G.Cursor = Cursors.Hand;
// exportAsX3G.Click += new ButtonBase.ButtonEventHandler((object sender, MouseEventArgs e) =>
// {
// UiThread.RunOnIdle(ExportX3G_Click);
if (ActiveSliceSettings.Instance.IsMakerbotGCodeFlavor() && !PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)
{
string exportAsX3GText = "Export as X3G".Localize();
Button exportAsX3G = textImageButtonFactory.Generate(exportAsX3GText);
exportAsX3G.HAnchor = HAnchor.ParentLeft;
exportAsX3G.Cursor = Cursors.Hand;
exportAsX3G.Click += new ButtonBase.ButtonEventHandler((object sender, MouseEventArgs e) =>
{
UiThread.RunOnIdle(ExportX3G_Click);
// });
// middleRowContainer.AddChild(exportAsX3G);
//}
});
middleRowContainer.AddChild(exportAsX3G);
}
}
middleRowContainer.AddChild(new VerticalSpacer());
@ -353,10 +353,15 @@ namespace MatterHackers.MatterControl
SlicingQueue.Instance.QueuePartForSlicing(printItemWrapper);
printItemWrapper.SlicingDone.RegisterEvent(sliceItem_Done, ref unregisterEvents);
/*ProcessStartInfo exportX3GProcess = new ProcessStartInfo(printItemWrapper.PrintItem.Name);
exportX3GProcess.UseShellExecute = true;
exportX3GProcess.FileName = "C:\\Users\\Matter Hackers 1\\GPX\\gpx-win32-1.3\\gpx-win32-1.3\\gpx.exe";
Process.Start(exportX3GProcess);*/
//string gcode = @"C:\Users\Matter Hackers 1\GPX\gpx-win32-1.3\gpx-win32-1.3\TestCode.gcode";
//Test whether or not path to file is correct
if (File.Exists(printItemWrapper.PrintItem.Name))
{
string gpxApp = @"C:\Users\Matter Hackers 1\GPX\gpx-win32-1.3\gpx-win32-1.3\gpx.exe";
string gpxArgs = string.Format("-p -m r2\"{0}\"", printItemWrapper.PrintItem.Name);
Process.Start(gpxApp, gpxArgs);
}
}
else if (partIsGCode)
{

View file

@ -2547,3 +2547,6 @@ Translated:Speeds
English:Extrusion
Translated:Extrusion
English:Export as X3G
Translated:Export as X3G