Made save dialogs for pdf import/export Mac compatible.
This commit is contained in:
parent
8750be422e
commit
e3c5924ef2
3 changed files with 12 additions and 5 deletions
|
|
@ -231,6 +231,7 @@ namespace MatterHackers.MatterControl
|
|||
document.Info.Subject = "This is a list of the parts that are in a queue from MatterControl.";
|
||||
document.Info.Keywords = "MatterControl, STL, 3D Printing";
|
||||
|
||||
|
||||
int nextPartToPrintIndex = 0;
|
||||
int plateNumber = 1;
|
||||
bool done = false;
|
||||
|
|
@ -241,10 +242,10 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
try
|
||||
{
|
||||
document.Save(pathAndFileToSaveTo);
|
||||
document.Save(pathAndFileToSaveTo);
|
||||
Process.Start(pathAndFileToSaveTo);
|
||||
}
|
||||
catch {
|
||||
catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,13 +99,19 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
if (parts.Count > 0)
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Save Parts Sheet|*.pdf");
|
||||
|
||||
saveParams.ActionButtonLabel = new LocalizedString("Save Parts Sheet").Translated;
|
||||
string saveParamsTitleLbl = new LocalizedString("MatterContol").Translated;
|
||||
string saveParamsTitleLblFull = new LocalizedString ("Save").Translated;
|
||||
saveParams.Title = string.Format("{0}: {1}",saveParamsTitleLbl,saveParamsTitleLblFull);
|
||||
|
||||
System.IO.Stream streamToSaveTo = FileDialog.SaveFileDialog(ref saveParams);
|
||||
if (streamToSaveTo != null)
|
||||
if (streamToSaveTo != null)
|
||||
{
|
||||
streamToSaveTo.Close ();
|
||||
}
|
||||
|
||||
if (saveParams.FileName != null)
|
||||
{
|
||||
PartsSheet currentPartsInQueue = new PartsSheet(parts, saveParams.FileName);
|
||||
|
||||
|
|
|
|||
|
|
@ -242,8 +242,8 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
OpenFileDialogParams openParams = new OpenFileDialogParams("Zip file|*.zip");
|
||||
|
||||
System.IO.Stream streamToLoadFrom = FileDialog.OpenFileDialog(ref openParams);
|
||||
if (streamToLoadFrom != null)
|
||||
FileDialog.OpenFileDialog(ref openParams);
|
||||
if (openParams.FileNames != null)
|
||||
{
|
||||
string loadedFileName = openParams.FileName;
|
||||
return ImportFromProjectArchive(loadedFileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue